WP-064: Phantom’s Maria game: balance the dishes on her trays (Gen 1)

Status: ✅ Done (2026-11-16) Phase: 4 (game logic) Depends on: WP-063 ✅ (the dining room), WP-055 ✅ (a set piece’s engine sprites), WP-037 ✅ (dragging with the mouse), WP-025 ✅ (no toolbar) Companion EC: none (inline checklist under Exit criteria) Estimated effort: A day Pre-flight: pre-flight-WP-064-2026-11-16


Result (2026-11-16)

The game played by WP-122 (2026-11-29). The self-test now plays it through the engine’s own event path. The deviation below, “a click is the fork’s button going down”, is gone: the items are now taken and let go on the button coming up, as the original reads them. It mattered for a drag, which the fork had turned into a carry.

The reference is wp065_ref.py: WP-063’s, plus Maria’s game, written from the trace before the engine ran. It flies the items itself, rounding to 32-bit floats after each step as the original stores them. It reads the art’s names and the disc’s clips, and never runs the engine. At script level 3 the chase check now has 10 Maria lines on Phantom (67 in all), and one on Showdown, which has no Maria game (221 in all).

The first run matched all 67 lines on Phantom and all 221 on Showdown, with no warnings.

Exit criteria:

  1. Against the reference: ✅ Phantom:
    • The items, 40 draws at each level: 6, 8 and 10 of them. Each is drawn, weighs 2, 1 or 4 as a cup or plate, rests on a floor of 443–469 at x 20–619 and depth floor − 393, and the set always splits into two equal trays.
    • The room: Maria HAPPY, stopped on step 2 at depth −10; the way out to the dining room; the hour’s timer.
    • A throw from (300, 200) at (4, 0): it lands at tick 32 at (428, 460), Maria.Spin while it flies and stopped a tick after, then Maria.Floor.Cup.
    • The right wall: x 639, its speed −6, Maria.Bounce; 633 the next tick.
    • Carried: taken with the cursor hidden and its offset kept, then let go at (360, 430). It is thrown at (4, −2), spinning forwards, with Maria.Throw.Cup, and the cursor shows again.
    • Into the first tray from (200, 120): it lands at tick 14 with Maria.Place.Cup. Maria is EXCITED on step 1 and the cup moves with the tray to (221, 170), at depth 1. She’s done balancing a tick later, and HAPPY again at tick 50.
    • The top item only: of two in a tray, the bottom one can’t be taken, and the top one goes back to depth 50.
    • Tipped over by 5: Maria goes to steps 1 and 0, then everything falls off at tick 3, back at its floor’s depth, and she comes back to 2.
    • Won with every item in a tray: MariaPuzzle at once, input held; 73 ticks later the way back to ROOM_P12_Dining_Room.
    • Showdown prints that it has no Maria game.
  2. Live, Phantom: ✅
  3. Build and diff: ✅ Scooby-only build: 0 errors, 0 warnings. The exit and click checks have nothing stuck. The room check is identical to WP-020’s (69 and 53 rooms). Showdown’s other checks are identical to WP-063’s run but for the clue name that varies by run, and Phantom’s but for the drawbridge’s random keys.
    • Fork commit 83b49202d2 (7 files staged by name) is pushed. Its item log line came after the check run; the room check and the live runs used the final build.

Deviations and gaps:

Found on the way:


Goal

Port Phantom’s Maria game, ROOM_Maria, split off from WP-063. Until now it had the base class: nothing in it set MariaPuzzle, so Maria never gave her clue.

Background

Maria’s game (scooby-exe): cups and plates on the floor are carried and thrown onto Maria’s two trays. She tilts by the difference in weight; past four steps everything falls off. Every item on a tray and the trays equal wins it.

Scope

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

Exit criteria

  1. Both titles match an independent reference line for line:
    • the items each level makes;
    • Maria, the way out, the timers;
    • a throw, a wall, an item carried and let go;
    • an item into a tray, Maria’s tilt and her return to HAPPY;
    • the top item only; a tip-over;
    • the win and the way back.

    Showdown prints that it has no Maria game, as its reference does.

  2. Live, in Phantom: a game played to a win, and Maria’s clue after.
  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