feat(packages): ludic.compass - bearing marks on a strip: marks gathered once a frame from an open registry of providers (CompassProviders), gated by the viewer's tier, sorted tracked / note / plain and culled to a cap; bearings and distances off the viewer's facing, the tracked mark, a capture that lets a guide hear the providers whatever the tier, the eight points, and the radar's range per tier with blips on a unit disc; the viewer through a port

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-25 09:35:52 +03:00
parent dc71fc986c
commit 1005a677f2
10 changed files with 453 additions and 0 deletions

View file

@ -0,0 +1,14 @@
# ports.ludic - what the compass asks the game: where the viewer stands, which way the strip
# faces and which compass is in the pack. Unbound, it stands at the origin facing -z (yaw 0) and
# carries every tier.
export port CompassWorld {
x: fn() -> float = fn cmp__zero
z: fn() -> float = fn cmp__zero
yaw: fn() -> float = fn cmp__zero # radians; 0 faces -z, and +yaw turns toward -x
tier: fn() -> int = fn cmp__every # 0 no compass: nothing at all is gathered
}
function cmp__zero() -> float { return 0.0 }
function cmp__every() -> int { return 1000 }
const CMP_PI: float = 3.14159265