perf: harden runtime for weaker hardware

This commit is contained in:
Rijad Zuzo
2026-08-12 10:02:45 +02:00
parent cd29da95e0
commit 34428d836a
47 changed files with 2164 additions and 243 deletions
+20 -4
View File
@@ -21,6 +21,7 @@ SimulationClock
-> EventKnowledgeSystem records, ranks, transfers, and retains bounded knowledge
-> RelationshipSystem applies evidence-gated social consequences
-> VillageOpportunitySystem projects one known unresolved need
-> ConflictSystem advances indexed combatants and authoritative combat outcomes
-> WorldViewManager presents travel, NPC state, and world-state cues
-> ActiveWorldAdapter supplies loaded-world positions/capacity
-> LoadedResourceSpatialIndex bounds finite-anchor discovery
@@ -48,9 +49,13 @@ would otherwise obscure that lifecycle:
- `simulation/conflict/ConflictSystem.gd` owns combatants (health, weapons,
factions, hostility), village/tribe faction records, wolf hostility, the
tribe war motivation decision (desire + victory confidence), raid spawning,
deterministic battle resolution, and war consequences. It emits combat and
war narrative facts and spawn/death signals that presentation binds to
`HostileCombatant` visuals;
deterministic battle resolution, and real pantry-backed war consequences.
Player commands are revalidated against authoritative life, faction, range,
and cooldown state. Player attack readiness advances in unscaled presentation
time; NPC battle cooldowns remain deterministic simulation ticks. Transient
NPC and sorted-combatant indexes bound stable-ID callbacks without entering
saves. It emits combat and war narrative facts
and spawn/death signals that presentation binds to `HostileCombatant` visuals;
- `simulation/events/SimulationEventLog.gd` owns ordered event identity,
history queries, and rate calculations;
- `simulation/knowledge/EventKnowledgeSystem.gd` owns per-NPC references to
@@ -82,7 +87,8 @@ would otherwise obscure that lifecycle:
`world/creatures/creature_visual.gd` is the shared root for creature
presentation: any `CreatureVisual` follows a simulation-owned position through
the navigation mesh, reports position changes, and plays a shared death
collapse. `HostileCombatant` extends it and builds its body from an
collapse. Failed paths keep their target and use bounded exponential retry
instead of querying navigation every physics frame. `HostileCombatant` extends it and builds its body from an
`EnemyDefinition`; `NpcVisual` and `AnimalNode` already follow the same
follow-the-authoritative-position contract, so future creatures (bears, boars,
archers) add a definition and a visual hook instead of a new movement system.
@@ -98,6 +104,16 @@ discovery uses their stable IDs and registration lifecycle, never a parent
path. Decorative siblings without a `ResourceNode` remain outside the index
and simulation state.
Player resource interaction uses the same radius-bounded loaded-anchor grid.
HUD proximity probes, the time dial, player status, and day/night environment
are presentation-only and update at human-readable rates rather than every
rendered frame. `JajceWorld` exposes reversible High, Balanced, and Low
presentation profiles with instance-local mutable render resources and owned
viewport scaling. The default Balanced tier reduces 3D scale, grass, shadow
coverage, and volumetric work, while Low can stop grass/effects without changing
simulation state or UI resolution. Forward+-only volumetric fog stays disabled
under Mobile and Compatibility feature selection, even when High is requested.
Outside the runtime lifecycle, `simulation/benchmark/` owns reusable,
schema-valid workload fixtures. CLI tools and headless scenarios consume those
fixtures; production simulation does not depend on benchmark code.