WP-141: the Wizard’s Rule Room bottles don’t take a live player’s clicks (Gen 1)
Status: ✅ Done (2026-12-03): finding. The port matches the original; Jeff’s call is a “your turn” cue plus more forgiving timing, as WP-143. The diagnostic line is fork PR barefootbetters/scummvm#69.
Pre-flight (done): pre-flight-WP-141-2026-12-03, verdict FINDING.
Phase: 5 (polish)
Depends on: WP-083 ✅, WP-094 ✅, WP-133 ✅ (the bottles, played through the event path)
Found by: WP-087’s live run, 2026-12-02, EC-010 beat 20
Companion EC: none (inline checklist under Exit criteria)
Pre-flight: Required if the fix modifies engines/terraglyph/**.
Targets generation(s): Gen 1, Phantom of the Knight only.
Estimated effort: Half a day (most of it the diagnosis)
Goal
Find why Jeff couldn’t select the bottles in ROOM_P30_WFR during WP-087’s
live run, and fix it so a player can follow the wizard’s pattern with the
real mouse.
What the run showed
- Jeff, live (2026-12-02): “I’m unable to select the potions to match the color pattern”, with a screenshot of the room mid-song (the wizard dancing, the six bottles on the table, the arrow cursor over Scooby).
- Log (
C:\pcloud\scooby-engine\verification\wp-087-2026-12-01\run1.log,--debuglevel=1, forkc1f2825762), 20:32:55–20:33:54. The room opened (wfr: from ROOM_P24_Wizards_Bedroom, 5 lives), then five phrases in a row endedwfr: a beat missed, a glass breaksandwfr: N phrases missed of 5. Not one phrase was clean. Then camewfr: back to the wizard's bedroomand movie 11 (0xB), and the bedroom gave the wizard’s clue (Generated clue 3 (WIZARD_COUPON)). The run goes on, so this isn’t a progression blocker; but the room’s game can’t be played. - The level-1 log doesn’t show whether any click reached
WizardsRuleRoom::click()(wfr_rooms.cpp:371); the beat lines are level 2 (wfr_rooms.cpp:453).
Leads (to check, not conclusions)
- Timing, not hit-testing. It’s a rhythm game: a click counts only on the player’s own beat (8–15 of each 16-beat phrase), on that beat’s bottle (WP-094). A player who clicks the pattern after the wizard finishes, at their own pace, misses every beat. That may be the original’s design, with a feel the port doesn’t convey (no cue for “your turn”).
- The click path. WP-133 (fork
1b5db3fc40) clicked a bottle throughhandleEvent()and lit it on beat 8, and its live session saw the open hand over a bottle. Since then, fork PRs #61 and #62 (Hotspot Magnet, WP-106 and WP-107) added nav targets to this class. By reading, they don’t touchclick()or the tick; confirm it on a run. - The cursor. The decompile shows the open hand over a bottle when the mouse is below row 240. Jeff’s screenshot shows the arrow, over Scooby, above the bottles. See whether the hand ever showed.
Scope
In scope
- A live or session-driven replay of the room at
--debuglevel=2with--logfile, clicking the bottles in the wizard’s order, on the player’s beats and off them. Record which clicks reachclick()and on which beat. - A fix for whatever differs from the decompile, in its own fork PR with a self-test line, or, if the port matches the original, a written finding and Jeff’s call on whether to add a “your turn” cue.
Out of scope
- The song’s clock and the phrase table (WP-094), unless the replay shows them wrong.
Exit criteria
- The replay’s log, named, shows a click on a lit bottle on the player’s
beat reaching
click()and counting.replay1.log, 06:59:18:click at 471,432 on 6 OBJ_WFR_BOTTLES, thenwfr: a click on the YELLOW bottle at beat 25.48 (18467 ms): counted(beat 25’s bottle is YELLOW). - Not met. Jeff, or a watched session, plays a clean phrase with the real mouse
(
wfr: a phrase played clean). No phrase was played clean in the replay. With the finding, Jeff decided to make the room easier rather than ask for the original’s difficulty to be beaten, so a clean phrase with the real mouse moves to WP-143’s exit criteria. - The self-test matches its baseline but for the random keys and any
line the fix changes on purpose. All 16
wizard's rule room checklines match; the only new lines are the diagnostic ones (§Result).
Result
Finding: the port matches the original. There was no defect to fix. Every claim is Gen 1, Phantom. Evidence labels: source, self-test, log (Jeff’s replay), live — Jeff (his words).
The replay (log). C:\pcloud\scooby-engine\verification\wp-141-2026-12-03\replay1.log,
fork e5cbe578a3 (the tip b59ea35fd8 plus the diagnostic line below),
start_room=ROOM_P30_WFR, --debugflags=script,input,graphics --debuglevel=2,
2026-12-03 06:58:59–06:59:34. Jeff played three phrases, then left through the
exit.
| Phrase | The wizard’s bottles | Jeff’s clicks (beat, verdict) | Outcome |
|---|---|---|---|
| 1 (beats 0–15) | RED GREEN BLUE on 0–2, done by 1.47 s | none by beat 8 (6.03 s); RED 11.12, GREEN 13.49, BLUE 15.10, each a gap, lost |
the glass broke at beat 9 (6.53 s), before his first click |
| 2 (16–31) | PINK YELLOW RED on 16–18 | PINK 23.86 late in the beat, lost (about 100 ms before beat 24); YELLOW 25.48 counted; RED 27.17 a gap, lost |
beat 24 missed, so the glass broke at beat 25 |
| 3 (32–47) | BROWN BLUE YELLOW on 32–34 | none | the glass broke at beat 41; Jeff took the exit at 34 s |
Live — Jeff (2026-12-03): “it opened to the potion game but it wouldn’t let me select the potions in the name ordered, it went directly to a fail and bottle crash sound.”
The four leads.
- The beat window: the cause, and it’s the original’s. The port’s rule
is the decompile’s (
0x41C3A0; scooby-exe §”Played”). A click counts only on the player’s beat, in its first 0.49 (about 355 ms), on that beat’s bottle. What the player meets:- The turn comes late and unmarked. The player’s beats are eight after the wizard’s. After a three-bottle phrase that’s five silent beats, about 4.5 s after his last bottle. Only Scooby turning to dance marks the start of the player’s turn.
- The miss is called before a player at their own pace clicks. A missed beat breaks the glass at the player’s next beat: beat 9, half a second after the turn starts. That’s Jeff’s “directly to a fail and bottle crash”.
- A lost click is silent. No light and no sound, so the bottles seem not to take clicks at all.
- The window opens on the beat. A click a little early, the natural error on a rhythm, is lost.
- The click path: ruled out (log). All seven clicks reached the room,
and the one on its beat counted. The Hotspot Magnet isn’t on the mouse path
(source:
navTargetAt()is read only bymagnet_provider.cpp). - The cursor: ruled out (log).
ANIM_CURSOROPENover every bottle Jeff moved over. WP-087’s arrow was over Scooby, not a bottle. - The clock against the music heard: not the cause. The beats run 0.72 s apart on the song’s position. The clock leads the audio by the backend’s buffer (1024 samples, 23 ms, per the run’s header). That shifts the window slightly earlier against the music, which helps an early click. The log can’t measure the audible offset.
The diagnostic line (source, self-test). Added before the replay, because
the tip logged nothing for a click that counted or one lost late in a beat:
wfr: a click on the <COLOUR> bottle at beat <b.ff> (<ms> ms): <verdict>,
level 2, logged at the tick’s own exits, behaviour unchanged. Fork PR
barefootbetters/scummvm#69
(e5cbe578a3), open; Jeff merges.
Self-test (self-test). random_seed=140, against WP-140’s
seeded-wp140.log, which ran this tip’s tree (git diff 0ea2574dab
b59ea35fd8 is empty). WP-140’s two baseline runs give the noise floor.
| Lines | Baseline | This run |
|---|---|---|
wizard's rule room check |
16 | 16, identical |
wfr: a click on … (new) |
0 | 24: counted 18, the wizard's beat, lost 3, not the beat's bottle (RED), lost 1, a gap, lost 1, late in the beat, lost 1 |
| other differences | the build stamp, two FRED lip-sync lines, the debug-tools check’s 34 vs 38 ms: the noise floor |
the beat already played, lost isn’t exercised by any check.
Jeff’s call (2026-12-03). Asked whether to leave the room as the original has it, add a “your turn” cue, or add a cue plus more forgiving timing, Jeff chose “Cue + forgiving timing”: a cue when the player’s half starts, a window that opens a little before the beat, and a light or sound for a lost click. It’s a departure from the original and new work in its own packet, WP-143 (drafted 2026-12-03). WP-143 carries exit criterion 2, a clean phrase with the real mouse.