I am writing a custom tilemap renderer and face a bottleneck when my layer contains more than 5000 tiles: when I drag the map around, I see significant FPS drop (60 -> 25).
Since I am using nothing more than display.newImage() and display.newGroup(), I am thinking there are ways to improve this massively.
So far, I find saving tile layers into static image to be most effective methods (especially for ground layer, where we have largest number of tiles). But it also means we lose access to those tiles, and have to rebuild the image anytime the map changes.
I have read tutorial and guide on Snapshot , but it uses so much more memory than my static image approach, said tutorial also discourages creating snapshot for a whole layer.
Is there another way to somehow cache map layers (which are display groups) using application code? so that when I drag the map, Corona doesn’t have to move each children, but just move the canvas as a whole?