Skip to content

Pokemon Navigation: one movement mechanics table per game - #402

Merged
dayfine merged 6 commits into
nav/grid-story-stepsfrom
nav/move-mechanics
Nov 12, 2026
Merged

dayfine merged 6 commits into
nav/grid-story-stepsfrom
nav/move-mechanics

Conversation

@dayfine

@dayfine dayfine commented Nov 12, 2026 •

Copy link
Copy Markdown
Owner

Base: nav/grid-story-steps; no parent PRs; the diff shows only this change. Game PRs that read it: FRLG #403, BDSP #404.

AutoStory seam 2, PR1. Each game kept its movement numbers in its own place (FRLG's MovementMechanics, BDSP's route timing and tap constants), so the walker and the sim of each game, and a shared planner later, had no one table to read. This adds Pokemon/Navigation/Pokemon_MoveMechanics.h: per game, the turn tap, the step tap and its release, the start delay, a tile time per gait (walk, run, optional bike) on each screen axis, and whether open legs are tapped or timed holds (BDSP taps, FRLG timed holds on foot, as picked on 2026-11-11). One entry for BDSP and one for FRLG, with the values those games use today. Tested with the new Pokemon::MoveMechanics suite (one case per game) in the headless runner, built in both game trees.

🤖 Generated with Claude Code

https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss

dayfine and others added 2 commits November 11, 2026 19:37
Tap lengths, tile times per gait and axis, start delay and how open legs
are pressed (BDSP taps, FRLG timed holds on foot), with an entry for BDSP
and one for FRLG and a check of each.

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

@dayfine dayfine left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed SHA: a17a983

Reviewed against nav/grid-story-steps (this PR's own diff only). Shared infra (Pokemon/Navigation), so held to the infra bar.

Verdict

NEEDS_REWORK (changes needed)

The table is small and the values match their sources: BDSP 50/160/640/250 ms and 160/240, 100/150 match PokemonBDSP_AutoStory_RouteInput.h / RouteTiming.h; FRLG 267/133 (16 and 8 frames) and bike 100 ms match PokemonFRLG_MovementMechanics.h / PokemonFRLG_BikeSpinMechanics.h on #403. Code Health: 0 failures. The problem is the shape of the table, which is what this PR fixes in place for every later reader.

Findings

  1. (Medium) Tap timings are per game, but they differ per gait. step_tap / step_tap_release sit on MoveMechanics, while FRLG_MOVE_MECHANICS.bike says its open legs are STEP_TAPS. FRLG's on-foot step tap is 66 ms with a 700 ms release; the measured Bicycle taps are 40 ms at one per 100 ms (BIKE_TAP_PERIOD_WORKED, 60 ms release), and at a 60 ms period one in 12 drops. A walker that reads "this gait taps, so press step_tap/step_tap_release" gets the on-foot numbers on the bike. Since the point of the table is that the walker and the sim read their timings from it, put the tap (hold + release) on Gait (e.g. std::optional<StepTap> tap next to open_legs), or keep the per-game tap and say in its comment that it holds on foot only and that bike taps are not in the table yet. The first is better: the struct changes now rather than after FRLG's walker reads it.
  2. (Low) Scalars without initializers. TileTime::across/up_down, Gait::tile/open_legs and the Milliseconds members of MoveMechanics have no default member initializers, so a value-initialized aggregate is fine but a default-initialized one is indeterminate, and a field missing from a designated initializer warns on Windows Clang (-Wmissing-field-initializers). Give each one {} (or = Milliseconds(0), = OpenLegPress::STEP_TAPS), per "initialize every scalar".
  3. (Low) One failure message doesn't say what it expected and what it read. "Open legs on foot are not pressed the way the game's walker presses them." should name the expected and actual OpenLegPress for walk and run.

Notes (no change needed)

  • Fork Draft CI is red from the base, not this diff: Pokemon_StoryStepJson_Tests.cpp:150 fails GCC's -Werror=dangling-pointer on nav/grid-story-steps too. So no unit test of this PR has run in CI yet; the description's test claim rests on the local run.
  • Putting each game's entry in the shared header follows the 2026-11-11 pick (files in Pokemon/Navigation); fine.

dayfine and others added 3 commits November 12, 2026 00:12
…e messages name expected and actual (#402 review)

FRLG's Bicycle taps 40 ms at one per 100 ms, its walk 66 ms with a 700 ms
release, so the step tap moves from MoveMechanics onto Gait. Every scalar
gets a default, and the test reports which gait and which value failed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
dayfine added a commit that referenced this pull request Nov 12, 2026
Follows #402 moving the step tap onto Gait; same 160/640 ms, so presses
are unchanged. Also sorts the MoveMechanics include and drops prefixes the
file's using-declaration covers.

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

dayfine commented Nov 12, 2026

Copy link
Copy Markdown
Owner Author

Review addressed at 7f63e8b (fix: 78abee2).

  1. The step tap is now per gait: StepTap{hold, release} on Gait, replacing MoveMechanics::step_tap/step_tap_release. BDSP walk and run are 160/640 ms. FRLG on foot is 66/700 ms. The FRLG Bicycle is 40/60 ms, one tap per 100 ms (BIKE_TAP_PERIOD_WORKED). PokemonBDSP AutoStory: read movement times and taps from the shared table #404 now reads BDSP_MOVE_MECHANICS.walk.tap.
  2. Every scalar has a default: Milliseconds{}, and OpenLegPress::STEP_TAPS for open_legs.
  3. Each failure message now names the gait and the expected and actual values. The open-legs message says, for example, "Open legs running are pressed as step taps, expected a timed hold". The test also checks that every gait's tap is non-empty and that the turn tap is shorter than the walk and run taps. The bike tap is excluded from that last check because it equals FRLG's 40 ms turn tap.

CI base: the GCC -Werror=dangling-pointer failure at Pokemon_StoryStepJson_Tests.cpp:150 came from autostory/engine (#332). It is fixed there and merged down #360, #361 and #362, so this branch has it. TilePos also gained a defaulted <=> in nav/shared for #408/#412, merged down the same way. Local headless run: the Pokemon:: suites pass. Code health: 0.

@dayfine dayfine left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed SHA: 7f63e8b

Re-review after a17a983. I read the fix commit 78abee2 and this PR's own diff against nav/grid-story-steps (5 files). The other commits since the last review are base merges (#332 dangling-pointer fix, TilePos ordering) and are not reviewed here.

Verdict

APPROVED

Earlier findings

  1. Tap per gait: resolved. StepTap{hold, release} now sits on Gait, and MoveMechanics::step_tap/step_tap_release are gone. BDSP walk and run are 160/640 ms, FRLG on foot is 66/700 ms and the FRLG Bicycle is 40/60 ms. The FRLG comment cites BIKE_TAP_PERIOD_WORKED and the 60 ms drop rate. No remaining reader of the old fields is left in the tree at this SHA.
  2. Default member initializers: resolved. TileTime, StepTap and the MoveMechanics scalars use {}, and Gait::open_legs = OpenLegPress::STEP_TAPS.
  3. Failure messages: resolved. Each check names the gait and gives the expected and actual values (wrong_open_legs, empty_tap, turn_steps, not_faster). The new checks are reasonable: every tap has a non-zero hold and release, and the turn tap is shorter than the walk and run taps. Leaving the bike out of the turn check is correct, because BIKE_TAP_ONLY_TURNS = false on #403.

Fix diff

I found no correctness problems. Style is fine: CRLF, if (x){, designated initializers throughout, helpers in the unnamed namespace, and } // namespace closes. Code Health: 0 failures (advisory: the header has 7 symbols against the advisory 6 and the limit of 8).

Notes (non-blocking)

  • (Low, follow-up on #403) The bike tap is at the measured edge, not the period the walker presses. FRLG_MOVE_MECHANICS.bike->tap is 40 + 60 ms, so one tap per 100 ms (BIKE_TAP_PERIOD_WORKED). The FRLG walker on frlg/move-mechanics presses BIKE_TAP_PERIOD(120), which it describes as "slower than the chains that worked, so none is dropped". When #403 starts reading the tap from this table, decide which one the table holds. Either make the release 80 ms (what the walker presses) or say in the Gait::tap comment that it is the fastest measured chain and the walker adds margin. Until then there are two bike tap numbers.
  • Nits in the test file: open_leg_press_name is the only helper without a comment, and MoveMechanicsExpectation::open_legs_on_foot has no initializer. Neither blocks.
  • The "native-schema Runtime map reader" link failure comes from the base and is not part of this diff.

@dayfine
dayfine merged commit 0ac724b into nav/grid-story-steps Nov 12, 2026
13 of 16 checks passed
@dayfine
dayfine deleted the nav/move-mechanics branch November 13, 2026 03:26
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