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 @@
|
|||
# ground.ludic - where a person can stand and walk: dry, gentle, allowed; a straight walk with no
|
||||
# water and no scramble on it; a spot in a ring, a spot toward something, and the nearest shore.
|
||||
# water, scramble or still thing on it; a spot in a ring, a spot toward something, the nearest shore.
|
||||
# A finder that succeeds leaves its answer in npc_px / npc_pz (and the water in npc_wx / npc_wz).
|
||||
|
||||
export function npc_px(npc_st: NpcState) -> float { return npc_st.np_px }
|
||||
|
|
@ -18,6 +18,7 @@ export function npc_line_ok(ax: float, az: float, bx: float, bz: float) -> bool
|
|||
var n = int(d / 1.5)
|
||||
if n < 1 { n = 1 }
|
||||
var prev = NpcWorld.ground(ax, az)
|
||||
if not NpcWorld.clear(ax, prev + 1.0, az, bx, NpcWorld.ground(bx, bz) + 1.0, bz) { return false } # a trunk, a tent
|
||||
for i in 1 .. n + 1 {
|
||||
let t = float(i) / float(n)
|
||||
let x = ax + (bx - ax) * t
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue