Skip to content

AutoStory: shared screen events and judges; BDSP and FRLG adapters (#268) - #290

Merged
dayfine merged 12 commits into
bdsp/autostory-mine-floaroma-wipfrom
autostory/perception-events
Nov 9, 2026
Merged

dayfine merged 12 commits into
bdsp/autostory-mine-floaroma-wipfrom
autostory/perception-events

Conversation

@dayfine

@dayfine dayfine commented Nov 9, 2026

Copy link
Copy Markdown
Owner

Base: bdsp/autostory-mine-floaroma-wip (#284 and #289 already merged there); the diff shows only this change. The shared part is also on branch autostory/screen-events-core (based on nav/story-steps), merged in here, so FRLG and PLZA branches can take it without BDSP.

The perception pieces from #268 slices 1-4 (WarpSeen, fade_of, the TalkOver judge) lived in BDSP files, so FRLG and PLZA could not use them. This adds a game-agnostic ScreenEvent vocabulary and a ScreenEventObserver interface (plus a ScreenEventWatcher for run_until) in Pokemon/AutoStory, moves the warp and talk-over judges there over those events, and makes BDSP (BdspScreenObserver, the talk-over's former SceneEyes) and FRLG (FrlgScreenObserver: white dialog, selection box, battle menu/text, fades) the first adapters. BDSP behaviour is unchanged: PokemonBDSP::AutoStory is 144 passed / 0 failed / 7 skipped before and after; the shared story tests went from 75 to 80 passed (new Pokemon::ScreenEvents), and PokemonFRLG gains 3 passing adapter tests (the other FRLG and PLZA image tests fail locally only for lack of CommandLineTests images, same as before).

Moved unchanged into Pokemon_ScreenEvents.{h,cpp} / Pokemon_SceneJudges.{h,cpp}: WarpFade, fade_of, WarpSeen, describe(WarpSeen) from PokemonBDSP_AutoStory_Walk, and the TalkOver judge from PokemonBDSP_AutoStory_TalkOver (now reading ScreenEvents instead of SceneLook); see git diff --color-moved=dimmed-zebra --color-moved-ws=allow-indentation-change bdsp/autostory-mine-floaroma-wip...autostory/perception-events.

🤖 Generated with Claude Code

https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss

dayfine and others added 12 commits November 8, 2026 22:31
A game-agnostic vocabulary of what a story step sees (fades, location
banner, dialog and choice boxes, interact prompt, battle start/end,
player can move, screen still), an observer interface a game implements
with its own detectors, and a run_until watcher form that records events
and stops on chosen ones. The warp judgement (WarpSeen, fade_of) and the
TalkOver judge from BDSP's #284/#289 move here, expressed over the events.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
BdspScreenObserver (the talk-over's SceneEyes, made public) reports BDSP's
detectors as the shared screen events, and talk_over(), the walks and the
story sim use the shared TalkOver judge, WarpSeen and fade_of instead of
BDSP's own copies. Behaviour is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
FrlgScreenObserver maps the white dialog box, the selection box, the
battle menu and battle text, and uniform fades to the shared events.
Unit tests on synthetic frames; real frames are the detectors' own tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
The battle text box detector reads a flat grey frame as its box; that
frame is no real screen, so it tests nothing about the adapter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
ScreenEvents keeps its set operations; fades and the log text become free
functions (fade_events, fade_in, describe), WarpSeen::see becomes
note_warp(), and the tests use the case-table form.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
@dayfine
dayfine marked this pull request as ready for review November 9, 2026 07:48
@dayfine
dayfine merged commit 0d35443 into bdsp/autostory-mine-floaroma-wip Nov 9, 2026
19 of 23 checks passed
@dayfine
dayfine deleted the autostory/perception-events branch November 9, 2026 07:48
dayfine added a commit that referenced this pull request Nov 9, 2026
Moves #226's versions of these files into the PR that owns them. #226 commits:

0d35443 AutoStory: shared screen events and judges; BDSP and FRLG adapters (#268) (#290)
0192d6b BDSP AutoStory: a warp is a fade or a banner; walks report warps (#268 slices 1-3) (#284)
5493a9e BDSP AutoStory: routes never run along a wander zone; short wall legs walk every tile (#277)
71c3ed1 BDSP AutoStory: a wall leg that never moved waits, then plans from its start (#271)
0738cd5 BDSP AutoStory: 01.03 runs straight north up column 46 to the Center
f2567a2 BDSP AutoStory: a battle on a counted leg's first tap re-plans to the step's end
65e145a BDSP AutoStory: a battle on a route leg's first input re-plans too
a0d2204 BDSP walk: do not mark origin as preceding leg when movement moved chunks
f9d253b BDSP AutoStory: tag late encounter origin unknown only when chunks moved <= 1
5a16268 BDSP AutoStory: soft cost penalty for wandering hazards and wall check safeguard
9a2eb0a BDSP AutoStory: avoid wandering NPC hazards and simulate wandering NPCs
ac1ef0b BDSP AutoStory: align Oreburgh Mine maps, corridor legs, and Floaroma pathing

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant