admin 37610242bf feat: add deterministic simulation foundation
Replace implicit randomness with seeded per-NPC RandomNumberGenerator
streams so the same seed always produces the same scenario outcome.

- Add SimulationClock (RefCounted): explicit fixed-step clock that
  converts frame delta into simulation ticks while preserving sub-tick
  remainder; replaces raw _process tick_timer accumulation
- Add simulation_seed export (int=1337) to SimulationManager; drive
  per-NPC RNG streams via seed + npc_id + stream_id derivation
  (stream 0=init, stream 1=wander)
- Add get_wander_offset(npc_id) to SimulationManager so wander targets
  are deterministic per seed; WorldViewManager calls it instead of
  local randf_range()
- Add get_state_snapshot() and get_state_checksum() to SimulationManager
  for headless verification and future save/load
- Convert SimNPC/SimVillage const DEBUG_LOGS to instance var debug_logs
  so headless tests can silence output without recompilation
- Pass RandomNumberGenerator through SimNPC._init() instead of using
  global randf_range() for hunger/energy/position/scoring noise
- Remove obsolete farm_zone and forest_zone exports from
  WorldViewManager and their marker/tree scene children from main.tscn;
  NPC gather tasks use ResourceNode exclusively
- Rename TaskZone container to ActivityMarkers in main.tscn and update
  all scene paths (player, WVM, tests) to match
- Add headless deterministic_simulation_test.gd: verifies clock
  accuracy, same-seed equality, different-seed divergence, and
  24-tick scenario checksum without loading main.tscn
2026-07-05 11:23:12 +02:00
2026-07-04 21:06:57 +02:00

Documentation map

The project uses a small hierarchy so overlapping plans do not become competing sources of truth.

  1. PROJECT_CONTEXT.md is the canonical description of the vision, current implementation, target architecture, and active constraints.
  2. LEARNING_ROADMAP.md owns milestone order, architecture gates, reusable-system exit tests, and intentionally deferred work.
  3. BUILD_IN_PUBLIC_PLAN.md owns the scoped Jajce visual slice. It must respect the architecture gates in the learning roadmap.
  4. RESOURCE_NODE_MIGRATION.md is a focused migration plan. Phases 14 are complete; its Phase 5 hands world placement to the visual-slice plan.
  5. decisions/ contains durable architectural decisions, including consequences and revisit conditions.

When documents disagree:

  • code and tests describe current behavior;
  • the newest accepted decision record governs architecture;
  • PROJECT_CONTEXT.md governs product intent;
  • LEARNING_ROADMAP.md governs what should be built next;
  • focused plans govern only their stated scope.

Update the smallest relevant set of documents after a decision or milestone. Do not copy full status tables into every plan.

S
Description
No description provided
Readme 48 MiB
Languages
GDScript 86.6%
GDShader 9%
PowerShell 2.4%
Shell 2%