Universe generation: building blocks — design capture
Captured 2026-07-10 from owner spec. Universes assemble from BLOCKS, so every galaxy is random yet always carries its [markers].
Captured 2026-07-10 from owner spec. Universes assemble from BLOCKS, so every galaxy is random yet always carries its [markers].
Blocks
A block = a group of systems with internal lanes and relative galaxy positions, plus placement rules. Three kinds:
- Handcrafted anchors — the tutorial block is Eos/Karda/Veil exactly as authored today (safe loop + fold-gated Veil, see design-universe.md §5). Always present, always the start.
- Pre-setup set pieces — themed multi-system chunks dropped whole: pirate haven cluster, mining-rush belt chain, militia fortress line, black-hole research site, dead/ruined system pocket. Authored once, reused across universes; internal lanes/spawns/stations designed.
- Generated filler — single systems from the existing schema’s vocabulary (physical stellar classes + separate multiplicity, system features such as nebulae, planet classes, orbits, belts w/ dominant+trace minerals, danger tier, traffic), parameterized by position (danger rises with distance from the tutorial block; mineral tiers follow the economy ladder).
Generator sketch
Seeded (universe seed = reproducible):
- Place the tutorial block at origin.
- Place required marker blocks under constraints (min/max distance from start, min spacing, danger-band eligibility) — every universe GUARANTEES its markers: >=1 shipyard hub, >=1 voidite source (black hole), >=1 pirate haven, etc.
- Fill remaining space with generated systems along a rough density map.
- Wire lanes: intra-block lanes come with the block; inter-block/filler lanes generated (nearest-neighbor + a few long skips), all respecting the paired-endpoint model — generation may deliberately place dormant endpoints as discoverable content.
- Stamp danger tiers + market ledger seeds (design-economy.md).
Schema direction
- Block manifest JSON (id prefix “block.”): member system ids (or inline defs), relative positions, internal lanes, placement rules (rarity, distance band, uniqueness), marker tags it satisfies.
- Existing system JSON stays THE unit of content — a block references systems; generated systems emit the same shape at runtime.
- ContentDatabase learns “block.” routing; the generator becomes the thing that turns (seed, block library) -> a galaxy’s worth of StarSystemDefs + galaxyPositions + lanes.
SHIPPED (schema) 2026-07-11 — BlockDef (features/universe/
BlockDef.cs, prefix block. -> ContentDatabase.Blocks with member/lane/
placement validation), block.tutorial (features/universe/data/
tutorial_block.json), lane endpoint states (StarlaneDef.state +
LaneRules), and GalaxyScale (200,000 px/unit). No runtime behavior yet;
the generator itself is a later phase. See the decisions.md entry of the
same date.
Ordering
Depends on the continuous universe (batch 7) for placement to feel real, but the SCHEMA (blocks, marker tags, endpoint states) should land WITH batch 7 so the refactor builds against the final shape. Full generator + set-piece library = its own later phase.