- ludic.wildlife: WildlifeWorld.push / pushed_x / pushed_z (defaults change nothing); a ground walker's step is slid clear of a still thing with a body from its species' size and scale, and a step that gets nowhere turns away as the water does. Birds are not pushed; no dice added. - ludic.npc: NpcWorld.push / pushed_x / pushed_z (a person 0.35 m round) in npc_walk, and NpcWorld.clear (default true), which npc_line_ok asks at 1 m so a detour does not cut a trunk. - ludic.aim: AimView.clear replaces AimView.ground and the ground march; the pick asks the line a body's width short of where the ray enters the thing (aim_clear_at(t, back)), so a solid thing does not hide itself. probe.ludic (the ground-agreement probe) and AimView.dry are gone. - ludic.photo: PhotoLens.clear replaces PhotoLens.ground, PhotoLens.trunk and the march. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
20 lines
1 KiB
Text
20 lines
1 KiB
Text
# ports.ludic - what the aim asks the game: the camera, whether a line is clear, and where the body
|
|
# stands. Unbound, a camera 1.5 m up at the origin looks down -z at nothing in the way, over the body.
|
|
export port AimView {
|
|
x: fn() -> float = fn aim__zero
|
|
y: fn() -> float = fn aim__eye
|
|
z: fn() -> float = fn aim__zero
|
|
fx: fn() -> float = fn aim__zero
|
|
fy: fn() -> float = fn aim__zero
|
|
fz: fn() -> float = fn aim__ahead
|
|
fov: fn() -> float = fn aim__fov # vertical, radians
|
|
clear: fn(float, float, float, float, float, float) -> bool = fn aim__clear # nothing between two points
|
|
body_x: fn() -> float = fn aim__zero # distances and reach are the body's, not the camera's
|
|
body_z: fn() -> float = fn aim__zero
|
|
}
|
|
|
|
function aim__zero() -> float { return 0.0 }
|
|
function aim__eye() -> float { return 1.5 }
|
|
function aim__ahead() -> float { return -1.0 }
|
|
function aim__fov() -> float { return 1.0 }
|
|
function aim__clear(ax: float, ay: float, az: float, bx: float, by: float, bz: float) -> bool { return true }
|