A 1 km fog gave a 1040 m zone, more of the world than no fog's 900 m (2405 MB and 1029 nav tiles against 2294 MB and 753 in the fog profile). zones_radius is min(max(fog + 40, 150), 900); the test holds 1 km and 860 m at 900. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
16 lines
968 B
Markdown
16 lines
968 B
Markdown
# ludic.zones
|
|
|
|
Where a world is simulated: a disc per player - `(x, z, r)`, `r = zones_radius(fog)`, that is the
|
|
fog distance plus 40 m, never under 150 m nor over 900 m, and 900 m with no fog - and the discs that overlap merged
|
|
into clusters with a bounding circle. Uses `ludic.base` and nothing else.
|
|
|
|
- `zones_set(pid, x, z, r)`, `zones_clear(pid)`, `zones_reset()`; `zones_merge()` once a frame
|
|
after the discs are set, for the clusters.
|
|
- `zones_contains(x, z)`: inside any disc. `zones_nearest(x, z)`: metres to the nearest disc's
|
|
edge, 0 inside. With no disc set, everywhere is inside (0) - a world before its first frame
|
|
freezes nothing.
|
|
- `zones_clusters()`, `zones_cluster_x / _z / _r / _n(c)`, `zones_cluster_of(pid)`.
|
|
|
|
The rules it keeps: fixed arrays of `ZONES_MAX` (16) slots, nothing made after the state; the
|
|
questions allocate nothing. A world gates its ticks on `zones_contains` so what is outside every
|
|
zone keeps its state and draws no dice.
|