Question about how Phaser Tilemaps works behind?

Hi, I have a question about tilemaps in phaser. For the game I’m working on world is going to be a sandbox a really big map, limited but big, it is created using Tiled.

My plan was to split the whole map into chunks and loading and unload, I had already created that functionality and the map is split into different files.

Tiled has the option to create infinite maps and chunks are exported in one file, I see that Phaser has no problem loading the infinite maps in chunks from Tiled, you just load the JSON file from tiled, and phaser will tell no difference.

  • But how is that working in the background? Does phaser render tilemap using chunks from the tiled infinite map or its render the whole map?
  • Should I even split my map and create loading and unloading chunks that are off screen or it is already build in Phaser?

Phaser joins all the chunks when the tilemap data is parsed, I think.

Phaser renders only the tiles within the camera view.

1 Like

Thank you, I was confused because I was loading a really big map and find no performance drop so I was like wait does phaser handle chunks or what, should I even optimize my big map if this is working fine. So far 8000px x 8000px map is working fine for me, no fps drop at all. But im planning to have a lot of npcs and trees so i would see how that would play.

Good to know that phaser renders only what is in the camera view, phaser is awesome!!! at end i would not need probably to optimize at all and loading from chunks.