Very large TileMapLayer

Godot Version

4.6

Question

Small question: I’m working on making a 2d game using tile maps. The map is likely going to be very large, at least the overworld will be. Should I break up the world into chunks for loading, or does Godot only render the cells that are being shown?

All the parts of the game with code (like enemies and resources) will be loaded in a chunk system, I’m really just wondering about purely visual stuff here. Like the ground tile layer.

Profile it.

I’m not familiar with profiles. How do they work with tilemaplayers?

I’m not sure I see how this helps. It seems super useful for figuring what is causing my game to lag. Is there a feature in it that I’m not seeing that helps to reduce render size of tilemaplayers?

It lets you monitor the performance of your typical use case on your target hardware. If it performs well then there’s no reason to think about or do any optimizations. It can also help you estimate how large of a tilemap can you handle without problems which may inform you about the optimal size of the chunk in case you’ll need to do chunking.

3 Likes

I suppose that is a decent way to do it. Its more reactionary than I would like, but I guess since I’m already chunking the other stuff it shouldn’t be hard to add the visual aspects to the chunks. Thanks for the tip!

Godot has some optimization for large TileMapLayers built in. See quadrant_size –TileMapLayer — Godot Engine (stable) documentation in English

1 Like

Oh nice! That’s probably what I need to look at. Thanks!