Repository navigation
fix(engine): Climb the Dock's side instead of walking behind it - #181
Merged
Merged
Conversation
cursor
Bot
force-pushed
the
fix/dock-side-is-a-wall
branch
from
September 2, 2026 04:47
e977857 to
ca6b1f0
Compare
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
omesser
force-pushed
the
fix/dock-side-is-a-wall
branch
from
September 2, 2026 10:12
0f324e7 to
9dae497
Compare
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.
Why
A walk along the display floor beside the Dock carried on under it. #145 gave the Dock its true bounds and dropped the floor beside it to the display's real bottom, so the floor runs under the Dock; the Engine treats the Dock as a surface to stand on and never as an obstacle, so nothing stopped horizontal travel there. The sprite ended up behind the Dock, where it can be neither seen nor grabbed. #145 named this as the limitation it left behind.
What
The Dock's side is a wall, and the wall is climbed onto the Dock's top — a Perch the sprite already knows how to stand on.
dock_side_reached(inengine/geometry.rs) finds a sprite the Dock hides and names the nearer side to stand clear of. The Engine recognises the Dock by its Perch's reserved id, the one thing it now knows about the Dock.EDGE_CLEARANCE) out from the Dock's own edge, because a sprite centred on that edge is already half hidden. Strictly inside that line, so the sprite this places is beside the Dock and stays there: the walk stops going forward instead of being set back, which is the fix(engine): A walk is not stationary, so the edge inset leaves it alone #141 stutter it must not repeat.window_source::centered_indoes. The display's bottom is the lower bound, not the Dock's, because the real Dock stops short of the floor the sprite walks on.Contact::Wall, so the existing transition makes itClimbing. A fall that arrives behind the Dock — a low throw, or letting go with the cursor over it — catches the same side, through the sameor_elseonwall_reached.Contact::Landed(Perch)) instead of carrying on to the ceiling, and steps half a sprite in from the corner it climbed, so the whole sprite is on the Dock andperch_atagrees that is where it stands.Climb rather than turn: the Dock's side is the same shape of problem as a display edge, and the top is a surface the sprite already stands on, so nothing new is owed by any Character. A drop from above onto the Dock's top is untouched and still lands normally, because the Falling branch tests the pre-step y and such a sprite is never below the top. Also untouched: a sprite already on the Dock's top, a hidden or side Dock (already modelled as absent), and every world without a Dock — the display-edge climb is unchanged.
How to test
cargo test --all-targets(457 tests),node --test tests/*.test.js(23),cargo fmt --checkandcargo clippy --all-targets -- -D warningsall pass.Notes
DOCK_PERCH_IDmoved fromsnapshot.rstowindow_source.rs, beside theWindowIdit is one of.snapshot.rsalready imports the Engine's types, so reading the const from there made the Engine depend back on the snapshot assembler; both now read it from the layer below them.The Engine does not clamp
dt, so a step longer than the Dock is wide would cross it unseen. The snapshot assembler capselapsed_msat one poll interval, which is what keeps a step small. That is pre-existing, and noted at the seam.Closes #176