ludic/assets/tiled-fixtures
Orkuncakilkaya 071c268de7
All checks were successful
bootstrap / cfree-fixpoint (push) Successful in 20s
ci / build-and-test (push) Successful in 1m45s
commit-lint / conventional-commits (push) Successful in 3s
docs / build-and-deploy (push) Successful in 28s
feat(stdlib): Tiled P0.5 — TMX/TSX reader over the XML reader (#68)
Tiled.read / Tiled.read_tsx (runtime/native/tiled.ludic): map the native
XML formats (TMX/TSX/TX) onto the SAME intermediate the JSON path produces
— a Value tree in Tiled's JSON schema — so one format-independent core
(P1) consumes either reader.

- tmx_to_value walks a <map> into {orientation, width/height, tilewidth/
  height, tilesets[], layers[]}; every tile layer's <data> is decoded to a
  dense GID int list (CSV split, or base64 -> zlib/gzip inflate ->
  little-endian u32s), so a CSV .tmx and a base64 .tmj of the same map read
  structurally identically.
- External tilesets keep the {firstgid, source} reference (as TMJ does);
  embedded tilesets and standalone .tsx (tsx_to_value) inline full geometry
  + per-tile metadata (animation frames, collision objectgroup, class,
  properties) for later phases.
- Object layers, shapes (rect/ellipse/point/polygon/polyline/text),
  image/group layers and custom properties are parsed into the tree now so
  P2/P4/P5 just read it.
- tmj_normalize decodes base64 `data` strings in a parsed .tmj so the JSON
  path matches the XML path.

Proven by library/tiled_p05.ludic (30 assertions) incl. the in-repo Kenney
sampleMap.tmx + external sampleSheet.tsx and TMX-vs-TMJ structural
identity. Docs + inventory added; x test: 91 passed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-01 14:15:41 +03:00
..
desert.tmx feat(stdlib): Tiled P0 — XML reader + base64 decode + gzip framing (#67) 2026-09-01 14:04:49 +03:00
desert.tsx feat(stdlib): Tiled P0 — XML reader + base64 decode + gzip framing (#67) 2026-09-01 14:04:49 +03:00
handmade.tmj feat(stdlib): Tiled P0.5 — TMX/TSX reader over the XML reader (#68) 2026-09-01 14:15:41 +03:00
handmade.tmx feat(stdlib): Tiled P0 — XML reader + base64 decode + gzip framing (#67) 2026-09-01 14:04:49 +03:00
handmade.tsx feat(stdlib): Tiled P0 — XML reader + base64 decode + gzip framing (#67) 2026-09-01 14:04:49 +03:00
hexagonal-mini.tmx feat(stdlib): Tiled P0 — XML reader + base64 decode + gzip framing (#67) 2026-09-01 14:04:49 +03:00
isometric_grass_and_water.tmx feat(stdlib): Tiled P0 — XML reader + base64 decode + gzip framing (#67) 2026-09-01 14:04:49 +03:00
orthogonal-outside.tmx feat(stdlib): Tiled P0 — XML reader + base64 decode + gzip framing (#67) 2026-09-01 14:04:49 +03:00
perspective_walls.tsx feat(stdlib): Tiled P0 — XML reader + base64 decode + gzip framing (#67) 2026-09-01 14:04:49 +03:00
README.md feat(stdlib): Tiled P0 — XML reader + base64 decode + gzip framing (#67) 2026-09-01 14:04:49 +03:00
sewers.tmx feat(stdlib): Tiled P0 — XML reader + base64 decode + gzip framing (#67) 2026-09-01 14:04:49 +03:00

Tiled golden fixtures

The curated, version-pinned corpus for the Ludic Tiled reader (design record: Design: Tiled maps, issues #67–#74). No single Tiled file covers the format surface, so this is a subset of the official mapeditor/tiled examples/ tree plus a few hand-authored files for the gaps the official examples miss.

Vendored from mapeditor/tiled (examples/)

Fetched from https://raw.githubusercontent.com/mapeditor/tiled/master/examples/. Tiled's example assets carry their own licenses (see the upstream repo's per-folder *.license/README); vendored here with attribution for testing only.

File Exercises
desert.tmx + desert.tsx orthogonal, external .tsx, base64+zlib (P0/P1)
sewers.tmx orthogonal, base64+zlib, embedded tileset, opacity (P0)
orthogonal-outside.tmx object layers, shapes, custom properties (P4)
perspective_walls.tsx per-tile bool properties, <tileoffset> (P4)
isometric_grass_and_water.tmx isometric orientation, Wang set (P5)
hexagonal-mini.tmx hexagonal orientation (P5)

Hand-authored (CC0 / public domain)

File Exercises
handmade.tmx + handmade.tsx a 4×4 orthogonal map whose four layers carry the same GID array in CSV, base64-uncompressed, base64+gzip and base64+zlib — so every encoding path must decode identically. The last tile is GID 1 with the horizontal-flip flag (0x80000001), forcing real GID decode. handmade.tsx also carries a solid bool property and a per-tile <objectgroup> collision shape for P2.