ntaylormullen / endgate Goto Github PK
View Code? Open in Web Editor NEWTypeScript powered game framework
Home Page: http://endgate.net
License: MIT License
TypeScript powered game framework
Home Page: http://endgate.net
License: MIT License
This will have a decently large memory and short term perf improvement when not drawing grid lines.
AudioClip's contain asset info which should be de-referenced so it can be garbage collected, should also dispose the events.
This can be used to modify tiles as they're loaded or even indicate how much of the square tile map has been loaded.
Right now monitoring/unmonitoring objects results in multiple dispose event handlers being bound (not good).
Tons of events, need to clean it up.
A lot like how we have a MouseHandler and a KeyboardHandler we should also have a TouchHandler which combines all browser touch events
There's no point in having an At property because the At property can be obtained from this.Bounds.Position within the Collided function
Essentially support json output etc.
Hi,
I have created a small POC of the more standard Grunt builder. You can check it out (pun intended) on this branch: https://github.com/BorisKozo/EndGate/tree/grunt_build
I also added the Grunt QUnit test runner so that the tests follow the sources properly.
If you think this is the right direction I will edit the readme to include the new instructions and remove old build files.
There are couple of things I didn't understand.
I also don't know how to create a Nuget package but I will learn how to do it before I open a PR.
Right now when an object is added/unadded from a scene it's dispose gets bound multiple times and never unbound.
Due to the sheer amount of events associated with the KeyboardHandler it should definitely be disposable.
It'd be better to defer size constrained operations until play is called (if the image source isn't loaded yet).
This way when loading large tile maps it does not hold up the dom and cause the page to freeze.
This isn't the biggest issue in the world since the assets still get cleaned up by the gc but if there's any objects that override the dispose and depend on it this obviously causes issues.
This should be added to the Bounds2d abstraction and then implemented in the BoundingCircle and BoundingRectangle.
Each property would return a number. Example:
boundingRectangle.Left === boundingRectangle.TopLeft.X &&
boundingRectangle.Left === boundingRectangle.BotLeft.X &&
boundingRectangle.Left === boundingRectangle.Position.X - boundingRectangle.Size.HalfWidth
// This would all return true
Should also allow setting of the properties which would indirectly set the bounding objects position.
When drawing child elements of visible graphics do not obey the visible property.
A current work around is to remove the child from the parent when the Visible property is set to false and add it when it is set to true.
After dispose is called on the game object the primary scene canvas is cleaned up but the created map scenery scene is not.
I noticed that the FontSettings cachedFont only updates upon _BuildFont (which is only called from the constructor).
Should this method be called upon any setter or did you have something else in mind?
This is a blatant bug, the Minutes for the eg.TimeSpan returns the seconds value.
Currently it resides under the Graphics Assets namespace but image sources are so frequently used it doesn't make since for them to be under "assets".
This pertains to the SquareTileMap specifically. By implementing this change non-static square tile maps will become much faster and static square tile maps will become slightly faster.
This relies on #30 to be completed. Essentially allows you to tween from one color to another.
Tweens should be disposable since they track events.
There are several abstract classes such as Graphic2d that are in an Abstractions namespace. There's no need for these classes to be in the Abstractions namespace, more often then not they're used to represent a collection of derived objects.
Should just noop if the graphic for a grid fill is null or undefined
To follow the consistencies of making most objects disposable we should also make ImageSource disposable so we can properly dispose of the ImageSource events and images.
A BindFor method will essentially bind an event to the event handler for X number of triggers. After it has been trggered X number of times it will unbind itself to the event.
Since all the input mechanisms will be disposable we should also make InputManager disposable to dispose them when the game is disposed.
Right now when an audio clip is built or played it requests a new audio source. This is required in order to play the same sound multiple times. However, we could implement channels so that previously existing audio sources are re-used if requested.
This will be a pre-condition to #34 . Will provide things like a displacement vector and normal. Should be get properties or methods on the CollisionData object so that it's not calculated until needed.
No reason for it to be on derived classes.
Should keep consistency
This is currently supported for audio and should be added for images.
This is related to #27, a general content manager should handle loading images and audio.
Right now you can access a graphic2d's children via graphic2d.Children(), for a better API lets make this graphic2d.GetChildren().
Should also clone the array that is returned.
It should support taking in an rgb, a hex value, or an enum as a constructor argument. Should also integrate this into the existing graphic api's to define colors.
This should support emitting random shapes and sprites.
This will further improve collision detection versatility and performance (much like #6). A collision group will represent a group of objects that can collide with each other. This can potentially be used to showcase layered collisions, an example being if you have a game were you have ground and air objects the two can't collide with eachother directly.
Should dispose the event handlers associated with the sprite animation but NOT the image source. The core image source may be shared.
Dispose should unbind all bound events to collidables and should also destroy any data.
Parent will be null if the graphic has no parent, AbsolutePosition will return the absolute position of the graphic on the map (should be a property).
When a child graphic is disposed it should be removed from its parent element.
Currently frames are drawn no matter what. However in a lot of games there's no need to draw unless there's been an update since the last draw.
Should also add a configuration to disable this functionality.
TypeScript has backed the "boolean" use and not the "bool" use so we should also support this.
Passing in a position to square tile maps does not accurately draw where the tile map should be located
This method will be called right after the constructor and will be the location for users to load their game assets.
Right now the CollisionManager uses an n^2 algorithm to determine collisions. This should obviously be improved to utilize something like a quad tree.
An obstacle collidable will be an object which cannot be passed through by any other collidable. Collided functions are still triggered on the obstacle object, the difference is obstacles utilize collision resolution to ensure the two never pass through eachother.
EventHandler's should be disposable. On dispose all actions should be unbound so no references are held.
Title says it all
This way the object that the tween is affecting can get the very last OnChange event to update its value.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.