Isle-Slingers/js/physics/step/agents.md
Relay dff5dd5b30 Clean release scrub: remove internal fleet references
Removes internal process references so the repo is presentable to an
outside audience: dropped the internal build-retrospective doc
(process log with internal terms, not useful to an outside reader),
and reworded remaining internal references in code comments and
module docs (agents.md cards, architecture.md, MODULES.md,
index.html, package.json) to generic descriptions of what changed
and when, with no behavior change -- full 47/47 suite re-run green
after the scrub, every edit verified comment/doc-only via diff.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 14:36:52 +00:00

22 lines
1.4 KiB
Markdown

# js/physics/step/ — agents.md
Part of the modularization pass. Module map: `MODULES.md`; runtime model: `architecture.md`.
Installs into `P`: step, stepPhysics, spendBird. **The physics hub.**
- `step(g, dt)` = time advance + stepPhysics + end-state check + camera. `stepPhysics`
is the integration core: gravity, air drag, bird/bird-block/bird-enemy/
block-block contacts, crush, settle bookkeeping.
- Because it reaches into nearly every unit, it is installed AFTER aim/damage and
BEFORE nothing — but all of its callees must exist in `P` by the time `step`
runs (they do, because install order is load order). Keep it that way.
- `spendBird` retires a bird that is GONE (aged out / off the island). S-5
(added 2026-09-29) split the settle branch: a bird that settles
while ANOTHER bird is in play becomes `landed` — a live body integrated
every frame in `stepPhysics` (real gravity, no lifetime timer) that falls
when its support breaks, chain-damages boards, and can kill enemies. The LAST
bird still spends (win/lose unchanged — keep it that way; the sim win/lose
test is the gate). Landed birds are cleared when the level ends (inside
`step`'s won/lost branch). `advanceToNextBird` is the shared "next bird onto
the sling" path used by both the spent and landed transitions.
- Determinism invariant: no Math.random, no Date, no DOM. Tests call this
directly at dt=1/120.