ludic/packages/ludic.zones
Orkuncakilkaya 509b5ef111 ludic.zones: a player's radius never past no fog's 900 m
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>
2026-09-29 16:42:43 +03:00
..
tests ludic.zones: a player's radius never past no fog's 900 m 2026-09-29 16:42:43 +03:00
ask.ludic ludic.zones: a disc per player from their fog, merged into clusters; the simulating packages ask whether a place is simulated 2026-09-29 15:53:23 +03:00
index.ludic ludic.zones: a disc per player from their fog, merged into clusters; the simulating packages ask whether a place is simulated 2026-09-29 15:53:23 +03:00
merge.ludic ludic.zones: a disc per player from their fog, merged into clusters; the simulating packages ask whether a place is simulated 2026-09-29 15:53:23 +03:00
package.ludic ludic.zones: a disc per player from their fog, merged into clusters; the simulating packages ask whether a place is simulated 2026-09-29 15:53:23 +03:00
README.md ludic.zones: a player's radius never past no fog's 900 m 2026-09-29 16:42:43 +03:00
state.ludic ludic.zones: a player's radius never past no fog's 900 m 2026-09-29 16:42:43 +03:00

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.