We have a pretty big release for you today! The rate of community contributions has been steadily increasing, helping to make melonJS better. Among the list of changes, we would like to highlight a few of the really exciting ones:
- We added a new renderable container object, which can be used for grouping similar objects. This gives a lot of flexibility, like creating menu systems and modal dialogs; adding shadows, clothes, weapons, hair, and other addon sprites to characters; moving groups of entities in sync (like the space invaders); it also completely replaces the old `HUD` objects with a similar, but more powerful API; and more!
- melonJS now features a built-in algorithm for sorting on z, x or y values, and most of all now auto-sort objects when added into the game world, which means that you do not need anymore to bother about calling the sort function !
- We updated the input support with a new `device` module to read mobile devices like accelerometers and gyroscopes. This is now a new namespace for current device capabilities, any other specific device information like orientation, but as well later things like GPS, temperature sensors, etc.
- We added a new module for persistent storage (save your game progress); mostly replaces the older `stat` module.
- We now have a better support for high-DPI devices like Apple Retina displays.
- We started adding new shape modules (we already had Rectangles. Now we also have Ellipses and PolyShapes!), these are primarily for supporting the shape objects in Tiled.
- We optimized rendering, rewrote the main loop to better handle pausing, etc... and also added memory optimizations to object pooling.
- We updated the Tween library, which adds new easing functions, new interpolation functions, onStartCallback, repeat, and a "yoyo" method which automatically reverses the Tween after it completes.
- And finally numerous bug fixes with rendering, animations, TMX maps, loader, and miscellaneous. See the Changelog for a more descriptive list!
The new shapes are mostly placeholders for updates to collision detection system (expected for version 1.0.0!) but you can use them today at least for drawing the shapes. :)
What we are really happy about in this release, though, is the object container. This one new feature adds a lot of brand new flexibility to the engine. Some examples of uses can be seen above, but for a real demo: the melonJS platformer example uses it as a complete replacement for the HUD. The container can also be used together with Tweens to create keyframe animations similar to Spine.
Also, don't forget to check out the Upgrade Guide if you are planning to port your older games to the new engine. A lot has changed, and you are very likely to stumble into a few trouble spots.
It will be truly exciting to see what the community can build with these advanced features! We still have a long road ahead of us to get the engine to be usable for more game types (especially isometric games!) and better examples of the amazing things that can be done with the new modules, but the progress in the last months has been amazing.
Thanks again to everyone who contributed fixes, features, improvement suggestions, and bug reports. In particular, shout outs to: Aaron McCleod, Nikolay Lazarov, Julien Dutriaux, and Sean M, and we also have a new logo (that you should start to see a bit everywhere, starting with the refreshed Loader screen) thanks to Michael Wilson ! This was really a community effort, which we are very proud to be a part of!
- melonJS team