Swing the doors open #115

Open
opened 2026-10-20 23:40:45 +00:00 by sermuns · 0 comments
Owner

Doors are missing from the campus in a way that is easy to miss, because the
bake does draw them: MazeMap's interior walls carry door ribbons, and the
collider deliberately ignores them — ARCHITECTURE.md says interior walls have
"door ribbons never" blocking on their own floors. So a door is drawn on the
wall and there is no opening in it.

The building shell is different: an OSM entrance=* or door=* snapped to a
building edge becomes a gap in the collision wall, and that gap is the
only door in the campus today. There is no door that opens, no door that
swings, and no way for a player to hold one.

A hinge is a revolute joint with a motor, and a motor is two lines of Rapier:
set_motor_position(axis, target, stiffness, damping) and
set_motor_max_force(axis, max_force). The door is then a rigid body with a
handle you can push.

What it buys

  • Doors that open. Press E on a door and it swings. Walk into one and it
    swings out of the way, if it is a door and not a wall.
  • A door held open. One player holds a door for another. This is the
    multiplayer payoff, and it is the same kind of moment as the bus ride: a
    small physical thing that two people share.
  • Doors that are closed because something is behind them. A swinging door
    that knocks a player over is a physics engine being used for a joke.

Where it fits

The door ribbons are already baked — they are part of the interior wall data —
so this is not a bake change for the geometry. It is a bake change for the
collider, because a door with a gap is a different collider from a wall, and
the collision layer the physics engine needs has to be able to say "this
segment is a door, and the door has a hinge at this end".

The door body is a SceneSpec object slot like a vehicle: it moves, and it is
not part of the static campus.

The authority question

A door is shared, so it cannot be client-authoritative: two clients would
each swing their own door and the two would not agree. It is server-authoritative
like the vehicles, which means a door's angle is a number on the wire at 20 Hz.
That is the same shape as VehiclePose — an id, a position, an angle — so the
protocol already has a precedent for it.

The cost is a busier SceneSpec: the campus currently has a few hundred
moving objects at most, and every door on campus becomes one.

Related

  • #110 the physics engine itself is the blocker.
  • The interior wall collision is the same code, and it is where the door gaps
    are punched.
  • The walking character controller is what makes the door matter, since today
    a door is a wall you walk through.
Doors are missing from the campus in a way that is easy to miss, because the bake does draw them: MazeMap's interior walls carry door ribbons, and the collider deliberately ignores them — ARCHITECTURE.md says interior walls have "door ribbons never" blocking on their own floors. So a door is drawn on the wall and there is no opening in it. The building shell is different: an OSM `entrance=*` or `door=*` snapped to a building edge becomes a **gap** in the collision wall, and that gap is the only door in the campus today. There is no door that opens, no door that swings, and no way for a player to hold one. A hinge is a revolute joint with a motor, and a motor is two lines of Rapier: `set_motor_position(axis, target, stiffness, damping)` and `set_motor_max_force(axis, max_force)`. The door is then a rigid body with a handle you can push. **What it buys** - **Doors that open.** Press `E` on a door and it swings. Walk into one and it swings out of the way, if it is a door and not a wall. - **A door held open.** One player holds a door for another. This is the multiplayer payoff, and it is the same kind of moment as the bus ride: a small physical thing that two people share. - **Doors that are closed because something is behind them.** A swinging door that knocks a player over is a physics engine being used for a joke. **Where it fits** The door ribbons are already baked — they are part of the interior wall data — so this is not a bake change for the geometry. It is a bake change for the *collider*, because a door with a gap is a different collider from a wall, and the collision layer the physics engine needs has to be able to say "this segment is a door, and the door has a hinge at this end". The door body is a `SceneSpec` object slot like a vehicle: it moves, and it is not part of the static campus. **The authority question** A door is shared, so it cannot be client-authoritative: two clients would each swing their own door and the two would not agree. It is server-authoritative like the vehicles, which means a door's angle is a number on the wire at 20 Hz. That is the same shape as `VehiclePose` — an id, a position, an angle — so the protocol already has a precedent for it. The cost is a busier `SceneSpec`: the campus currently has a few hundred moving objects at most, and every door on campus becomes one. **Related** - #110 the physics engine itself is the blocker. - The interior wall collision is the same code, and it is where the door gaps are punched. - The walking character controller is what makes the door matter, since today a door is a wall you walk through.
Sign in to join this conversation.
No description provided.