WP-059: Characters’ idles: blink, the two idles and the room’s idle line (Gen 1)

Status: ✅ Done (2026-11-16) Phase: 4 (game logic) Depends on: WP-020 ✅ (characters), WP-024 ✅ (the speech lock), WP-057 ✅ (the drawbridge) Companion EC: none (inline checklist under Exit criteria) Estimated effort: A day Pre-flight: pre-flight-WP-059-2026-11-16


Result (2026-11-16)

The reference is idle_ref.py, written from the trace before the engine ran.

The first run matched: 94 lines on Showdown and 93 on Phantom.

Exit criteria:

  1. Against the reference: ✅ Both titles:
    • Each character: its cap (3600, Scooby 108, the narrator 0x2F7600), its first countdown and the open hand.
    • Every state change with its tick, sequence, mode, line and next countdown: blinks, first idles with Velma’s P1 line, Scooby’s missing BLINK and the donkey’s, each stopped a tick, then back.
    • Clicks: the second idle, with Shaggy’s S1 line; the room’s line with the speech lock (P18_Tunnel_Lit.Idle.SCOOBY, P21_Mermaids_Cavern.Idle.…); Global.Idle.FRED and Global.Idle.VELMA where the room has none; nothing for Gummy, the donkey or Brad, who have no line.
    • The end: each character’s state and countdown, and the lock let go.
    • Phantom’s drawbridge: P01_Drawbridge.Idle.VELMA, then Global.Idle.VELMA with the puzzle done. Fred gets Global.Idle.FRED. Showdown prints that it has no drawbridge.
  2. Live: ✅ Through test_script, minimized:
    • Showdown’s lit tunnel: Scooby’s first idle and missing blink, and the others blinking, on their own. The open hand over Velma, Shaggy and Fred; a click on each played their second idle.
    • Phantom’s drawbridge: five clicks on Velma. Two played her second idle. Three said P01_Drawbridge.Idle.VELMA with lip sync, each taking the speech lock and letting it go. Shaggy’s first idle and the gang’s blinks came on their own.
  3. Build and diff: ✅ Scooby-only build: 0 errors, 0 warnings.
    • The room check is identical to WP-058’s run (69 and 53 rooms, 0 bad), and so to WP-020’s.
    • Every script check line before the idle check is identical to the fork’s run before this WP: 1720 on Showdown and 1047 on Phantom. The exceptions are random values that differ between any two runs: Showdown’s first imported clue, and the drawbridge’s colours in Phantom’s profile check.
    • Fork commit 87ef076bd6 (11 files staged by name) is pushed.

Deviations and gaps:

Found on the way:


Goal

Port the characters’ idles to the fork, for both Gen 1 titles. Until now a character stood in IDLE_MASTER forever:

Background

WP-057 ported Phantom’s drawbridge, whose class changes Velma’s idle line once the puzzle is done. The fork had no state 4 to ask for it, in any room of either title. The character code (scooby-exe) is the same in both titles, at the same addresses.

Scope

In scope (fork, engines/scooby/ only):

Out of scope:

Exit criteria

  1. Both titles match an independent reference line for line:
    • two rooms each, loaded as the base class: each character’s cap and first countdown;
    • every state change over 1500 and 900 ticks, with its tick, sequence, mode, line and next countdown;
    • clicks with the arrow: the second idle, the room’s line with the speech lock, a click while the lock is held, and characters with no idles or no line;
    • Phantom’s drawbridge line, before and after the puzzle.
  2. Live, through test_script, minimized, in each title: idles start on their own; a click plays the second idle or the room’s line.
  3. Scooby-only build: 0 errors and 0 warnings. The room check is identical to WP-020’s. The earlier script checks are identical to the fork’s before this WP. The fork diff stays inside engines/scooby/, staged by name.

Deliverables