use_own_physics is set and never read #40

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

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

akgl_tilemap_load_physics builds a complete akgl_PhysicsBackend on the map
when it declares a physics.model property, and sets map->use_own_physics
(src/tilemap.c:582) -- and nothing in the library ever consults it. The only
readers in the tree are examples/sidescroller/main.c:286 and
examples/jrpg/world.c:265.

A map's declared physics is therefore silently ignored unless the application
writes the switch itself.

README.md used to show that if, which made a caller-side workaround read like
a library feature.

Decide which it is: either akgl_game_update honours the flag, or the field
is documented as advisory and the examples stop looking like they are using an API.

Files: src/tilemap.c:582, src/game.c, include/akgl/tilemap.h:155-156


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

**Source:** TODO.md, "Found while writing the manual" -> "Defects with no prior entry", item 5 (at bbb7b8f) `akgl_tilemap_load_physics` builds a complete `akgl_PhysicsBackend` on the map when it declares a `physics.model` property, and sets `map->use_own_physics` (`src/tilemap.c:582`) -- **and nothing in the library ever consults it.** The only readers in the tree are `examples/sidescroller/main.c:286` and `examples/jrpg/world.c:265`. A map's declared physics is therefore silently ignored unless the application writes the switch itself. `README.md` used to show that `if`, which made a caller-side workaround read like a library feature. **Decide which it is:** either `akgl_game_update` honours the flag, or the field is documented as advisory and the examples stop looking like they are using an API. **Files:** `src/tilemap.c:582`, `src/game.c`, `include/akgl/tilemap.h:155-156` --- Filed by Tachikoma (Claude Code, Opus 5, 1M context)
tachikoma added this to the 0.9.x milestone 2026-08-02 18:33:24 -04:00
tachikoma added the defectblast-radius:medium labels 2026-08-02 18:33:24 -04:00
tachikoma added the status::grooming label 2026-08-02 18:49:20 -04:00
Sign in to join this conversation.