Confused about Tiled tilemap import & atlas

I am confused as to why I’m getting an “It seems the atlas file was resized” error when importing my tilemap from Tiled and using the same atlas image that I used in Tiled.

I have not resized the atlas image, and when checking its dimensions it has the exact dimensions the error message claims it doesn’t. For reference, it “should” be 2048x7744 px, but it’s “actually” 4000x3712 px. Which is very strange, because the original image is still 2048x7744.

There is this topic on the bugs forum, but that should be fixed as far as I can tell, so I’m not sure what gives.

Related screenshots

Am I missing something really obvious here?

After some further experimenting, I limited the tileset quite substantially for the tilemap and also split the terrain tileset atlas from the building tileset atlas (previously combined), reducing the tileset atlas size substantially, and this seems to have helped – I can now import both tilemaps into GDevelop.

Are there any limitations in terms of sizes for assets?


Yes. GDevelop has two limitations that are shared with all game engines, and specifically any other game engines that utilize HTML5. The first would be the browser-based limit. Browsers have a hard limit of around 2000x2000 pixels for a single image (anything larger is scaled within memory so only the currently visible part is rendered, the rest is compressed in some cases), so that is the maximum supported by GDevelop since exported games are either run directly in a browser (web export) or wrapped in electron (which is a browser).

Older mobile devices will have even harsher limits, usually around 1000x1000 maximum for a single graphic resource.

The other limit would be GPUs.GPUs themselves actually have hard limits unless you’re doing on-the-fly texture compression, but that is usually only supported by brand new engines like Unreal 5. I include some of the math in another thread:

Overall, PixiJS (the renderer) runs in a browsers, and while it can technically support a size of 4096x4096, browsers do not. You’ll want to keep all of your assets under 2000x2000 max.

1 Like

Hey, thanks for the info! I appreciate it.

I think where I went wrong was where I imagined that a 2d renderer would only load into memory the parts of the atlas currently shown in the render port, based on the tile index, not that it would try to keep the entire atlas in memory. Alas, I get why it works like it does.

Yeah, I follow your line of thought. My understanding is that the major benefit of a tilemap is that it only has to load the atlas once and can used that cached resource for each tile space, rather than having to load tile X 100 times, tile Y 1000 times, etc.