Over the last couple of weeks lots of progress has been made. Autotiles and Animated tiles are fully functional. Just to recap, autotiles are special tiles that allow us to map terrian transitions automatically without having to piece together the edges of various tiles. For example the edges of dirt to grass, or grass to water. Normally to place these edges require the piecing together of each edge manually. With the autotile feature these edges are placed together automatically when the map loads. And animated tiles are autotiles but that also animate through several frames. These are great for animated water autotiles, for example.
Below is a screen shot of animated water that is fully animated in-game. Sadly the screen shot is not animated, but you can try to imagine it animating. Also, note that the water in the screen below was quickly placed for testing, so it may not look like a very good map.
To get the engine ready for autotiles and animated tiles , I first needed to create a Tileset editor. This editor allows us to quickly assign collision, layering, auto tiling, animation frames, and other properties to tiles that will be used in mapping. Here is a screen shot that shows the Tileset editor if you were curious how it looks...
Then, it was time to get the autotiles and animated into the engine. One concern was to make sure that the performance was not affected by these added features. I won't go into all the details of how it was coded. But it is done, it is in the engine, and the performance is running great.
Finally, today I also improved the performance a bit of the map render while I was reviewing the code. This showed a 15% increase in performance. But let's let the graph show the difference! Notice the spikes are even lower than before!
Before:
After:
So what is next? Event Rendering!
More soon.... Thanks for reading!