Skip to content

Physics: true union bounds and cross-display sizing #4

Closed

Description

@omesser

Depends on: #3

Already landed early, in #3

PR #22 implemented the integrator and most of this issue while building the Engine
seam. Kept rather than deleted and rewritten. Covered there, with tests:

  • Gravity, terminal velocity and landing — a_sprite_in_mid_air_falls_and_comes_to_rest_on_the_floor
  • Throw producing a ballistic arc — letting_go_with_velocity_throws_the_sprite_instead_of_dropping_it
  • Catching a display edge and climbing it — a_sprite_thrown_at_the_screen_edge_climbs_it_and_lets_go_at_the_top
  • Recovering a sprite that is outside every display — a_sprite_over_no_display_is_recovered_onto_the_nearest_one

Why this is still open

Bounds are currently the outermost edges of all displays, not the true union of
their frames. There is a ponytail: comment saying so on wall_reached in
src-tauri/src/engine.rs. A sprite dropped into the gap between two non-aligned
displays is therefore in a place no display occupies, and nothing brings it back.

That gap is the whole reason the spec says "union, not bounding rectangle".

Scope

  • Clamp to the union of visible display frames rather than their outer bounds, so
    the sprite cannot occupy a gap between non-aligned displays.
  • Crossing between displays of differing resolution at a stable apparent size.
    Backing scale factor stays resolved per display at render time, never in the
    Engine.

Acceptance criteria

  • The sprite never occupies a gap between non-aligned displays.
  • The sprite never leaves the union of visible display frames.
  • The sprite crosses between displays of differing resolution at a stable apparent size.

Tests

Engine tests over constructed snapshot sequences, including an L-shaped and a
diagonal two-display arrangement where the bounding rectangle and the true union
differ. Assert positions, not which integrator ran.


Spec: docs/SPEC.md · migrated from docs/issues/0004-physics.md

Activity

  1. 12 remaining items

  2. changed the title [-]Physics: gravity, throw, bounds, multi-monitor[/-] [+]Physics: true union bounds and cross-display sizing[/+] on Aug 27, 2026
  3. omesser commented on Aug 29, 2026

    @omesser
    OwnerAuthor

    Two corrections now that the crate split and the Character Package work have landed.

    The ponytail: comment moved. This issue points at src-tauri/src/engine.rs, which no longer
    exists — #33 moved the Engine into the core crate. The comment is now
    crates/core/src/engine.rs:332,
    still on wall_reached, still saying the same thing.

    This overlaps with #39, and the two have to agree. They are the same rectangle approached from
    opposite sides:

    • This issue changes how physics clamps: the union of visible display frames rather than their
      outer bounds, so a sprite cannot sit in the gap between non-aligned displays.
    • The sprite comes to rest behind the Dock, not on it #39 changes what that rectangle is: the usable frame rather than the hardware frame, so the
      sprite rests on the Dock's top edge instead of behind it.

    Both land on snapshot.displays, and floor_under, ceiling_over and wall_reached all derive
    from it. Whichever ships first should leave the other a rectangle it can narrow without rework —
    and neither should special-case the floor, since one narrower rectangle corrects the floor, both
    walls, and the ceiling at once.

  4. 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

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions