Repository navigation
FRLG maps: wander boxes for people who walk on their own - #100
Merged
Merged
Conversation
People who walk back and forth (MOVEMENT_TYPE_WALK_UP_AND_DOWN, ...) or walk a sequence of directions (MOVEMENT_TYPE_WALK_SEQUENCE_*) stay within their start tile +- pret movement range, as wanderers do (IsCoordOutsideObjectEventMovementRange()), so they now get a `wander` box too, e.g. swimmer Spencer on Route21_North. Pairs keep to their axis, DOWN_AND_UP and RIGHT_AND_LEFT included. Regenerated the FRLG base and runtime maps (13 maps gain a box). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
A MOVEMENT_TYPE_WALK_SEQUENCE_* person doesn't roam their range box: they walk a fixed route along its edges. The generator now walks pret's rule (MovementType_WalkSequence*_Step1() and MoveNextDirectionInSequence() in src/event_object_movement.c, shortcuts read from the pinned source) on the map's collision, behavior and elevation grids and writes `path`: the tiles in order and the index the walk loops back to. Any collision other than COLLISION_OUTSIDE_RANGE makes them walk in place for good, which a path shows as a last tile looping to itself; no FRLG walker hits one. Route 11's Dave, given the whole 8x4 interior before, now walks down 4, right 8 and back. Local routing and the route drawings treat path tiles as the person's possible positions; the runtime schema validates them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
A walk-sequence path is now a list of legs, e.g. Route 11's Dave [["south", 4], ["east", 8], ["west", 8], ["north", 4]], walked from the NPC's coord with same-direction steps merged; `loop` is gone because every path returns to its start, which the generator now asserts. An NPC stopped for good at a wall gets "stuck" on the last leg. npc_path.path_tiles() is the one legs-to-tiles expansion that local routing, the route drawings and the runtime schema use; the schema also checks legs stay on the map and return to the coord unless stuck. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
dayfine
marked this pull request as ready for review
November 14, 2026 04:59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Only wanderers had a
wanderbox, so people who walk back and forth (WALK_UP_AND_DOWN, WALK_LEFT_AND_RIGHT, ...) showed as standing still; they now get their start tile +- range box, kept to their axis. Walk-sequence people (WALK_SEQUENCE_*) get apathinstead: legs from their coord, e.g. Route 11's Dave[["south", 4], ["east", 8], ["west", 8], ["north", 4]], from simulating pret's MoveNextDirectionInSequence() rule on the map's collision, behavior and elevation grids; every path returns to its start (the generator asserts it) and a wall stop would end in a"stuck"leg. Local routing, the route drawings and the runtime schema share one legs-to-tiles helper (npc_path.path_tiles); 13 FRLG maps change, base and runtime regenerated, and the publication test undoes the new fields on reviewed v1 maps (MtMoon_1F, Route25). Table tests cover the rule on tiny grids, the published legs, and legs expanding to the simulated walk for all 12 walkers; the full unittest suite, generator--check,runtime_map_pack,frlg_map_set checkandmap_overlays checkpass locally.🤖 Generated with Claude Code
https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss