Spawn Grace Configuration
Per-planet pressure ramp at run start. The spawner’s graceRamp value (a 0→1 scalar on density) follows a three-phase curve keyed off planet.spawnGraceSeconds, so each planet decides how much breathing room the player gets before enemies arrive at full pressure.
The field
PlanetConfig.spawnGraceSeconds in data/planet-config.ts:
“Grace period before full spawner pressure (seconds). 0 = instant (Voidstar).”
Almost every planet ships spawnGraceSeconds: 1. The one exception is Voidstar (the leaderboard run), which sets spawnGraceSeconds: 0 — full spawn pressure from t=0 to match its enemyCountMult: 2.0 doubled-pressure mandate.
Three-phase ramp
Implemented in engine/enemies/spawner.ts (graceRamp block). The spawner reads PLANETS[world.planetId]?.spawnGraceSeconds ?? 1 and runs three phases per planet:
| Phase | Window | graceRamp value | Behavior |
|---|---|---|---|
| 1. Hard grace | elapsed < planetGrace | 0 | No spawns. Length = planet.spawnGraceSeconds (default 1s, Voidstar 0s). |
| 2. Flat trickle | planetGrace ≤ elapsed < 30s | 0.55 | 55% pressure flat. Pegged to the 30s rate so nothing is ever slower than the 30s baseline — enemies come fast from the start. |
| 3. Ramp to full | 30s ≤ elapsed < 60s | 0.55 + ((elapsed-30)/30) * 0.45 | Linear climb from 0.55 → 1.0 over the 30s window. |
| 4. Steady state | elapsed ≥ 60s | 1.0 | Full spawner pressure thereafter. |
Voidstar collapses all three: planetGrace === 0 short-circuits to graceRamp = 1 immediately and skips the trickle phase entirely.
How it feeds the spawner
graceRamp is assigned directly into densityShape, which multiplies the wave-size and kill-cap math downstream. The old mid-run density valley (30% between 2:00–2:40) has been removed — peak-density mode wants horde pressure to sustain into the late game, so the curve only goes up.
Independent of basics-only-window
This grace ramp is a spawner-pressure curve. It is separate from the basics-only window, which gates which enemy archetypes are eligible to spawn during early game. The two combine: during the first second of a default run, no enemies spawn (Phase 1 of spawn grace); from 1s to the basics-only window’s end, only basic archetypes spawn at 55% pressure; after that, the full enemy pool is in play and the ramp continues independently to 60s.
Per-planet values (current)
All planets except Voidstar use the 1s default. Voidstar’s 0s is the only deliberate divergence — it exists to make the leaderboard run uniformly harder from the first frame, paired with the 2.0× count multiplier.
Source
- Field definition:
data/planet-config.ts(spawnGraceSeconds, line 46) - Voidstar override:
data/planet-config.ts(Voidstar block,spawnGraceSeconds: 0) - Ramp logic:
engine/enemies/spawner.ts(planetGrace/graceRampblock around the trickle-mode early-game branch)