Repository navigation
Description
Why
Walk a Character towards the Dock and it can never get past it. It climbs the
Dock's near side, walks along the top, steps off the far end — and is caught by
the side it just cleared, climbed back up, and put back on the top to do it all
again. Everything beyond the Dock, the screen edge it was heading for included,
is unreachable for as long as the app runs.
Reported against BMO walking left on a real desktop: it "hits the left display
wall while still on the dock, so it can't walk left, and never reaches the edge
to climb up, as it gets bounced back before the sprite visually reaches the
wall". The wall it hits is not the display's — it is the Dock's own left side,
a half-sprite out from the Dock and nowhere near the screen edge.
Evidence
The Engine alone, with the Dock at x 400..600 on a 1000-wide display, a
126-point sprite, and a held walk heading left:
70 Perched x=401 y=700 walking left along the Dock top
71 Falling x=399 y=700 steps off the left end
73 Climbing x=337 y=701 caught by dock_side_reached at dock.x - clearance
74 Perched x=463 y=700 dock_top_at puts it back on the Dock at dock.x + clearance
Frame 74 is frame 0 again. The cycle is four frames long and never ends.
What is actually true
dock_side_reached has no notion of which way the sprite is going. Anything
alongside the Dock and below its top is "at the wall", so a sprite that has
just stepped off the top — moving away, already clear of the Dock's own span —
is caught exactly like one walking into it. dock_top_at then completes the
loop by landing the climb back on the Dock.
wall_reached already had the missing rule, for the display edge, and says so:
Still over a display, so the only wall left is the outermost edge, and only
while the sprite is moving into it. Every inner edge is somewhere to cross
rather than something to catch.
The Dock's side never got it.
This is not #327. The same loop runs on main with the old fixed clearance of
64 — the leftmost point reached is 336 there and 337 with #328's per-Character
clearance, one point apart. #328 makes it neither better nor worse.
The decision
The Dock's side is a wall for a sprite moving into it, and not for one moving
away — wall_reached's rule, applied to the Dock.
Strictly behind the Dock there is no such reprieve, whichever way the sprite is
travelling: a real Dock is wide and the way out from under one is a long way
sideways, all of it unseen, which is what #176 decided. So the margin outside
the Dock's own span is directional, and the span itself is not.
The test for "behind" is strict, so a sprite level with the Dock's own edge
counts as being in the margin and may leave. That is the position stepping off
the top lands on, and treating it as behind would keep the trap shut.
The accepted cost: a sprite that comes to rest in the margin while moving
away — not walking, not thrown, just stopping there — stands overlapping the
Dock's edge by up to a half-sprite instead of being pushed clear. Reachable
only by a throw that runs out of speed in a band a half-sprite wide. Worth its
own fix in the resting inset if it shows up, rather than paying for it with a
wall in the middle of the floor.
Acceptance criteria
- A walk that steps off the Dock's top carries on past it and reaches the
display edge beyond, from either end. - A walk into the Dock's side still climbs onto the top (The sprite walks behind the Dock, where it cannot be seen or grabbed #176 unchanged).
- A Character dropped behind the Dock still climbs out of the nearer side,
whichever way it happens to be drifting.
Tests
A held walk off the Dock's top, asserted to reach the display edge without ever
being put back on the Dock — it fails on today's code at the fourth frame,
Perched at 463, which is the loop itself.
— Cursor agent, on @omesser's behalf.
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsDone
Activity