docs: establish simulation architecture gate
This commit is contained in:
+48
-10
@@ -2,9 +2,11 @@
|
||||
|
||||
> Agent-facing context for understanding the project quickly.
|
||||
>
|
||||
> Snapshot basis: repository state after commit `b8752f8`, July 2026. Treat the
|
||||
> Snapshot basis: repository state after commit `0900022`, July 2026. Treat the
|
||||
> code as the source of truth when this document and the implementation differ.
|
||||
|
||||
See the [documentation map](README.md) for the authority and scope of each plan.
|
||||
|
||||
## Quick orientation
|
||||
|
||||
**The Steward** is currently a small Godot prototype for an embodied village
|
||||
@@ -358,9 +360,11 @@ creation, and some gameplay API responsibilities.
|
||||
`WorldViewManager` bridges simulation data to visible NPC nodes. It:
|
||||
|
||||
- instantiates `NpcVisual` scenes;
|
||||
- maps task strings to world markers;
|
||||
- resolves resource nodes, random wander targets, and remaining activity
|
||||
markers;
|
||||
- writes the selected ResourceNode ID onto the NPC as a transitional behavior;
|
||||
- sends targets to visuals;
|
||||
- reports arrival back to `SimulationManager`;
|
||||
- reports arrival and navigation failure back to `SimulationManager`;
|
||||
- applies visual death state.
|
||||
|
||||
### `player/npc/NpcVisual.gd`
|
||||
@@ -376,7 +380,8 @@ creation, and some gameplay API responsibilities.
|
||||
### `player/player.gd` and `player/camera_rig.gd`
|
||||
|
||||
These implement camera-relative character movement, physical interaction
|
||||
proximity checks, mouse capture, and the elevated follow camera.
|
||||
proximity checks, ResourceNode harvesting, mouse capture, and the elevated
|
||||
follow camera.
|
||||
|
||||
### `world/ui/ui.gd`
|
||||
|
||||
@@ -500,6 +505,26 @@ Use four conceptual layers:
|
||||
Do not make the simulation core depend on `Node3D`, scene paths, animation,
|
||||
physics frames, or a currently loaded map.
|
||||
|
||||
The authoritative-boundary decision is recorded in
|
||||
[ADR 0001](decisions/0001-simulation-authority-boundary.md). The current
|
||||
`ResourceNode` state and `WorldViewManager` target selection are transitional,
|
||||
not patterns to extend into inventories, schedules, or relationships.
|
||||
|
||||
### Authority and active-world adapters
|
||||
|
||||
Persistent mutable state belongs in versioned, serializable simulation records.
|
||||
Systems mutate those records. Godot nodes:
|
||||
|
||||
- present nearby records;
|
||||
- expose active-world interaction transforms and navigation results;
|
||||
- translate player input into simulation commands;
|
||||
- synchronize active position through an explicit adapter;
|
||||
- never become the only owner of a persistent amount, reservation, action, or
|
||||
identity.
|
||||
|
||||
Target selection may consume facts supplied by the active world, but the
|
||||
presentation bridge must not author an NPC's decision or persistent target.
|
||||
|
||||
### Stable identity
|
||||
|
||||
Every persistent entity should eventually have a stable ID:
|
||||
@@ -649,14 +674,25 @@ The project has two interleaved tracks.
|
||||
Every major systems milestone should produce a shareable visual behavior. Every
|
||||
visual milestone should support or reveal actual simulation state.
|
||||
|
||||
## Immediate milestone: the simulation garden
|
||||
## Immediate milestone: scaffold, architecture gate, then simulation garden
|
||||
|
||||
Before integrating Terrain3D into the playable runtime, migrate food and wood
|
||||
from abstract zones to finite resource nodes on the current flat test map. This
|
||||
keeps target-selection and resource-conservation debugging separate from terrain
|
||||
and navigation changes.
|
||||
Food and wood migration on the flat test map is complete. The next visual step
|
||||
is a deliberately minimal `JajceWorld` scaffold, greybox, navigation spike, and
|
||||
resource-placement proof. Do not proceed directly from that proof into
|
||||
open-ended beauty production.
|
||||
|
||||
The next coherent visual slice should then aim for:
|
||||
After the scaffold proves terrain and navigation, complete the architecture
|
||||
gate:
|
||||
|
||||
- deterministic clock and controlled random source;
|
||||
- fixed-seed headless scenarios with final-state checksums;
|
||||
- versioned serializable NPC, village, and resource state;
|
||||
- data-defined action and profession IDs;
|
||||
- separated action selection, execution, target resolution, and visual travel;
|
||||
- resource amount and reservation authority moved out of scene nodes;
|
||||
- explicit synchronization of active NPC position.
|
||||
|
||||
The coherent visual slice can then aim for:
|
||||
|
||||
- one attractive valley section;
|
||||
- six named villagers;
|
||||
@@ -713,6 +749,8 @@ These remain part of the vision, not the next implementation target.
|
||||
11. Use Conventional Commits.
|
||||
12. Update these documents when a decision materially changes the vision,
|
||||
architecture, milestones, or current-state description.
|
||||
13. Follow the authority order in [the documentation map](README.md); do not
|
||||
let a focused visual or migration plan silently redefine system ownership.
|
||||
|
||||
## Definition of “reusable for the future game”
|
||||
|
||||
|
||||
Reference in New Issue
Block a user