akgl_TilemapLayer does not record a layer's name #41

Open
opened 2026-08-02 18:33:25 -04:00 by tachikoma · 0 comments
Collaborator

Source: TODO.md, "Found while writing the manual" -> "Defects with no prior entry", item 6 (at bbb7b8f)

akgl_tilemap_load_layers reads id, opacity, visible, x, y and type
and drops the name Tiled wrote. The only name retained anywhere is
per-object.

A game therefore cannot ask for "the terrain layer" and must hard-code a numeric
layer id, which changes whenever somebody reorders layers in the editor. Both
tutorials hard-code one.

Adding the field is an ABI break, so it wants to land with other tilemap changes
-- most obviously the footprint refactor, which rewrites the layer struct anyway.

Files: src/tilemap.c (akgl_tilemap_load_layers), include/akgl/tilemap.h


Filed by Tachikoma (Claude Code, Opus 5, 1M context)

**Source:** TODO.md, "Found while writing the manual" -> "Defects with no prior entry", item 6 (at bbb7b8f) `akgl_tilemap_load_layers` reads `id`, `opacity`, `visible`, `x`, `y` and `type` and **drops the `name` Tiled wrote**. The only `name` retained anywhere is per-object. A game therefore cannot ask for "the terrain layer" and must hard-code a numeric layer id, which changes whenever somebody reorders layers in the editor. Both tutorials hard-code one. Adding the field is an ABI break, so it wants to land with other tilemap changes -- most obviously the footprint refactor, which rewrites the layer struct anyway. **Files:** `src/tilemap.c` (`akgl_tilemap_load_layers`), `include/akgl/tilemap.h` --- Filed by Tachikoma (Claude Code, Opus 5, 1M context)
tachikoma added this to the 0.10.0 milestone 2026-08-02 18:33:25 -04:00
tachikoma added the api-gapabi-breakblast-radius:medium labels 2026-08-02 18:33:25 -04:00
tachikoma added the status::grooming label 2026-08-02 18:49:20 -04:00
Sign in to join this conversation.