MTE v0.956 - http://gum.co/staO
Continuing a now well-established cycle of releasing a feature and then expanding upon it, MTE 0.956 expands upon the lighting system introduced in version 0.943 and brings various user-requested features and fixes to the table as well!
The new sprite method addLightingListener(lightID, listener) allows a much greater level of interaction between sprite objects. Check out the MTE Sprite Properties documentation to read more, and definitely have a look at the newly revamped Lighting 0v956 sample project to see it in action.
I’ve implemented several other features based on community feedback:
-
The lighting algorithms have been reworked. Light is cast more smoothly, with less likelihood of anomalous unlit tiles appearing when a light source is close to a wall.
-
The sortSprite parameter of a sprite’s setup table controls whether MTE implements its sprite depth buffer. The new sortSpriteOnce parameter will instruct MTE to sort the sprite a single time and then set sortSprite to false. Setting sortSprite to true will trigger another single sorting operation.
-
The new saveMap() function allows developers to easily save an altered map to a file as encoded json data. MTE can open these modified files without modification, provided the file’s extension is “.json”.
-
A new Tiled reserved property is available: noDraw. If a tile’s noDraw property is set to true, the tile is not rendered. If a layer’s noDraw property is set to true, no tiles on that layer are rendered. If a tileset’s noDraw property is set to true, none of the tiles from that set are rendered.
-
The goto() function is now setCamera(). The latest beta versions of Lua use goto as a reserved word; this change is necessary to avoid a possible future conflict. The old goto() call is still available in this build, but I recommend switching over to setCamera()
The release by Corona Labs of their Graphics 2.0 public build came sooner than I thought it would, but I managed to squeeze in some compatibility tweaks at the last minute. MTE 0.956 is nominally compatible with the new graphics system, but I recommend sticking with the previous Corona build for now.
Moving forward from here, I will begin work on a major engine overhaul next week. The new MTE code will be more efficient, lighter, easier to use, and built from the ground up to make use of Corona Labs’ new graphics API.
As usual I will have an eye out for bug reports and feature requests here on the forums.
Enjoy!