Repository navigation
Pokemon Navigation: one movement mechanics table per game - #402
Conversation
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
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_013VUubhHeYSMGSSDXZkKZss
dayfine
left a comment
There was a problem hiding this comment.
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
- (Medium) Tap timings are per game, but they differ per gait.
step_tap/step_tap_releasesit onMoveMechanics, whileFRLG_MOVE_MECHANICS.bikesays its open legs areSTEP_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 pressstep_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) onGait(e.g.std::optional<StepTap> tapnext toopen_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. - (Low) Scalars without initializers.
TileTime::across/up_down,Gait::tile/open_legsand theMillisecondsmembers ofMoveMechanicshave 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". - (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
OpenLegPressfor walk and run.
Notes (no change needed)
- Fork Draft CI is red from the base, not this diff:
Pokemon_StoryStepJson_Tests.cpp:150fails GCC's-Werror=dangling-pointeronnav/grid-story-stepstoo. 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.
…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
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
|
Review addressed at 7f63e8b (fix: 78abee2).
CI base: the GCC |
dayfine
left a comment
There was a problem hiding this comment.
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
- Tap per gait: resolved.
StepTap{hold, release}now sits onGait, andMoveMechanics::step_tap/step_tap_releaseare 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 citesBIKE_TAP_PERIOD_WORKEDand the 60 ms drop rate. No remaining reader of the old fields is left in the tree at this SHA. - Default member initializers: resolved.
TileTime,StepTapand theMoveMechanicsscalars use{}, andGait::open_legs = OpenLegPress::STEP_TAPS. - 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, becauseBIKE_TAP_ONLY_TURNS = falseon #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->tapis 40 + 60 ms, so one tap per 100 ms (BIKE_TAP_PERIOD_WORKED). The FRLG walker onfrlg/move-mechanicspressesBIKE_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 theGait::tapcomment 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_nameis the only helper without a comment, andMoveMechanicsExpectation::open_legs_on_foothas no initializer. Neither blocks. - The "native-schema Runtime map reader" link failure comes from the base and is not part of this diff.
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 addsPokemon/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 newPokemon::MoveMechanicssuite (one case per game) in the headless runner, built in both game trees.🤖 Generated with Claude Code
https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss