feat(vehicles): 16.7 - a boat is a buoyant hull in the game's physics (VehicleHull), rowed along its bow and turned by the oars; the scripted bob, the wind's drift and the shore refusal are gone

The water floats the hull, the wind pushes every boat as a force, the lake bed stops it at the shore;
the swell takes the outward share of a stroke. ludic.physics: phys_hull_add (a buoyant box),
phys_row, phys_bow_speed, and a test that floats one a quarter under, rows, turns and grounds it.
The vehicles tests row a real Jolt hull on the fake shore; the horse moved to horse.ludic.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-27 01:33:19 +03:00
parent ac815bf638
commit 510360b002
12 changed files with 284 additions and 103 deletions

View file

@ -1,5 +1,6 @@
# ports.ludic - what a vehicle asks the world and its rider. Unbound, the world is dry flat ground
# with nothing in the way and no wind, and the rider is put exactly where asked.
# ports.ludic - what a vehicle asks the world, its hull and its rider. Unbound, the world is dry
# flat ground with nothing in the way and no wind, and the rider is put exactly where asked; the
# hull has no default - a boat is a body in the game's physics.
export port VehicleWorld {
ground: fn(float, float) -> float
water: fn(float, float) -> float = fn ve__dry # the surface over a point
@ -13,6 +14,21 @@ export port VehicleWorld {
gone: fn(Vehicle) -> void = fn ve__nothing # its owner left: take it away
}
# a boat's hull in the world's physics (Maroon Lake: a buoyant Jolt body), named by the vehicle's
# nid. The water floats it and the lake bed stops it; the package rows it and reads where it is.
export port VehicleHull {
put: fn(int, float, float, float, float) -> void # (nid, x, y, z, yaw): at rest there, made if new
row: fn(int, float, float) -> void # (nid, forward N, turn N.m) over the next step
drift: fn(int, float, float) -> void # (nid, fx, fz): a push across the water (wind)
read: fn(int) -> bool # (nid): its pose into x .. speed; false if none
x: fn() -> float
y: fn() -> float
z: fn() -> float
yaw: fn() -> float
speed: fn() -> float # along its bow, m/s
gone: fn(int) -> void # (nid): out of the world
}
# the body on board: the game's walking body (ludic.character, through the game)
export port VehicleRider {
board: fn(float, float, float) -> void = fn ve__board # (x, z, yaw)