Lately I have been working with a tilemap that’s roughly 3000px * 2000px in size, and while my app is running at solid 60fps and with a lower memory usage (both system and texture are lower than 15MB), I see a noticeable delay (or lag) when I try to pan the map.
My tilemap renderer and controller does something like following:
-
cache tilesets.
-
start rendering the first layer, put all tiles in a display group ( layer1 )
-
when done, start rendering the second layer and so on ( layerX ).
-
when all layers are done, put layers in the a display group ( map ).
-
when user hold and move, pan the map (display group).
I didn’t do manual culling or other optimization yet, just wondering, what could have cause the lag? I see no noticeable delay on smaller map (say 600px * 600px).