WP-055: Showdown’s Pie Noon: pies until the clock chimes, a snack a ghost hit (Gen 1)

Status: ✅ Done (2026-11-16) Phase: 4 (game logic) Depends on: WP-054 ✅ (the tree walk with sprite updates), WP-051 ✅ (the saloon), WP-021 ✅ (sprites and their hit tests), WP-019 ✅ (sound) Companion EC: none (inline checklist under Exit criteria) Estimated effort: A day Pre-flight: pre-flight-WP-055-2026-11-16


Result (2026-11-16)

The reference is wp056_ref.py: WP-054’s, plus Pie Noon, written from the trace before the engine ran. It reads the placements and step counts from the art, and which sounds are on the disc from the sound archives’ indexes. It simulates the pies and runners with floats rounded as the original stores them, and decodes the cels from the art for every hit test. It never runs the engine. At script level 3 the chase check now logs 208 lines on Showdown: the earlier 196 and 12 for Pie Noon. On Phantom both print the one line saying there is no chase.

The first run differed on 4 lines. Three were the check’s or the reference’s:

The fourth was the engine’s. The clock’s chime and its last tock play in the same tick, and the fork’s single handle for Sfx.dat let the tock cut the chime, so the room left at once. The original gives each clip a buffer of its own (0x43CC20). Effects now play on handles of their own, at most 16 at a time, and the second clean run matched all 208.

Exit criteria:

  1. Against the reference: ✅ Showdown:
    • The stage. Scooby 4–605 at 635, the ghost’s places 221, 288, 338, 403 at 210, the five starts by y, the four slopes, the lanes (the front one −553 to 1017), and the edges at three depths.
    • Entry. The overlays one in front of the middle and back lanes, the clock stopped on step level × 15 (0, 15, 30), the counter on 01, Scooby stopped at his walk’s left end, the ghost idle half way along its row; none of the gang’s places built; the Music and the Intro.
    • The ghost’s states. Each entered from idle: hit, a turn (a throw in the intro turns instead), walking, smoke at its place or along its row, hidden.
    • Runners. Fred right across lane 1 and Velma left across lane 0, each gone at tick 101 and 100, deleted, its slot free.
    • The ghost hit. A pie from x 276 flies 18 ticks, on step 9 for its last three (frame 9, read past PIETHROW’s end). It hits the idle ghost: its HIT, Ghost_Hit and a Good_Job line, snacks to 2, the pie on PIEHIT3, gone at tick 33, the ghost moving on at 34.
    • Runner hits. Fred: a miss at tick 50 (FRED_Miss isn’t on the disc), a hit at 51, Splat.0, running again at 78 after 26 hit ticks. Daphne: a hit at 47 and Splat.1.
    • Scooby hit. A ghost’s pie from x 240 hits him at tick 21: his HIT_L, Scooby_Hit, licking at 27, walking at 63.
    • Scooby walk. After the mouse at 15 a tick, stopped on step 7. No throw in the intro; then three throws, Scooby_Throw.2, .3, .1, one per press.
    • The ghost’s throw. Its pie at tick 222 from its place, Ghost_Throw and a Lookout line, idle again at 234.
    • The clock. The intro over at tick 216, Velma on at 228, the chime at 2340 after 60 ticks and tocks; the room stays while it plays, then the saloon.
  2. Live, Showdown: ✅ Through test_script, minimized, from a profile starting in Pie Noon, with eight throws at chosen places:
    • Scooby walked and threw five times, the three throw lines in turn; the other three presses came while he was hit or throwing. He was hit and licked the pie off five times.
    • Pies splatted Velma (Splat.0), hit the ghost twice (the counter from 01 to 03), and missed Fred twice and Shaggy twice.
    • The ghost threw, smoked and hid.
    • The chime came after 30 ticks and 30 tocks, then the saloon.
  3. Build and diff: ✅

Deviations and gaps:

Found on the way:


Goal

Make Showdown’s Pie Noon, ROOM_P32_Pie_Noon, play as the original does. The saloon builds it once Artie is free. Until now it had the base class:

Background

Pie Noon (scooby-exe):

The pies fly in a perspective the room works out from its placements: four edges from the ghost’s row to Scooby’s. Scooby, the ghost and the runners update themselves in the tree walk; the room’s tick moves the pies.

Scope

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

Exit criteria

  1. Showdown matches an independent reference line for line:
    • the class;
    • the stage: its places, slopes, lanes and edges;
    • every sprite on entry, and the clock by level;
    • the ghost’s states;
    • two runners across their lanes;
    • a pie on the ghost, two on runners and one on Scooby, each with its flight, ticks, sounds and what follows;
    • Scooby after the mouse, and his throws;
    • the ghost’s throw;
    • the clock to the chime and the saloon.

    Phantom prints that it has no chase, as its reference does.

  2. Live, in Showdown, from a profile starting in Pie Noon: Scooby walks and throws, and the clock’s chime leads back to the saloon.
  3. Scooby-only build: 0 errors and 0 warnings. The earlier checks and the room check are unchanged. The fork diff stays inside engines/scooby/, staged by name.

Deliverables