MTE v0.943 - http://gum.co/staO
Way back at version 0.7 MTE was just a simple tile engine, very fast yet limited to perfectly square tiles and not all that much else. We’ve since seen the addition of Physics, Isometric Maps, a multitude of new functions and capabilities, numerous performance improvements, hundreds of diligently crushed software bugs, and nine new sample projects. We’ve come a long way!
I have no intention of stopping there. Version 0.943 adds something hinted at and touted throughout the development of MTE; a lighting system. Sure, you could tint each layer to simulate some basic lighting effects before, but now you can create point light sources! Tiles and sprites can be set to emit light of any color, tiles can block light, absorb light, let some light pass through, or all of it! Walls can cast shadows! Developers can rob the players of their miraculous ability to see around corners!
The stars of the show in 0.943 are the numerous new tile and object properties for use in Tiled. Properties determine the strength of a light source; the range of the light; whether a full circle is cast or only an arc, or a list of individual light rays; how quickly that light diminishes with distance; and more. Objects and Tiles share most of these properties. Definitely have a look at the updated MTE Reserved Tiled Properties documentation to get the lay of this new land.
What would this update be without a cool new sample project demonstrating the lighting system? Check out Lighting 0v943 to see the system in action. Move with the Dpad, touch the player sprite to toggle his dynamic light on and off. Did I mention dynamic lights? The static tile lighting is all well and good, but moving light sources really open the door to fun gameplay mechanic possibilities.
Aside from lighting, 0.943 incorporates a few user-requested additions and changes:
-
The constrainToMap parameter of a sprite’s setup table now takes a table instead of a boolean. The table has the format of {left, top, right, bottom} and specifies whether the sprite’s movements are constrained at each edge of the map.
-
Tile display objects now have a property named ‘property’ which contains the table of all the tile’s properties as defined in Tiled. Easily retrieve the tile’s Tiled properties in your collision events!
-
The new engine incorporates a suggested fix for loading tilesets with spacing.
-
Various minor performance improvements to the engine tasks of loading tiles and loading the map.
Following the pattern established with the introduction of Physics and Isometric Maps, this is only part 1 of the lighting update. There is more to come in the near future. Coming soon are lighting events triggered when a sprite or tile is first exposed to light, while it is still exposed to light, and when a given light stops landing on it. I’m investigating the possibilities of sprites casting shadows and of smoothing out the edges of shadows cast by map tiles. Of course, there will be performance improvements and optimizations.
After lighting I’ll be working on fundamental improvements to the core functions of the Million Tile Engine allowing for far greater flexibility in controlling sprites and maps, loading multiple maps, stitching maps together, adding maps TO maps AS sprites, allowing physics collisions anywhere on culled maps instead of just onscreen, and, again-and-as-always, performance improvements. In addition to updated documentation and tutorials, this will bring us right up to the 1.0 Release of the Million Tile Engine.
What comes after 1.0? You’ll just have to wait and see!
As usual I will have an eye out for bug reports and feature requests here on the forums.