Searching around I see people saying Godot process the tiles inside the quadrant and do not process the rest out of it.

I don't find relavant information about this but it seems to be ceitil for memory usage and performance increase on a 2D game.

Can someone please explain on a simple way what is a tilemap quadrant?

Maybe some example on how to use it.

Thanks

@leonardon said: Searching around I see people saying Godot process the tiles inside the quadrant and do not process the rest out of it.

I don't find relavant information about this but it seems to be ceitil for memory usage and performance increase on a 2D game.

Can someone please explain on a simple way what is a tilemap quadrant?

Maybe some example on how to use it.

Thanks

Quadrant area is chunk of tilemap which is visible by camera(and some area around it). If you get 1000x1000 tiles it will lag as hell but if you process only 10x10 around camera and keep rest loaded in memory but not processing it, game will run smoothly as new hovercraft. Don't have much of experience with it myself, but according to docs where quadrant size variable says "Default value: 16" I guess it is used automatically by all tile maps

int cell_quadrant_size - The TileMap’s quadrant size. Optimizes drawing by batching, using chunks of this size. Default value: 16.

So 'chuncks of the size' means it will divide the tilemap size (1000x1000 tiles as an example) by 16 small chuncks of it?

So it will load 1 tilemap at a time (according to the camera position) out of 16 x (62.5 x 62.5 tilemaps)?

@leonardon said:

int cell_quadrant_size - The TileMap’s quadrant size. Optimizes drawing by batching, using chunks of this size. Default value: 16.

So 'chuncks of the size' means it will divide the tilemap size (1000x1000 tiles as an example) by 16 small chuncks of it?

So it will load 1 tilemap at a time (according to the camera position) out of 16 x (62.5 x 62.5 tilemaps)?

Nope, 16 means 16x16 tiles, size of quadrant is in tiles for easy calculations.

Well that is confusing...

There is a property called "cell_size" that I can specify 16 I understand this is 16x16 cells that will represent a grid and cut the TILESET in pieces so we can use these pieces to build the TILEMAP.

Now the TILEMAP is the whole level (walls, ground ...) and the quadrant should divide this level in memory in chuncks to render the necessary pieces as the camera moves...

Is that wrong? Sorry this is confusing...

I am trying to understand this correctly because I want performance increase on my project.

Thanks

@leonardon said: Well that is confusing...

There is a property called "cell_size" that I can specify 16 I understand this is 16x16 cells that will represent a grid and cut the TILESET in pieces so we can use these pieces to build the TILEMAP.

Now the TILEMAP is the whole level (walls, ground ...) and the quadrant should divide this level in memory in chuncks to render the necessary pieces as the camera moves...

Is that wrong? Sorry this is confusing...

I am trying to understand this correctly because I want performance increase on my project.

Thanks

Don't mistake cell size and quadrant size. Cell size specifying size of one tile. To build tileset you need to use different scene and export it as tileset. You are right, tilemap usually is whole level. Whole tilemap is divided into cells of cell size(mentioned before). Cell size should be equal to size of one tile. It basically specifying size of grid. Area around camera of cell_quadrant_size is rendered and processed, by processed is meant that collisions and light occluder is processed meanwhile rest of tilemap does not render, collide or occlude light. Once again, docs are your friend, here you can find about basic workflow of tilemaps, some time ago, I used exactly this page to learn it myself. You don't have to worry about things not mentioned in docs, such things are usually passive and does not require your interaction