I'm trying to archive a big map on my game, 2400x900 of 64x64 tiles using TiledMap and LibGDX.
What is the difference in performance of using a 100x50 tiledmap vs a 2400x900 map? Say they both have the same tile set images, I mean the images used for the 100x50 will be the same as the 2400x900, so why shouldn't I do it? If there's a hit on performance, why? resources are the same, and the tiles are only rendered when on screen.
So knowing this the only thing that I can think that can hit performance is:
The information stored in memory for each tile, there will be 2400x900.
TiledMapRendererLooping to find the correct tile to draw.
If the answer is (1) when I call
tilemap.dispose() do I free all this memory instantly or wait until gc do his thing?
If the answer is (2) I dont know how
TiledMapRenderer works but can it be optimized using some sort of quadtree implementation?
If the answer is both please answer both.
So, I've read of having to use loading screens, and split the map.
I was thinking to write a small program to split this big tiledmap and generate a few json files
Then in the game I use those json files to create a new TiledMap(). So I can load the correct sections of the map in a loading screen, when needed.
Problem is that I don't know if I should
tilemap.dispose() the old
tilemap since I will be needing the tileset images again, So I guess my question are:
- When calling
dispose()do I dispose images only(tilesets) or both images and memory from tiles?
dispose()only dispose images, then I guess garbage collector takes care of the memory stored from tiles, positions, properties etc etc. And I wont need to call