Make the playground toys real mechanisms #113

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

The playground furniture is baked and drawn — the seesaw, the climbing frame,
the fitness station — but it is scenery. The seesaw is a plank on a fulcrum
that never tips, the swing is a frame with nothing hanging from it, and the
slide is a ramp you walk up.

These are the most obvious mechanisms in the campus, and a physics engine is
exactly what turns a mechanism into a mechanism. Rapier's joints are the
whole feature: a revolute joint for a hinge, a spring joint for a swing seat,
a rope joint for a zip line's cable, a prismatic joint for a slide.

The three toys

  • Seesaw: a plank on a revolute joint with a small angular limit. Weight
    on one end tips it. Two players on either end balance it, which is the first
    genuinely multiplayer playground toy in the campus.
  • Swing: a seat hanging from a revolute joint, with a spring or a cone of
    limits to stop it going over the bar. A player sits in it and pumps with the
    keys; the swing carries its own momentum.
  • Slide: a plank on a prismatic joint, or a ramp the player slides down
    with a low-friction surface. The simple version is a slope with a low
    friction coefficient, which needs no joint at all.
  • Zip line: the cable is the interesting part. A rope joint between the two
    posts gives a maximum distance, which is the cable; the handle slides down
    it under gravity. The playground with the zip wire is the only one of its
    kind in the extract, which is what makes it worth finding.

Where it fits

The playground props are baked — PROP_SEESAW, PROP_CLIMBING,
PROP_PLAYGROUND — and drawn by liuverse-scene::props as one triangle soup
per kind. A mechanism is two things: the static frame that is already drawn,
and a moving part that is not. The moving part is a SceneSpec object slot
like a scooter, because it moves and it is not part of the baked campus.

The joint bodies live in the physics world, which is server-authoritative, so
the swing's angle travels on the wire like a vehicle's pose does. The swing is
the simplest possible case: one angle, one position, one id. The seesaw is
the interesting one, because two players on it means both clients have to
agree about where the plank is, and the server is the only one that can say.

The hard part is the player on it

A player on a seesaw has to be carried by it. Rapier can carry a body — a
player standing on a moving platform is a kinematic body moving under a
dynamic one — but a player on a seesaw is not standing on it, they are
riding it, and the ride has to be a constraint rather than a contact. That
means the player body becomes a physics body while mounted, which is a bigger
change than the toy itself and probably wants the ragdoll work first.

The swing is easier and worth doing first: the player sits, the seat hangs
from a joint, and the seat carries the player because it is the same rigid
body.

Related

  • #110 the physics engine itself is the blocker.
  • #71 the playground bake is done; this is the part that makes it playable.
  • #114 the ragdoll comes first, because a player carried by a toy is a
    physics body and not a pose.
  • The sit pose is shared with the bench and the cafe.
The playground furniture is baked and drawn — the seesaw, the climbing frame, the fitness station — but it is scenery. The seesaw is a plank on a fulcrum that never tips, the swing is a frame with nothing hanging from it, and the slide is a ramp you walk up. These are the most obvious mechanisms in the campus, and a physics engine is exactly what turns a mechanism into a mechanism. Rapier's joints are the whole feature: a revolute joint for a hinge, a spring joint for a swing seat, a rope joint for a zip line's cable, a prismatic joint for a slide. **The three toys** - **Seesaw**: a plank on a revolute joint with a small angular limit. Weight on one end tips it. Two players on either end balance it, which is the first genuinely multiplayer playground toy in the campus. - **Swing**: a seat hanging from a revolute joint, with a spring or a cone of limits to stop it going over the bar. A player sits in it and pumps with the keys; the swing carries its own momentum. - **Slide**: a plank on a prismatic joint, or a ramp the player slides down with a low-friction surface. The simple version is a slope with a low friction coefficient, which needs no joint at all. - **Zip line**: the cable is the interesting part. A rope joint between the two posts gives a maximum distance, which is the cable; the handle slides down it under gravity. The playground with the zip wire is the only one of its kind in the extract, which is what makes it worth finding. **Where it fits** The playground props are baked — `PROP_SEESAW`, `PROP_CLIMBING`, `PROP_PLAYGROUND` — and drawn by `liuverse-scene::props` as one triangle soup per kind. A mechanism is two things: the static frame that is already drawn, and a moving part that is not. The moving part is a `SceneSpec` object slot like a scooter, because it moves and it is not part of the baked campus. The joint bodies live in the physics world, which is server-authoritative, so the swing's angle travels on the wire like a vehicle's pose does. The swing is the simplest possible case: one angle, one position, one id. The seesaw is the interesting one, because two players on it means both clients have to agree about where the plank is, and the server is the only one that can say. **The hard part is the player on it** A player on a seesaw has to be carried by it. Rapier can carry a body — a player standing on a moving platform is a kinematic body moving under a dynamic one — but a player *on* a seesaw is not standing on it, they are riding it, and the ride has to be a constraint rather than a contact. That means the player body becomes a physics body while mounted, which is a bigger change than the toy itself and probably wants the ragdoll work first. The swing is easier and worth doing first: the player sits, the seat hangs from a joint, and the seat carries the player because it is the same rigid body. **Related** - #110 the physics engine itself is the blocker. - #71 the playground bake is done; this is the part that makes it playable. - #114 the ragdoll comes first, because a player carried by a toy is a physics body and not a pose. - The sit pose is shared with the bench and the cafe.
sermuns added this to the Play milestone 2026-10-20 23:40:42 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
elsie/liuverse#113
No description provided.