Skip to content

FRLG: plan and walk overworld routes on decomp maps, starting with Cerulean Cave - #64

Closed
dayfine wants to merge 1 commit into
mainfrom
frlg/overworld-nav
Closed

dayfine wants to merge 1 commit into
mainfrom
frlg/overworld-nav

Conversation

@dayfine

@dayfine dayfine commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

FRLG programs that move on the overworld press fixed D-pad sequences with no map behind them. This adds maps generated from the pret/pokefirered decompilation (per-tile collision, elevation, one-way edges, warps and objects), a step check that follows the game's own GetCollisionAtCoords() including elevations and starting/ending Surf, a planner that searches across warps for legs to hold, Surf actions and a final turn, and a walker that holds each leg, waits out warp fades and answers the Surf prompt; Cerulean Cave's three floors are the first maps. Unit tests cover the step rules, the floors, a route from the cave entrance to facing Mewtwo on B1F (1F → 2F → 1F → B1F, surfing on the way, replayed with the step rules) and Mewtwo's tile being unreachable; all pass. Code only so far: the walker's timings are uncalibrated and nothing has been run on a console.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E

…rulean Cave

Programs that move around FRLG's overworld press fixed D-pad sequences with
no map behind them. FRLG moves exactly one tile per step, so a route planned
on the game's own collision data can be walked blind.

OverworldMap holds a map's per-tile collision, elevation and one-way edges,
warps and objects, and classify_step() follows GetCollisionAtCoords() from
pret/pokefirered: walls, one-way tiles, elevation (0 joins levels), and
starting or ending Surf at elevation 3. plan_overworld_route() searches over
map, tile, elevation, Surf and facing across warps and returns legs to
hold, Surf actions and a final turn; walk_overworld_route() walks them,
waiting out warp fades and answering the Surf prompt. The timings are not
yet calibrated on the console.

Cerulean Cave's three floors are generated from pokefirered ce6406d8c2ea.
Unit tests cover the step rules, the floors, a route from the entrance to
facing Mewtwo on B1F (replayed with the step rules) and Mewtwo's own tile
being unreachable.

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

dayfine commented Oct 30, 2026

Copy link
Copy Markdown
Owner Author

Superseded by #67, which has this code on the shared navigation core (#66).

@dayfine dayfine closed this Oct 30, 2026
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