Defold (.tilemap)
The Defold exporter writes a .tilemap file in Defold's protobuf-style text format. Place it in your Defold project and reference it from a tilemap component.
What's covered
- Tile layers as Defold layers, one per GridCraft tile layer.
- Per-cell flip horizontal, flip vertical, and 90-degree rotate.
- Layer z-depth auto-incremented by 0.0001 from the bottom.
Coordinate convention
Defold uses a bottom-left origin. The exporter flips Y so the map looks the same in Defold as it does in GridCraft. Tile IDs are 0-based local IDs.
Tile source path
The map's tile_set field needs to point at your Defold tilesource. Set a map property called tile_set to the resource path (e.g. /assets/tileset.tilesource) before exporting, or fill it in after.
What gets lost
- Object layers. Defold tilemaps are tiles only.
- Image and group layers.
- Tile animations (handled in the tilesource, not the map).
- Variable-size tiles are not supported.
Output
map.tilemap (Defold protobuf text format)