Skip to content

Export to Tiled tilemap

The Tiled tilemap engine bundles a tilemap pack as a tileset - and, if the pack contains tilemap assets, ready-to-open .tmx map files - for the Tiled map editor. Pack-scope export is Pro; single-asset export is also available. Aimed at tilemap and 2D-game workflows.

A .zip named after your pack slug, containing:

  • <pack-slug>.png - a packed atlas image laying out every tile in the pack as a single grid
  • <pack-slug>.tsx - a Tiled tileset XML referencing the atlas
  • <pack-slug>.json - the same tileset in Tiled JSON format (use whichever your toolchain prefers)
  • <map-slug>.tmx - one Tiled map file per tilemap asset in the pack (see below)

The atlas uses a tightly packed shelf-pack layout - no wasted pixels, sized to the smallest power-of-two square that fits every tile. Tilemap assets are never packed into the atlas - they are maps of tiles, not tiles.

Every tilemap asset in the pack exports as an orthogonal .tmx referencing the bundled tileset. Open it in Tiled and the map is there - real tile data, not a flattened image:

  • Each of the map’s tile layers becomes a Tiled tile layer, cell for cell. Layer opacity carries over.
  • Each visible paint layer with anything painted on it becomes a Tiled image layer, exported as <map-slug>-<layer-slug>.png alongside the map. Hide a layer in the editor before exporting to keep it out (a scratch layer, for example). Empty paint layers are skipped automatically.
  • Hidden layers of either kind are skipped.

A heads-up on image layers: Tiled itself displays them fine, but game engines’ Tiled importers support image layers unevenly. The tile layers are the data that matters, and they export as standard tile data every importer reads.

Exporting a single map from the export dialog bundles the pack’s full tileset along with that one map’s .tmx, so the file works on its own - the map’s cells reference tiles from across the pack.

In Tiled:

  1. Open or create a map
  2. File → Import → Tileset…
  3. Select either the .tsx or .json from the unzipped bundle
  4. The tileset appears in the Tilesets dock with every tile from your pack

The tile IDs match the asset order in your pack - reordering assets in Hexcalibur and re-exporting produces a tileset where the same tile is at a new ID, so re-link any maps that reference specific IDs after a reorder.

Each tile in the atlas matches the asset’s canvas dimensions (typically 16×16 or 32×32, but any size up to 512×512 works - Tiled handles non-square tile sets natively). Tiles are packed left-to-right, top-to-bottom into a square atlas; padding between tiles is zero by default.

The Tiled engine works with tilemap packs. If you’ve put sprite or block-texture assets into a tilemap pack, the engine includes them in the atlas at their declared dimensions; Tiled will load them but the tileset’s tile dimensions won’t match.

For sprites, use the generic atlas engine instead - it’s designed for variable-size assets.