Skip to content

FRLG maps: wander boxes for people who walk on their own - #100

Merged
dayfine merged 3 commits into
mainfrom
maps/frlg-walkers-boxes
Nov 14, 2026
Merged

dayfine merged 3 commits into
mainfrom
maps/frlg-walkers-boxes

Conversation

@dayfine

@dayfine dayfine commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner

Only wanderers had a wander box, 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 a path instead: 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 check and map_overlays check pass locally.

🤖 Generated with Claude Code

https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss

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
dayfine and others added 2 commits November 13, 2026 20:45
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
dayfine marked this pull request as ready for review November 14, 2026 04:59
@dayfine
dayfine merged commit 49fdee7 into main Nov 14, 2026
6 of 8 checks passed
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