docs: establish simulation architecture gate

This commit is contained in:
2026-07-04 19:55:30 +02:00
parent 0900022558
commit 83fc258afc
7 changed files with 288 additions and 56 deletions
+49 -24
View File
@@ -9,6 +9,10 @@ The immediate visual goal is to replace the flat prototype presentation with a
small, attractive, watchable environment while preserving the working NPC
simulation, player controls, UI, task lifecycle, and navigation behavior.
This is a scoped visual-production plan. Milestone order and architecture gates
are owned by [the learning roadmap](LEARNING_ROADMAP.md); simulation authority
is governed by [ADR 0001](decisions/0001-simulation-authority-boundary.md).
Before runtime terrain integration, food and wood should migrate from abstract
zones to actual finite world objects according to
[the ResourceNode migration plan](RESOURCE_NODE_MIGRATION.md). This prevents the
@@ -62,9 +66,9 @@ Main
└── UI
```
The player and `WorldViewManager` reference the task markers through exported
`NodePath` values. `NpcVisual` relies on the navigation map to reach those
markers.
The player and `WorldViewManager` still reference non-resource activity markers
through exported `NodePath` values. `NpcVisual` relies on the navigation map to
reach both those markers and ResourceNode interaction points.
Replacing the ground without respecting those references would break behavior
that already works.
@@ -89,9 +93,7 @@ Main
│ │ └── ResourceNodes
│ │ ├── BerryBush instances
│ │ └── Tree instances
│ ├── LegacyTaskMarkers temporary migration fallback
│ │ ├── FarmZone fallback only
│ │ ├── ForestZone fallback only
│ ├── LegacyTaskMarkers temporary non-resource activities
│ │ ├── FoodZone
│ │ ├── GuardZone
│ │ ├── StudyZone
@@ -250,7 +252,7 @@ This becomes both a regression reference and excellent before/after material.
There is a reproducible baseline showing the existing flat prototype and its
working behaviors.
### Systems prerequisite — Migrate food and wood targets
### Systems prerequisite — Migrate food and wood targets ✅ complete
Implement and validate the first ResourceNodes on the current flat map before
moving the playable runtime onto Terrain3D:
@@ -263,7 +265,7 @@ moving the playable runtime onto Terrain3D:
- extraction after work completion;
- depletion and replanning;
- actual extracted amount applied to the village;
- zone fallback with visible warnings.
- player interaction through the same extraction contract.
Keep the other task zones temporarily. Rest, eating, study, and patrol will
eventually use activity, storage, or workstation targets rather than pretending
@@ -335,6 +337,29 @@ The final navigation bake still happens after terrain and props stabilize.
One static frame contains the ridge landmark, roofs, river/waterfall, and
village work area. A test agent can traverse the intended task loop.
### Systems gate — Harden simulation authority
After the scaffold, greybox, and navigation spike prove the world shape, pause
visual production and complete the mandatory architecture gate from the
learning roadmap:
- deterministic clock and seeded randomness;
- fixed-seed headless scenarios and final-state checksum;
- versioned serializable NPC, village, and resource records;
- resource amount and reservation authority outside scene nodes;
- stable action/profession IDs and initial definitions;
- separate action selection, execution, target resolution, and visual travel;
- explicit active-position synchronization.
Do not solve this by moving simulation ownership into `JajceWorld`. The
environment remains a presentation and active-world query surface.
### Exit condition
The same scenario produces the same result without `main.tscn`; unloading a
visual does not change authoritative state; current resource and movement
behavior still pass regression tests.
### Phase 3 — Establish the beauty baseline
Add only the highest-value presentation:
@@ -366,7 +391,7 @@ Once the world composition is stable:
2. Disable or remove the old flat world only after the new instance is present.
3. Place or move bushes and trees under
`JajceWorld/WorldObjects/ResourceNodes` while preserving stable IDs.
4. Reconnect remaining player and `WorldViewManager` fallbacks to markers under
4. Reconnect only remaining non-resource activity markers under
`JajceWorld/LegacyTaskMarkers`.
5. Bake navigation for the new walkable area.
6. Test each existing task from multiple spawn positions.
@@ -538,25 +563,25 @@ The follow-up milestone is complete when:
- cinematic and debug views can show the same real scenario;
- a repeatable public-demo clip shows an autonomous cause and consequence;
- performance and navigation regressions are measured and documented.
- the mandatory architecture gate passes before final beauty integration.
## Immediate implementation order
1. Capture the current flat-map baseline.
2. Implement and validate ResourceNodes on the flat map.
3. Migrate food and wood; keep remaining zones as logged fallbacks.
4. Create `JajceWorld.tscn`.
5. Create dedicated Terrain3D data under `terrain/jajce/`.
6. Create `JajceLookdev.tscn` and its beauty camera.
7. Sculpt the ridge, river valley, terraces, and waterfall drop.
8. Place ResourceNodes and only the still-required legacy markers.
9. Block out the fortress, houses, mill, and bridge.
10. Run the early navigation spike.
11. Establish terrain materials, lighting, water, mist, and foliage.
12. Capture “Jajce Lookdev 01.”
13. Instance `JajceWorld` into `main.tscn`.
14. Reconnect fallbacks, rebake navigation, and regression-test the simulation.
15. Add profession/readability presentation.
16. Capture “Simulation Garden 01.”
2. Treat ResourceNode migration and player parity as complete.
3. Create `JajceWorld.tscn` and dedicated Terrain3D data.
4. Create `JajceLookdev.tscn` and its beauty camera.
5. Greybox the ridge, river valley, terraces, and waterfall drop.
6. Place ResourceNodes with stable IDs and only required activity markers.
7. Block out the fortress, houses, mill, and bridge.
8. Run the early navigation spike.
9. Pass the mandatory architecture gate before beauty production.
10. Establish terrain materials, lighting, water, mist, and foliage.
11. Capture “Jajce Lookdev 01.”
12. Instance `JajceWorld` into `main.tscn`.
13. Reconnect activity markers, rebake navigation, and run regression scenarios.
14. Add profession/readability presentation and the reason inspector.
15. Capture “Simulation Garden 01.”
Do not start with GIS data, a full city, a large asset pack, or more NPC
mechanics. The next proof is a beautiful stage for the systems that already