feat(vehicles): 16 - a horse walks on legs in the game's physics (VehicleLegs): the package keeps its pace, stamina, hay and its refusal of water; the legs meet the ground, its steps and slopes and whatever is in the way, and what they cover along its heading is its speed, so a fence stops it and a trunk it glances pushes it aside. VehicleWorld.blocked is gone; the hire, hay and follow verbs move to keep.ludic
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
1fc01df39c
commit
bb2a4c10af
9 changed files with 156 additions and 74 deletions
|
|
@ -4,7 +4,6 @@
|
|||
export port VehicleWorld {
|
||||
ground: fn(float, float) -> float
|
||||
water: fn(float, float) -> float = fn ve__dry # the surface over a point
|
||||
blocked: fn(float, float, float) -> bool = fn ve__open # (x, z, r): a collider in a horse's way
|
||||
swell: fn(float, float, float, float) -> float = fn ve__calm # (x, z, fx, fz): 0..1 of a stroke lost
|
||||
wind: fn() -> float = fn ve__zero # 0..1
|
||||
wind_yaw: fn() -> float = fn ve__zero # the yaw the wind pushes toward
|
||||
|
|
@ -56,10 +55,12 @@ export state VehiclesState {
|
|||
ve_rail_yaw: float = 0.0
|
||||
ve_have_dock: bool = false
|
||||
ve_swell_said: float = 0.0
|
||||
ve_lx: float = 0.0 # the unbound legs' pose
|
||||
ve_ly: float = 0.0
|
||||
ve_lz: float = 0.0
|
||||
ve_fact_q: Queue<VehicleFact> = ve_fact_q__new()
|
||||
}
|
||||
function ve__dry(x: float, z: float) -> float { return -10000.0 }
|
||||
function ve__open(x: float, z: float, r: float) -> bool { return false }
|
||||
function ve__calm(x: float, z: float, fx: float, fz: float) -> float { return 0.0 }
|
||||
function ve__zero() -> float { return 0.0 }
|
||||
function ve__next(vehicles_st: mut VehiclesState) -> int {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue