We want to use tilemaps for our mobile game but am not sure about the impact of tiles and layers in a tilemap.
Are all layers part of the same mesh in the end or is each layer one single mesh/geometry that needs to be handled by the gpu?
If I have one base layer with all tiles filled with gfx and another layer with just a few tiles having filled in gfx will the second layer still have the full geometry? (all empty tiles still made up with quads in the mesh that needs to be handled and even worse, rendered?)
AFAIK, each layer is a mesh, and multiple meshes are used as your tilemap dimensions grows in size. So if you have 2 layers with a large tilemap you get 2x as many meshes and there’s a drawcall for every mesh.
Thanks! Exactly the info I needed. Want to be able to optimize as much as possible.
Also made me happy layers are embedded in the “mesh”.
I guess there is no culling on the regions that are outside of view?
My guess was it was aleady implemented, since once of the good things of tilemaps is the easy of detecting what is seen and what is not. (Maybe is not that ease on defold because we can rotate them… )
Please confirm is this idea make any sense to implement: Can I use multiple tile maps for “sections” of my level and use “disable”/“enable” messages (if they exist on tilemaps) to keep active only those tilemaps that I know would be visible?
Not sure, you might need to make a feature request. Or use multiple tilemaps per layer. Filling with zeroes does not sound right that would probably still add to draws.