level-presets.ts

Named LevelConfig presets — one per biome. Each preset is a complete layout/visual config that loads into the playground or attaches to a planet. Designers edit via playground and push diffs back to this file.

⊰ Exports

SymbolKindPurpose
LevelPresetIdtypeUnion of 14 preset string IDs
LEVEL_PRESETSconstRecord<LevelPresetId, LevelConfig> — full preset bundle
LEVEL_PRESET_NAMESconstRecord<LevelPresetId, string> — UI display names

⊰ Preset roster

Fourteen biomes, six tutorial/origin + eight compact planet presets:

IDDisplayTerrainSpoke / Hub styleNotes
derelict_stationDerelict Stationasteroidshighway / stationTutorial default; Landing Site uses this
frozen_wreckFrozen Wreck Fieldasteroidsghost / craterIce-blue, faint spokes
volcanic_riftVolcanic Riftpillarsenergy / nexuspattern: 'rings', only non-chaotic preset
bio_organicBio-Organic Expanseasteroidsghost / craterSpore particles, green
sunrise_gridSunrise Gridcityhighway / stationLayout unified w/ Landing Site v5.163.6
voidstar_abyssVoidstar Abyssvoidstar_mixenergy / nexusPunch comes from planet enemyCountMult: 2.0
solar_flatsSolar Flatsasteroidsenergy / nexusAmber conduits
speed_circuitSpeed Circuitasteroidshighway / stationFast flow (speed: 1.5)
eden_groveEden Groveasteroidsghost / craterCharger swarms
old_earth_ruinsOld Earth Ruinscityghost / craterReuses sunrise city stamps; uses ‘grounded’ bake variant
network_gridNetwork Gridasteroidsenergy / nexusCyan data flow
delphi_crystalDelphi Crystalpillarsenergy / nexusPurple-violet
obelisk_pillarsObelisk Pillarspillarsenergy / nexusDense pillar maze
desolation_fieldDesolation Fieldasteroidsghost / craterRed tint, mortar/shooter suppression

⊰ Unified layout numerics

Post-v5.163.6, every preset shares the same hub/spoke/density skeleton — events spawn at identical rates across biomes; only terrainType + palette + visual flair (spokeStyle, hubStyle, particles, illumination, spokeFlow) differ.

Constant across all presets:

  • hubSize: 0.45, spokeWidth: 0.8, density: 0.99
  • ringRadius: 0.5, ringCount: 0.3 (except volcanic_rift0.6, 0.5)
  • blockSize: 0.5, stepSize: 0.5, amplitude: 0.5
  • terrainDensity: 0.85
  • pathableWilds: true
  • spawnZones: DEFAULT_SPAWN_ZONES
  • hubRMin/hubRMax: 200, spokeWMin/spokeWMax: 150

Differentiating fields: seed, pattern, palette, spokeStyle, hubStyle, terrainType, illuminationColor, illuminationSpeed, spokeFlow, hubParticles, dangerTint, lanternPreset.

⊰ Style enums in use

  • spokeStyle: highway | ghost | energy
  • hubStyle: station | crater | nexus
  • hubParticles: data | dust | embers | spores
  • terrainType: asteroids | pillars | city | voidstar_mix
  • lanternPreset: solar_flare | dawn | shatter
  • pattern: chaotic | rings

⊰ Design intent

  • Hub/spoke drive event eligibility — events spawn only in hub/spoke zones, so density is tuned high (density: 0.99, hubSize: 0.45) to make most of the explorable area count as clear.
  • Visual identity is the only per-biome lever that affects feel. Layout is identical; threat tuning lives on the planet config, not the level preset.
  • Volcanic Rift is the outlier — only preset with pattern: 'rings' and elevated ringRadius/ringCount.

⊰ EXTRACT-CANDIDATE

  • Massive constant duplication across 14 presets: hub/spoke/density/ring/block/step/amplitude/terrainDensity/pathableWilds/spawnZones/hubRMin/hubRMax/spokeWMin/spokeWMax all repeat verbatim. A BASE_LAYOUT spread ({ ...BASE_LAYOUT, palette, terrainType, ... }) would shrink the file ~60% and make the comment “layout numerics unified with Landing Site” structurally enforced rather than convention.
  • LEVEL_PRESETS + LEVEL_PRESET_NAMES are parallel records keyed by the same union — could merge into Record<LevelPresetId, { config: LevelConfig; name: string }> to prevent drift when adding new presets.