Pre-Flight — WP-017 — 2026-11-14

Filled-in copy of docs/reference/pre-flight for WP-017. Verdict at the bottom.

Written before engine code, on Jeff’s “continue” after PR #48 merged. Animation was the next step named at WP-016’s close. The tick rate was not in the docs. It was traced in WP-001’s decompile dump before this WP was written, because the WP depends on it.


Pre-flight intent

Validating readiness for WP-017. Verdict only.

Dependency check

Prereq Status in WORK_INDEX Locked on Notes
WP-016 ✅ Done 2026-11-14 (PR #48 merged) Rooms render with every placement at step 0, exactly.
WP-001 ✅ Done 2026-11-13 Player functions 0x430890/0x430AA0 labelled. The caller and tick rate were traced for this WP.

Repo + disc state

Doc-vs-tree cross-check

Scope lock

Allowed paths (this repo):

docs/formats/tgifile-art.md      (§Sequences: tick unit, start step)
docs/formats/scooby-exe.md       (tick loop rows)
docs/02-SCUMMVM-INTEGRATION.md   (§1 or §5 note)
docs/work-packets/WP-017-sprite-animation.md
docs/work-packets/WORK_INDEX.md
docs/reference/pre-flight-WP-017-2026-11-14.md

Fork: engines/scooby/** only, staged by name.

Risk review

Risk Likelihood Impact Mitigation
Redraw cost. Decoding cels every frame would be slow. med med Per-room cel cache, and redraw only when a step changes.
Engine and model agree on a wrong step formula low med The formula comes straight from the decompiled countdown, and a non-zero tick count (37) exercises it on every room.
Wall-clock timing flakiness in the rate check med low A ±1 tick tolerance over 10 s; the exact formula is checked by reading the code, not by timing.

Verdict

Prepared by: Claude (WP-001 session, continuing), on Jeff’s “continue” of 2026-11-14 Date: 2026-11-14


After execution — lessons learned

Lesson: trace the caller, not just the callee. WP-001 had labelled the sprite tick, but its unit lived two calls up, in the game loop’s × 36 / 1000. A vtable search on the function pointer found the tree walk, and the tree walk’s only caller held the rate.

Lesson: test a non-zero time, not just the start. Tick 0 had already matched in WP-016. Hashing every room again after 37 ticks put 89 rooms (55 + 34) through different steps, which checks the countdown and the wrap.

Lesson: default behaviour shows where scripts are missing. The looping root-beer sign and piano bench are correct for the default path and wrong for the game. They are a concrete list of per-room overrides for Phase 4.

Scope note: the lock held. One fork commit, staged by name. The ISOs were dismounted afterwards, and the captures stayed in the scratchpad.