Document collision, and correct what it made false elsewhere

The new chapter 15 covers the opt-in setup, where resolution runs in the step
and why it runs after the move, shapes and the z-extrusion trap, the asymmetric
masks and the defaults that matter more than the mechanism, tiles as a source
rather than proxies, the response hook and the three ways it is easy to write
wrongly, sensors, the four queries, both partitioners, and what is still not
implemented.

Collision falsified claims in eight other chapters. The physics chapter said
"There is no collision detection, at all" and that collide always raises
AKERR_API; actors had six behaviour hooks; the heap had five pools and four
non-claiming acquires; the status band held five codes; and the design
philosophy had exactly two pluggable subsystems. The appendix gains a
collision.h status section, the three new pool ceilings and a table of the
collision constants that are deliberately not in a public header.

Also fixes chapter labels the renumbering commit left pointing at their old
numbers -- "18. Utilities" linked to 19-utilities.md.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KzBDV2fqgnUAcqCKqKvc71
This commit is contained in:
2026-08-02 07:25:52 -04:00
parent bace818998
commit 35a58670d0
11 changed files with 368 additions and 74 deletions

View File

@@ -8,7 +8,7 @@ slot whose `refcount` is zero.
out-of-memory catastrophe.** `AKGL_ERR_HEAP` is a status you can handle. It is also,
almost always, a missing release rather than a pool that is genuinely too small.
## The five pools
## The eight pools
A "heap layer" is one array plus its `next`/`release` pair. There are five:
@@ -117,7 +117,7 @@ rather than a design (`TODO.md`, "Known and still open" item 8; also the `@warni
| `akgl_heap_next_character` | No | `akgl_character_initialize` |
**Until a reference is taken, the slot is still free and the next acquire hands out the
same pointer.** Four of the five acquires therefore leave a window in which two callers can
same pointer.** Seven of the eight acquires therefore leave a window in which two callers can
be holding the same object, and the window closes only when `*_initialize` runs. In
practice you never see it, because the four are always immediately followed by their
initializer — which is exactly why the asymmetry has survived. Write them adjacent and
@@ -316,7 +316,7 @@ genuinely needs 256 actors should say so once, for the whole build, per the ABI
## Initialization and reset
`akgl_heap_init` zeroes all five pools. `akgl_game_init` calls it for you, before any
`akgl_heap_init` zeroes all eight pools. `akgl_game_init` calls it for you, before any
registry exists.
**Calling it again is a reset, not a refresh.** It does not release textures, clear