diff --git a/decisions/architecture.md b/decisions/architecture.md index 693920e1f..0d3b9db94 100644 --- a/decisions/architecture.md +++ b/decisions/architecture.md @@ -335,6 +335,42 @@ Technical foundation decisions that constrain implementation: engine, client-ser - **Dissent:** None. - **Cross-reference:** D-100 (DamageOverlay + RegenerationStrategy full specification) +### D-110: Signed Z-Level Addressing — base_z u8 → i8 +- **Date:** 2026-02-27 +- **Decision:** All z-level base fields use signed integers (`i8`) instead of unsigned (`u8`). Specifically: `MultiBlockReservation.base_z: i8`, `FloorZone.z_level: i8`, and any struct that references a z-level position (not a count). Z-level *counts* (`z_levels: u8` on DistrictSkeleton) remain unsigned — they represent "how many floors", which is always positive. The distinction: `base_z` is "where does the bottom floor start" (can be negative for basements/subterranean spaces), `z_levels` is "how many floors total" (always ≥1). +- **Rationale:** The Round 4 workshop designs (D-106, D-108) and the gestalt gas explosion example explicitly assume negative z-levels (basements at z=-1 to z=-3, utility sub-levels). The existing `u8` type contradicts the design intent. A deep mine is structurally an inverted skyscraper with `base_z: -30, z_levels: 30`. Lazy z-level loading (`ZLevelLoadState`) works identically for negative z — the loading system cares about relative offsets between adjacent levels, not the sign. +- **Source:** Tyre architectural analysis, 2026-02-27. Confirmed existing Round 4 design intent (D-106 §height tiers, Gestalt Round 4 §gas explosion, Araminta Round 2 §infrastructure routing). +- **Raised by:** Tyre (type-level fix), lead (edge case prompt: basements, deep mines). +- **Dissent:** None. +- **Cross-reference:** D-106 (vertical scale architecture), D-094 (spatial hierarchy), D-108 (MobileChunk) + +### D-111: MobileChunk Idle State Covers Stationary Player Installations +- **Date:** 2026-02-27 +- **Decision:** The `MobileChunk` `Idle` movement state (D-108) is the canonical primitive for player-owned stationary installations — space stations, orbital platforms, parked vessels used as bases, or any persistent interior space the player controls that is not part of the district chunk grid. A stationary installation is a MobileChunk that does not move: it uses the same streaming, save/load, NPC simulation, and `LocalOverlay` modification system as vessels. Player construction within a MobileChunk (building rooms, placing equipment) requires the DLC construction system to emit valid `LocalOverlay` modifications — the architectural pattern is ready, the construction system is DLC scope. +- **Rationale:** A separate "location instance" system for player bases would require a new coordinate system, new streaming/loading path, new save/load path, portal/transition logic, and duplicate pathfinding/perception/simulation — Tier 4 difficulty for zero benefit over existing primitives. The `Idle` state already exists in D-108; documenting its design intent for stationary installations costs nothing and prevents future over-engineering. +- **Source:** Tyre architectural analysis, 2026-02-27. +- **Raised by:** Tyre (architectural mapping), lead (edge case prompt: player bases, fortresses). +- **Dissent:** None. +- **Cross-reference:** D-108 (MobileChunk specification — `Idle` state), D-100/D-109 (LocalOverlay for modifications) + +### D-112: No Separate Location Instancing System +- **Date:** 2026-02-27 +- **Decision:** The game does **not** use instanced locations (separate spatial domains outside the world chunk grid). All subterranean spaces, player bases, and special locations are represented using existing primitives: + - **Basements / sub-levels:** `MultiBlockReservation` with negative `base_z` (D-110) + - **Deep mines (shaft-style):** Downward `MultiBlockReservation`, lazy-loaded via `ZLevelLoadState` + - **Deep mines (cave network):** Organic-mode district (D-096) with mine-specific template + - **Player base in existing building:** `LocalOverlay` modifications (D-100/D-109) + - **Player base as hidden bunker:** `MultiBlockReservation` with negative z, generated at world-gen + - **Player-built space:** `LocalOverlay` + construction system (DLC scope) + - **Stationary installation:** `MobileChunk` in `Idle` state (D-111) + - **Vessel interior:** `MobileChunk` (D-108) +- **Rationale:** Instanced locations would require: (1) new coordinate system for instanced space, (2) new streaming/loading path, (3) new save/load path, (4) portal/transition logic between world space and instanced space, (5) duplicate pathfinding, perception, and simulation tier logic. Every edge case maps cleanly to an existing primitive. Nigel's vessel instancing proposal was already ruled out in favor of entity-carried MobileChunk (D-108 dissent note); the same reasoning extends to all "separate space" cases. +- **DLC/Mod implication:** `LocalOverlay` is the universal post-generation modification layer. DLC quest locations, mod-injected dungeons, and scenario-specific spaces can be delivered as overlay packages applied to existing districts under strict conditions — without touching the generator or reseeding. The generator output remains sacred (D-109); overlays are how the world changes after generation. This makes the overlay system the canonical content injection point for all post-generation content, whether player-driven, storyteller-driven, or DLC/mod-driven. +- **Source:** Tyre architectural analysis, 2026-02-27. +- **Raised by:** Tyre (comprehensive edge case mapping), lead (edge case prompt: deep mines, player bases, fortresses). +- **Dissent:** None. +- **Cross-reference:** D-110 (signed z-levels), D-111 (MobileChunk Idle for installations), D-108 (MobileChunk), D-096 (organic layout), D-100/D-109 (LocalOverlay) + --- -*29 decisions. Last updated: 2026-02-27 (D-096 through D-109 added — Generator Architecture Workshop #562)* +*32 decisions. Last updated: 2026-02-27 (D-110 through D-112 added — z-level and subterranean architecture)*