Skip to content

BDSP AutoStory: count a tap as a step only if the view scrolled - #168

Merged
dayfine merged 16 commits into
bdsp/autostory-v4from
bdsp/view-shift
Nov 13, 2026
Merged

dayfine merged 16 commits into
bdsp/autostory-v4from
bdsp/view-shift

Conversation

@dayfine

@dayfine dayfine commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner

Depends on #128 (base bdsp/autostory-v4); the diff shows only this PR's change. Not for merge into the chain until a console run checks it.

Count a D-pad tap as a step only when the view scrolled, so moving scenery stops reading as our own movement.

  • The tap counters (WalkUntil's tap walks, which the planned routes use, and dpad_tiles()) counted any screen change over a line as a tile walked. Cloud shadows (r83, r84), TVs and the mine's conveyors passed it.
  • walk_view_shift() finds the scroll (±12 px on a 192x108 copy, player's box left out) that best lines up the frames before and after a tap. A step outside scrolls everything one way; scenery changes part of the view with no common scroll.
  • tap_moved(): outside, a tap moved if a scroll lines up at least twice as well as none. Inside, the camera can stay put while the player crosses a room, so the old screen-change line still decides there.
  • settle() keeps whole-screen change on purpose: a walking NPC with a still camera has to count as "not settled yet".

Testing

  • Suites: Walk (new synthetic test: a scroll east/south reads as scrolled with the right shift; a cloud-shadow band, a lit TV square and a changed player sprite don't); BDSP and Pokemon suites pass locally, apart from detector image tests whose images aren't in the local test folder.
  • Offline on r83/r84's Floaroma video (frame pairs 300 ms apart): standing pairs with screen changes up to 57 never read as scrolled; every walking stretch read a scroll 2 to 6 times better than none.
  • Console: not run yet. Watch an outdoor map edge where the camera stops following (a real step would read as blocked), and the mine (inside or outside to indoors()?).

🤖 Generated with Claude Code

https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E

dayfine and others added 3 commits November 2, 2026 07:27
The tap counters read any screen change as our own step, so cloud
shadows (r83, r84), TVs and conveyors counted as tiles walked. Outside,
the camera follows the player: walk_view_shift() finds the scroll that
lines up two frames around the player, and tap_moved() counts a tap only
if a scroll lines up at least twice as well as none. Inside, the camera
can stay put while the player crosses a room, so the old screen-change
line still decides there. WalkUntil's tap walks and dpad_tiles() use it.

Measured offline on r83/r84's Floaroma video: standing frames with screen
changes up to 57 never read as scrolled; walking read a scroll 2 to 6
times better than none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Walk_Tests.cpp: keep both Test_ViewShift and Test_PokemonCenterOnScreen,
their registrations, and both new includes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
@dayfine

dayfine commented Nov 2, 2026

Copy link
Copy Markdown
Owner Author

Do we really need this? seems complicated

dayfine and others added 13 commits November 2, 2026 12:58
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…w-shift

# Conflicts:
#	SerialPrograms/Source/PokemonBDSP/Programs/AutoStory/Utils/PokemonBDSP_AutoStory_Walk.cpp
The merge of bdsp/autostory-v4 brought back a call to still_chunk(), which
this branch replaced with tap_moved(); use tap_moved() there too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Walk.h is split upstream of here: the view-shift check (ViewShift,
walk_view_shift(), tap_moved()) moves, unchanged, into WalkScreen.h
next to the other screen-change measures. Its users include it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
@dayfine
dayfine merged commit ddccf0f into bdsp/autostory-v4 Nov 13, 2026
13 of 17 checks passed
@dayfine
dayfine deleted the bdsp/view-shift branch November 13, 2026 03:30
@dayfine

dayfine commented Nov 13, 2026

Copy link
Copy Markdown
Owner Author

Folded into #128 (merge ddccf0f).

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