I’m currently prototyping with Amethyst for a top down 2D game. The goal is to have a large “map” with traditional square tiles for terrain. The larger map the better; in fact auto generating on the fly would be optimal but for now I prototype with a set size. The tiles are mapped to an underlying noise array that controls sprite selection, collision, etc.
I found the tile example and thought the Amethyst tile functionality would be a good base to start from, so I looked through the example and added some terrain using the
RenderTiles2D plugin and a
MortonEncoder2D. It’s easy to work with and the
sprite function in the
Tile trait makes it easy to map a specific coordinate to the underlying noise array.
But the tile example uses a fairly small map, 48x48, and my map will have to be much larger. As I scale it up the drawing performance drops quite fast; even before I can cover the current window with tiles (1920x1080) my other “moving” sprites on top of the terrain starts drawing choppy.
So my question is: Is
TileMap a good base for a project like this, and in that case why is the performance dropping so rapidly? Is it supposed to be used differently? Or should I just write custom systems for rendering the terrain?
I am using the
RenderTiles2D plugin together with the