feat: scale village queries and enrich Jajce center

This commit is contained in:
Rijad Zuzo
2026-07-16 23:51:08 +02:00
parent 4be72639d8
commit 2c88ed6ea8
48 changed files with 2059 additions and 280 deletions
+30 -8
View File
@@ -469,8 +469,10 @@ important history.
[Simulation scaling baseline 01](benchmarks/SIMULATION_SCALING_BASELINE_01.md)
sets the first local target at 600 data-only full-fidelity NPCs while preserving
deterministic state. Revisit that target when world presentation or LOD enters
the measured workload.
deterministic state. [Baseline 02](benchmarks/SIMULATION_SCALING_BASELINE_02.md)
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.
## Milestone 9 — Player interaction and social agency
@@ -862,15 +864,35 @@ workload exclusions, checksums, and local 50-ticks-per-second reference target
live in
[Simulation scaling baseline 01](benchmarks/SIMULATION_SCALING_BASELINE_01.md).
The immediate next slice should build one bounded per-tick population view for
the existing trusted-starving-subject query. That scarce-food path currently
rebuilds an all-NPC lookup for each applicable idle decision, making it the
first code-level candidate consistent with the measured superlinear growth.
Preserve exact selection/checksum behavior and rerun the same ledger before
choosing a spatial index or active/abstract LOD design.
The first measured optimization is also complete. `SimulationPopulationView`
builds stable-ID all/living/starving indexes once per tick, refreshes them after
each interleaved NPC update, and serves relationship/action queries without
entering saved state. Every baseline-02 checksum exactly matches baseline 01.
The 600-NPC case falls from 15,187.74 to 11,654.10 microseconds per tick, a
23.3% improvement, while small fixtures expose the expected fixed dictionary
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.
Recently completed:
- 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%.
- `Jajce Center 02`: matched before/after captures now document a larger summit
citadel, cascading timber-plaster homes, terrain-following turquoise river,
rock-framed waterfall, richer tree silhouettes, restrained conifer clusters,
oversized butterflies, and short camera-local grass that bends around real
player/NPC transforms without becoming simulation state.
- Deterministic simulation scaling baseline: schema-valid full-fidelity
fixtures, a repeatable CLI runner, and a fast headless regression now record
population throughput, phase timing, serialized-state growth, history