What it does
Authors tilemaps in Tiled, drops the exported .tmj map and any external .tsj tilesets into the project’s assets/ folder, and the editor bakes them to a fixed-layout binary (.dtilemap / .dtileset) optimised for SD card streaming on ESP32 and direct mmap-style reads on desktop.
Components
- TilemapComponent – renders any layer set of a Tiled map through the shared
QuadBlitpipeline used bySpriteComponent. Per-tile horizontal, vertical, and diagonal flip flags are honoured. - TilemapStreamer – LRU chunk paging keyed by viewport, with a bounded memory budget (256 KiB on ESP32, 16 MiB on desktop by default) and a per-frame IO budget that prevents stalls.
- TilemapColliderComponent – exposes per-tile collision shapes from the tileset’s collision object groups.
- TilemapObjectSpawner – instantiates engine prefabs from Tiled object layers. Convention: a Tiled object with a string property
prefab_guid = "<guid>"spawns that prefab at the object’s transform.
Source format
Only JSON Tiled exports are accepted: .tmj for maps, .tsj for tilesets. Use Tiled’s Save As to switch from the default .tmx.
Layer data must be uncompressed (CSV or base64). In Tiled, set Map Properties → Tile Layer Format to CSV or Base64 (uncompressed). Embedded tilesets and gzip / zlib / zstd chunk compression are rejected at bake time with a clear error; there is no silent fallback.