Godot 4 (.tscn)
The Godot 4 exporter writes a scene file with a TileMap node and a TileSet sub-resource per atlas. Open the .tscn in Godot 4.2 or newer and the map shows up ready to run.
What's covered
- One TileSetAtlasSource per GridCraft tileset, sharing a single TileSet sub-resource.
- Per-tile flip and rotation bits encoded in the alternative-tile field (Godot 4.2+ native encoding).
- One
layer_N/tile_dataper GridCraft tile layer. - Variable-size tiles via
size_in_atlas. Anchors and covered cells are handled so Godot doesn't reject the tileset. - Object layers exported as child Node2D instances under the root, with custom properties as metadata.
Pack format
Tile data is a PackedInt32Array with three integers per non-empty tile:
DestLocation = (x >= 0 ? y : y + 1) * 65536 + x SrcX = atlasCol * 65536 + atlasSourceId SrcY = atlasRow + 65536 * (flipBits << 12) flipBits: bit 0 = flip horizontal bit 1 = flip vertical bit 2 = transpose (anti-diagonal)
Image paths
Each tileset image is referenced as res://<original-path>. You'll usually want to move the images into your Godot project and adjust the path before running.
Output
map.tscn (Godot scene file, format=3)