feat(senses): walkers slide round still things, and lines of sight are the world's to answer
- 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>
This commit is contained in:
parent
d2cd775309
commit
56e4b6d688
24 changed files with 230 additions and 152 deletions
|
|
@ -1,5 +1,5 @@
|
|||
# ports.ludic - what the aim asks the game: the camera, the ground, and where the body stands.
|
||||
# Unbound, a camera 1.5 m up at the origin looks down -z over flat ground, with the body under it.
|
||||
# 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
|
||||
|
|
@ -8,8 +8,7 @@ export port AimView {
|
|||
fy: fn() -> float = fn aim__zero
|
||||
fz: fn() -> float = fn aim__ahead
|
||||
fov: fn() -> float = fn aim__fov # vertical, radians
|
||||
ground: fn(float, float) -> float = fn aim__flat
|
||||
dry: fn(float, float) -> bool = fn aim__dry # land, for the probe's viewpoints
|
||||
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
|
||||
}
|
||||
|
|
@ -18,5 +17,4 @@ 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__flat(x: float, z: float) -> float { return 0.0 }
|
||||
function aim__dry(x: float, z: float) -> bool { return true }
|
||||
function aim__clear(ax: float, ay: float, az: float, bx: float, by: float, bz: float) -> bool { return true }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue