feat: index loaded resource discovery

This commit is contained in:
Rijad Zuzo
2026-07-17 00:34:30 +02:00
parent 2c88ed6ea8
commit 5356c34fd7
21 changed files with 1392 additions and 69 deletions
+25 -9
View File
@@ -474,6 +474,12 @@ keeps identical final checksums after one reusable per-tick population view and
improves that case from 65.84 to 85.81 ticks per second. Revisit the target when
world presentation or LOD enters the measured workload.
[Loaded Resource Discovery 01](benchmarks/LOADED_RESOURCE_DISCOVERY_01.md)
proves the first real spatial consumer. Exact loaded-anchor resolution remains
near four inspected candidates from 18 through 1,800 resources, preserves every
linear selected-target checksum, and keeps persistent authority outside the
index.
## Milestone 9 — Player interaction and social agency
### Learn
@@ -873,18 +879,28 @@ The 600-NPC case falls from 15,187.74 to 11,654.10 microseconds per tick, a
cost. See
[Simulation scaling baseline 02](benchmarks/SIMULATION_SCALING_BASELINE_02.md).
The immediate next systems slice should now prove spatial discovery for the
world vision: index loaded finite `ResourceNode` anchors through
`ActiveWorldAdapter` so Terrain3D-authored sources can be placed much farther
apart without an all-node scan for every resolution. Preserve stable IDs,
current distance/risk/comfort/priority scoring, reachability, reservations,
player parity, unload/rebind authority, and exact deterministic outcomes. First
measure 18, 180, and 1,800 loaded candidates; do not choose a generic spatial
framework or active/abstract LOD mode before that real consumer proves the
contract.
The first loaded-world spatial consumer is complete. `ActiveWorldAdapter` owns
a disposable 24 m horizontal grid of loaded finite `ResourceNode` anchors.
`ActionTargetResolver` expands through nearby ranges and stops only when
authoritative risk/comfort/priority bounds prove that no farther source can win.
Matched 18/180/1,800-source samples preserve every selected-target checksum;
the 1,800-source case falls from 6,448.00 to 46.94 microseconds per resolution.
Unload/rebind state authority, stable tie order, moved anchors, reservations,
player parity, and a deliberately far high-priority winner remain covered. See
[Loaded Resource Discovery 01](benchmarks/LOADED_RESOURCE_DISCOVERY_01.md).
The immediate next slice should pair this systems foundation with the authored
world: sculpt the real Terrain3D river channel and waterfall shelf, rebake and
validate navigation, then use the first larger foliage/resource pass to prove a
bounded stable-ID anchor placement workflow alongside decorative Terrain3D
instancing. Do not generalize the resource grid to people/buildings/events or
introduce active/abstract LOD before those consumers need it.
Recently completed:
- Loaded-resource spatial discovery: a resource-specific active-world grid
preserves exact score winners and lifecycle authority while reducing the
reviewed 1,800-anchor query from 6.45 ms to 46.94 µs.
- Shared population query view: one transient per-tick all/living/starving
index replaces repeated scarce-food relationship scans, preserves exact
checksums, and improves the reviewed 600-NPC workload by 23.3%.