ramble 0.9.4: a walkable opening frame, and the map travels with you - #334
Merged
Conversation
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.
Two things from walking with 0.9.3: the opening frame was too wide to be a walk, and "following" did not actually follow.
A walkable opening frame
The map opened at zoom 15. Measured at the player's latitude on a phone that is about 1.5 km across, which put most of the visible seed beyond any reasonable walk — and out along a freeway frontage with no footpath, which is worse than merely far.
The operator marked the area he would actually walk: roughly 63% of the frame, about 918 m. Zoom 16 is about 730 m — slightly tighter than marked, which errs on the walkable side. Extracted as
WALK_ZOOMrather than left as a second bare15, since it now appears in two places.Re-centring via the "Around you" chip keeps
Math.max(getZoom(), WALK_ZOOM), so it never zooms you back out past walkable but does keep a tighter zoom you chose yourself.Following now means centred
paintHereonly panned once the marker had drifted outside the middle 40% of the view (getBounds().pad(-0.3)). That reads as the map lurching every few hundred metres rather than travelling with you. It now recentres on any real move.The threshold stays at 10 m — the same floor the waddle uses, which clears typical high-accuracy GPS jitter (3–15 m), so standing still does not creep the map.
Panning this often is cheap here, and I checked rather than assumed: the
moveendwork is debounced 500 ms and coalesces, so a continuous walk collapses many pans into one round of fetches. And the area post does not depend onmoveend— it has an independent 75 m ratchet inside the geolocation watch, so a walk still reports itself even while pans keep collapsing the debounce.A manual drag still calls
setFollowing(false), so scrolling by hand releases the map and you are never fighting it; the chip turns following back on and recentres.⚠ Contract change: one test asserted the
pad(-0.3)gate. It now asserts the gate is gone and that the 10 m recentre replaced it, with a comment saying why.Verification
Full suite 4299/4299.
check-portsOK,build-registry --checkin sync. Backticks 0 and markup sinks 2 in the panel client. Ramble 0.9.3 → 0.9.4.Not fixed here, and worth a separate decision
Seed appearing along the freeway is not a rendering problem — those cells are genuinely unlocked, and the most likely reason is that they were driven through with the panel open, either live or via the backfill from
visit_placecredits. The game has no notion of how a cell was entered, so it cannot currently tell a walk from a commute. Options range from a speed gate on unlocking to leaving it alone; that is a design question rather than a bug fix, so it is not in this PR.