Consolidate documentation into architecture and merged guides
This commit is contained in:
1 parent
aec1fb7b69
commit
dee939c2ee
39 files changed
+795
-1203
No files matched your search
+91
-11
@@ -37,7 +37,7 @@ This document follows the structure of the arc42 architecture documentation temp
|
||||
- **MINOR** — new venues, NPC archetypes, systems, or features that are backward compatible.
|
||||
- **PATCH** — bug fixes and small polish that do not change behavior.
|
||||
|
||||
The single source of truth for the version is `config/version` in `project.godot` (currently `0.10.0-rc.1`). Each release is tagged in git as `v<version>` (e.g. `v0.6.0`). The `0.x` series is pre-stable, so MINOR bumps may introduce breaking changes while the prototype is still stabilizing. `tools/build_releases.sh` and `tools/publish_release.sh` read the version from `project.godot`, so bumping it there is the only required step before a release. The full bump checklist lives in [`RELEASING.md`](RELEASING.md).
|
||||
The single source of truth for the version is `config/version` in `project.godot` (currently `0.9.8`). Each release is tagged in git as `v<version>` (e.g. `v0.6.0`). The `0.x` series is pre-stable, so MINOR bumps may introduce breaking changes while the prototype is still stabilizing. `tools/build_releases.sh` and `tools/publish_release.sh` read the version from `project.godot`, so bumping it there is the only required step before a release. The full bump checklist lives in [`RELEASING.md`](RELEASING.md).
|
||||
|
||||
## 3. Context and Scope
|
||||
|
||||
@@ -128,6 +128,82 @@ Contracts that keep the pipeline replaceable:
|
||||
- UI/scene art is loaded through `UiArt` with a null/neutral fallback; composed images live in `assets/images/`, not in the docs reference tree (ADR-0014).
|
||||
- CI stays offline: only committed `.glb`/`.png`/`.tres` and Godot are needed; optional AI/Blender steps are reproducible development tools.
|
||||
|
||||
### Character and gear asset contract
|
||||
|
||||
The runtime NPC contract is intentionally narrow. It is enforced by
|
||||
`tools/blender_assets.py audit`, the GLB `inspect` path and the GDScript tests:
|
||||
|
||||
| Contract | Rule |
|
||||
| --- | --- |
|
||||
| Mesh node | `npc_base`, skinned under an armature imported as `Skeleton3D`. |
|
||||
| Core bones | `Head`, `HipL/R`, `KneeL/R`, `ShoulderL/R`, `ElbowL/R`, `HandL/R`, `Spine`, `Neck` at the frozen rest positions. Optional extra bones (fingers, face, toes) are allowed if they do not move the core rest positions or break `NpcAvatar` proxies. |
|
||||
| Tint slots | `skin`, `cloth`, `pants`, `accessory`, `hair`; fixed detail materials keep their authored colours. |
|
||||
| Orientation | Blender −Y / Godot +Z front, feet grounded near `y = 0`, metre scale. |
|
||||
| Budget | 16,000 triangles / 16,000 glTF vertices per character; 1,500 per gear piece; 4,000 per prop. The low-poly `npc_base` remains a fallback, not a second contract. |
|
||||
| Textures | 256² albedo + normal + packed ORM per slot; cloth/pants use the 4× `NPC_FABRIC_UV_SCALE` and skip per-character baked AO, while skin/hair/gear keep AO. |
|
||||
| Gear attach | Authored in attach-point space: head `Rig/Head` (0, 1.62, 0), back (0, 1.10, 0), chest (0, 1.30, 0), hand (±0.27, 0.78, 0.02); grip 5 cm below the origin. `GEAR_OFFSETS` and `HAND_ITEM_FORWARD` are runtime fit corrections, not authored-geometry changes. |
|
||||
| Fallback chain | Library variant → `npc_base.glb` → procedural `NpcAvatar` mesh. Committed GLBs and maps must keep CI offline and Blender-free. |
|
||||
|
||||
Asset types and their consumers:
|
||||
|
||||
- Library characters, gear and props: `assets/models/blender/**`, generated by
|
||||
`tools/blender_assets.py`; loaded by `NpcAvatar`/`WorldBuilder` with
|
||||
generated/procedural fallbacks.
|
||||
- Frozen base: `assets/models/generated/npc_base.glb`, generated by
|
||||
`tools/npc_pipeline.py`; the procedural avatar remains the last-resort path.
|
||||
- Maps: `assets/textures/npc/*_{albedo,normal,orm}.png` and baked AO maps; the
|
||||
mesh budgets and material wiring are checked by `audit`/`fit`/`texels` and the
|
||||
headless suite.
|
||||
- Editable `.blend` sources are development-only; only exported GLBs, AO/maps,
|
||||
manifests and committed review sheets are runtime/repository assets.
|
||||
|
||||
### Venue implementation contract
|
||||
|
||||
The three venues are authored by `WorldBuilder.VENUE_SPECS` and rebuilt through
|
||||
the `World` container when the venue changes; the guard, UI and checkpoint state
|
||||
survive. Venue data is content, while the following runtime rules are fixed:
|
||||
|
||||
| Venue | Real reference | Game implementation | Budget |
|
||||
| --- | --- | --- | --- |
|
||||
| Hollywood Boulevard | 6840 Hollywood Blvd / 1921 Masonic Temple | Six-column Masonic facade, eight steps, Walk of Fame, boulevard, Ovation arcade and neighbours | 58,884 tris / 409 meshes |
|
||||
| The Joke Shop | Fictional stand-in for 8433 Sunset Blvd | 27 m black hall, signature canopy, circular blade sign, red curtain bays, west entrance, hillside and neighbours | 25,828 tris / 518 meshes |
|
||||
| Late Night TV Studio | Same El Capitan block as Hollywood | Reuses the Masonic facade and steps with bulb canopy, car, barriers and studio-arrival staging | shares the Hollywood block; TV spec is a 30.0 m variant |
|
||||
|
||||
Venue rules:
|
||||
|
||||
- Coordinates are Godot metres; the guard's front is +Z. `VENUE_SPECS` owns
|
||||
facade dimensions, street/nav bounds, guard spawn, feature flags and prop
|
||||
placements; tests enforce the map budgets.
|
||||
- Collision and navigation remain mesh-based. Props that block walking need a
|
||||
`StaticBody3D` plus `NavigationObstacle3D`; the marquee, handrail, lantern and
|
||||
door are documented non-blocking exceptions.
|
||||
- Day/night is a phase offset on one geometry/scenario, not a second baked map.
|
||||
The venue menu's Night row starts in `LATE` while the checkpoint stores the
|
||||
offset.
|
||||
- Real-site references are evidence for shape/materials, not shipped assets.
|
||||
Licensed boards live under `docs/screens/refs/` with sidecars; local-only
|
||||
research stays in `tmp/research/` and is never committed.
|
||||
- The stylized geometry remains the runtime fallback if a future data-backed
|
||||
block or facade kit fails budget, navigation, visual or provenance gates.
|
||||
|
||||
### Persistence and save contract
|
||||
|
||||
Persistence is local-only under Godot's `user://` directory. The architecture
|
||||
owns the schema; operational locations and reset/rollback steps live in
|
||||
[`getting-started.md`](getting-started.md#save-data-and-migration).
|
||||
|
||||
| File | Contents | Compatibility |
|
||||
| --- | --- | --- |
|
||||
| `settings.json` | Camera/HUD/bindings/difficulty/audio/accessibility/tutorial flags | Schema-less compatible growth; missing keys merge from `Save.DEFAULT_SETTINGS`. |
|
||||
| `campaign.json` | Campaign index, completed venues, difficulty, shift number, last grade | Missing fields fall back to safe campaign defaults. |
|
||||
| `shift_results.json` | Completed-shift review history (array) | Append-only; unknown fields are ignored by readers. |
|
||||
| `shift_state.json` | Resumable checkpoint: version `1`, venue, guard/door/flashlight/body-camera state, coordinator snapshot, NPC rows | Versioned; unknown/missing state falls back rather than blocking boot. |
|
||||
|
||||
Writes go to a `.tmp` file and are renamed after the complete JSON is written.
|
||||
Corrupt or partial files are ignored on load; a failed replace leaves the prior
|
||||
valid file intact. The checkpoint deliberately excludes the tutorial overlay and
|
||||
transient input state.
|
||||
|
||||
### Character development tooling
|
||||
|
||||
Characters have two authored sources and one procedural fallback. The eight-variant
|
||||
@@ -144,7 +220,7 @@ GLBs and maps.
|
||||
| `tools/npc_pipeline.py` | Builds the skinned base avatar, five-slot material maps, palette and AI-fabric preparation (`prepare`/`palette`) | `npc_base.glb`, `assets/textures/npc/*_{albedo,normal,orm}.png`, `palette.json` | `audit_glb` against the 16,000-triangle / 16,000-vertex base contract (13 core bones required; extras allowed) |
|
||||
| `tools/blender_assets.py` | Builds/renders the library: 8 characters, 18 gear pieces, 20 props, plus `manifest.json`; stdlib `audit`/`fit`/`sheet`/`list` | `assets/models/blender/{npc,npc_gear,props}/*.glb` | Character cap 16,000 tris / 16,000 verts, 1,500 per gear, 4,000 per prop; grounding, UV, degenerate-triangle, attach-fit and manifest coverage checks |
|
||||
| `tools/bake_ao.py` | Bakes per-asset AO maps | `<asset>_ao.png` (256²) | Wired through `Materials.apply_ao()`/`SurfaceMaterials`; cloth/pants opt out (see below) |
|
||||
| `tools/npc_proportions.py` | Measures exported GLB rest pose (height, head, shoulders, hips, torso, limbs, feet) against the stylized guide | report / JSON in `docs/npc-proportion-audit.md` | All eight variants must stay inside the guide after a body change |
|
||||
| `tools/npc_proportions.py` | Measures exported GLB rest pose (height, head, shoulders, hips, torso, limbs, feet) against the stylized guide | report / JSON in `docs/npc-visual-review.md#proportion-audit` | All eight variants must stay inside the guide after a body change |
|
||||
| `tools/npc_baseline.py` | Assembles neutral-baseline sheets and before/after comparisons | `docs/blender_previews/sheet_npc_baseline*.jpg` | Human review against `docs/npc-visual-review.md` |
|
||||
| `src/test/capture_npc_baseline.gd` | Fixed-camera studio baseline, 8 variants × 6 views | local `tmp/` frames | Neutral silhouette/face/gear review |
|
||||
| `src/test/capture_npc_review.gd` | Final-context gate: 8 variants × 2 venues × day/night × 3 distances = 96 frames, crowd hidden, review-only `character_override` for the guard | local `tmp/` frames | Pre-build acceptance gate for gear fit and venue lighting |
|
||||
@@ -162,14 +238,14 @@ Runtime contracts that must survive any character change:
|
||||
- Cloth/pants use `Materials.NPC_FABRIC_UV_SCALE` (4×) and skip the baked per-character AO;
|
||||
skin/hair/gear keep AO. Do not reintroduce the blotchy cloth AO.
|
||||
- `apply_lod()` swaps to an impostor at 26 m; the 24-NPC budget smoke (6.94 ms, 168 meshes,
|
||||
131,616 triangles) is the performance gate. Changing either triangle cap requires
|
||||
152,464 triangles) is the performance gate. Changing either triangle cap requires
|
||||
re-measuring that smoke and the Web/Compatibility path.
|
||||
- Rebuild only the assets whose geometry changed (Blender GLB export is byte-nondeterministic),
|
||||
then run `godot --headless --path . --import`; never commit a no-op full rebuild.
|
||||
|
||||
Evidence and detailed contracts live in [`blender-assets.md`](blender-assets.md),
|
||||
[`npc-visual-review.md`](npc-visual-review.md) and
|
||||
[`npc-proportion-audit.md`](npc-proportion-audit.md); command-level usage is in
|
||||
[`npc-visual-review.md#proportion-audit`](npc-visual-review.md#proportion-audit); command-level usage is in
|
||||
[`asset-tooling.md`](asset-tooling.md).
|
||||
|
||||
### Local map development tooling (planned)
|
||||
@@ -359,17 +435,21 @@ architecture document.
|
||||
| Document | Canonical role | Relationship to this architecture |
|
||||
| --- | --- | --- |
|
||||
| [`PLAN.md`](../PLAN.md) | Product/design intent, pillars, venues and success criteria | Design source; architecture realizes it |
|
||||
| [`docs/gameplay.md`](gameplay.md) | Playable loop, escalation, venue mechanics | Runtime/behavioral view |
|
||||
| [`docs/gameplay.md`](gameplay.md) | Playable loop, escalation, tutorial, venue mechanics | Runtime/behavioral view |
|
||||
| [`docs/venues.md`](venues.md) | Real-site evidence, mapping decisions and deliberate simplifications | Runtime venues' evidence companion to §5 |
|
||||
| [`docs/architecture.md`](architecture.md) | System boundaries, data flow, constraints, deployment, cross-cutting decisions, quality risks | Single architecture source |
|
||||
| [`docs/adr/`](adr/) | Immutable decision records with context and consequences | Decision history linked from §9 |
|
||||
| [`docs/asset-tooling.md`](asset-tooling.md) | Build/audit/capture commands and pipeline usage | Operational appendix to the pipeline section |
|
||||
| [`docs/blender-assets.md`](blender-assets.md) | Blender character/gear/prop contracts and attach points | Detailed asset contract appendix |
|
||||
| [`docs/npc-visual-review.md`](npc-visual-review.md) | NPC baseline views, acceptance criteria and ranked visual gaps | Visual-QA appendix to the character tooling section |
|
||||
| [`docs/npc-proportion-audit.md`](npc-proportion-audit.md) | Measured proportions against the stylized guide | Measurement appendix to the character tooling section |
|
||||
| [`docs/npc-model-sourcing.md`](npc-model-sourcing.md) | Character-source evaluation, licence rules and the character-development plan | Supports the character tooling section and ADR-0015 |
|
||||
| [`docs/asset-tooling.md`](asset-tooling.md) | Build/audit/capture commands, optional Blender MCP and pipeline usage | Operational appendix to the pipeline section |
|
||||
| [`docs/blender-assets.md`](blender-assets.md) | Blender library art direction, roles, layout and checks | Operational asset appendix; contract lives here in §5 |
|
||||
| [`docs/npc-visual-review.md`](npc-visual-review.md) | NPC baseline views, acceptance criteria, visual gaps and proportion audit | Visual-QA appendix to the character tooling section |
|
||||
| [`docs/3d-model-review.md`](3d-model-review.md) | Scorecard, measurements and ranked asset gaps | Working review companion to §5 |
|
||||
| [`docs/npc-model-sourcing.md`](npc-model-sourcing.md) | Character-source evaluation and licence/prototype outcome | Supports the character tooling section and ADR-0015 |
|
||||
| [`docs/getting-started.md`](getting-started.md) | Setup, commands, controls | Developer onboarding |
|
||||
| [`docs/RELEASING.md`](RELEASING.md) | Release checklist and CI/publishing steps | Deployment appendix to §7 |
|
||||
| [`docs/smoke-checklist.md`](smoke-checklist.md) | Manual verification script | QA appendix to §10 |
|
||||
| [`docs/release-qa.md`](release-qa.md) | Manual smoke checklist and balance protocol | QA appendix to §10 |
|
||||
| [`docs/accessibility.md`](accessibility.md) | Accessibility features, statement and known gaps | Player-facing quality statement |
|
||||
| [`docs/known-limitations.md`](known-limitations.md) | Release blockers and accepted limitations | Player/release-facing risk statement |
|
||||
| [`docs/ui-copy.md`](ui-copy.md) | Screen/button inventory, copy audit and screen-judge report | Presentation appendix |
|
||||
| [`docs/development-status.md`](development-status.md) | Implemented features and current gaps | Status companion to the roadmap |
|
||||
| [`TODO.md`](../TODO.md) | Priority-ordered active tasks, unversioned development tracks and versioned roadmap | Planning source; no architecture duplication |
|
||||
| [`CHANGELOG.md`](../CHANGELOG.md) | User-facing release history | Release/version companion |
|
||||
|
||||
Reference in new issue
Block a user