Hello -
I'm currently working on a 2D tile-based game, and I have a few questions about optimizing my rendering process.
First, is that my scrolling is quite slow. I have a very large map, consisting of more than 5000 tiles rendered at a time. Right now, I have a two dimensional array that stores all of my tile data, and to scroll I erase the tiles and redraw them in their new positions. Is this a good way of doing it, and if not, how could I improve this? Is there a way different than simply removing and re-adding tiles?
Second, is that I'm planning on adding tiles with sections that go outside their designated spaces. Meaning, I basically want certain tiles to have an overhang of sorts over other tiles. To do this, I know that I'm going to need to either modify the drawing order (which goes through each row of tiles, one at a time from the top left corner, drawing them), or by adding a second tilemap altogether that renders over the first. How should I go about doing this?
Thanks for any help. My implementations work, but are far from ideal.