Bump to 0.8.0, close Target 12, and record what is still missing
Collision changed the collide slot's signature and grew four public structs, so this is an ABI break and the soname moves to libakgl.so.0.8. The manual's counts move with it: 195 functions across 23 headers, 183 of which return an error context. Target 12 -- "collision for 256 actors under 2 ms without the caller writing a broad phase" -- is met. A new benchmark times the whole step with a world attached, which is the number the target is actually about rather than a narrowphase call in isolation: 15.4 us at 64 actors, and 54.1 us at 256 in a purpose-built -DAKGL_MAX_HEAP_ACTOR=256 configuration. Over that 4x range the step grew 3.5x while the all-pairs control grew 15.6x, which is the n-squared the index exists to avoid. Plan item 7 is rewritten to record what shipped and why both partitioners exist; the Construct and Phaser citations stay. Three new TODO entries. Actor rotation, scoped to the five places it touches and the one place it does not -- collision_support is written so rotating `dir` in and the answer back is the whole narrowphase change, and rotational *response* is explicitly a different piece of work. The swept narrowphase FLAG_BULLET reserves, with the tunnelling arithmetic written out so a game can check its own numbers against 1280 px/s. And the ccd arena being single-threaded and sized by measurement at 7,264 bytes per GJK/EPA box pair. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KzBDV2fqgnUAcqCKqKvc71
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
# 01. Introduction
|
||||
|
||||
libakgl is a C library for building 2D games on SDL3. This is version **0.7.0**. It ships
|
||||
156 functions declared across the twenty public headers in `include/akgl/`, plus
|
||||
`akgl_version()` from the generated `version.h` — 157 exported symbols in
|
||||
`libakgl.so.0.7`.
|
||||
libakgl is a C library for building 2D games on SDL3. This is version **0.8.0**. It ships
|
||||
195 functions declared across the twenty-three public headers in `include/akgl/`, plus
|
||||
`akgl_version()` from the generated `version.h` — 196 exported `akgl_` symbols in
|
||||
`libakgl.so.0.8`.
|
||||
|
||||
**0.8.0 is an ABI break.** The `collide` slot on `akgl_PhysicsBackend` changed signature,
|
||||
four public structs grew, and `akgl_physics_arcade_collide` stopped raising `AKERR_API`.
|
||||
Collision is the reason; it is [Chapter 15](15-collision.md).
|
||||
|
||||
It gives you object pools instead of `malloc`, name-based registries instead of pointer
|
||||
plumbing, a per-frame tick that updates and draws every live actor, JSON asset formats for
|
||||
@@ -21,11 +25,12 @@ The refusals are specific, and each one is a design decision documented in
|
||||
|
||||
| Not here | Instead |
|
||||
|---|---|
|
||||
| Inheritance, RTTI, dynamic dispatch on a type tag | A record of function pointers you populate — `akgl_RenderBackend`, `akgl_PhysicsBackend` |
|
||||
| Runtime `malloc` | Five statically sized pools with reference counts; `AKGL_ERR_HEAP` when one is full |
|
||||
| Inheritance, RTTI, dynamic dispatch on a type tag | A record of function pointers you populate — `akgl_RenderBackend`, `akgl_PhysicsBackend`, `akgl_Partitioner` |
|
||||
| Runtime `malloc` | Eight statically sized pools with reference counts, plus a static arena for the narrowphase; `AKGL_ERR_HEAP` when a pool is full |
|
||||
| An editor or a project format | Tiled TMJ maps and hand-writable JSON for sprites and characters |
|
||||
| A scripting layer | C. Behaviour attaches as function pointers on `akgl_Actor` |
|
||||
| Two worlds at once | Four swappable globals: `akgl_renderer`, `akgl_physics`, `akgl_camera`, `akgl_gamemap` |
|
||||
| Collision you cannot switch off | A `collision` pointer on the backend. `NULL` is byte-identical to a build before collision existed |
|
||||
|
||||
The library also does not own your window. `akgl_render_2d_init` creates one for you, and
|
||||
`akgl_render_2d_bind` is the same job with that half removed, for a host that already has an
|
||||
@@ -117,9 +122,10 @@ text you read *is* the header.
|
||||
|
||||
## Reading order
|
||||
|
||||
[Chapter 4](04-errors.md) comes before every subsystem chapter, because all 156 functions
|
||||
return `akerr_ErrorContext AKERR_NOIGNORE *` and you cannot read a single example until you
|
||||
can read that return value. After that, [Chapter 3](03-getting-started.md) gets a window on
|
||||
[Chapter 4](04-errors.md) comes before every subsystem chapter, because 183 of those 195
|
||||
functions return `akerr_ErrorContext AKERR_NOIGNORE *` and you cannot read a single example
|
||||
until you can read that return value. The dozen that do not are the `void` SDL enumeration
|
||||
callbacks and the collision arena's accessors. After that, [Chapter 3](03-getting-started.md) gets a window on
|
||||
the screen, and the subsystem chapters can be read in any order.
|
||||
|
||||
If you would rather start by building something, the two tutorials —
|
||||
|
||||
Reference in New Issue
Block a user