Skip to content

The Dock is a one-way trap: a walk that steps off its top is put straight back on #361

Closed

Description

@omesser

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

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.

Activity

  1. moved this from Todo to In Progress in Fidgeton Sep 5, 2026
  2. moved this from In Progress to Done in Fidgeton Sep 5, 2026
  3. added this to the V1 milestone on Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    • Status
      Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions