Dev URL Overrides
URL query params open hidden dev paths into the running game. Parsed at boot, browser-only (guarded by typeof window !== 'undefined'), and tagged onto the build version when active so telemetry can distinguish dev runs from real ones.
The three entry points
?dev=<name> — dev playground scenarios. Activates the 22 named scenarios registered in testing/dev-scenarios.ts via SCENARIOS.set(name, builder). Each scenario is a ScenarioBuilder that clones DEFAULT_RUN, applies common tweaks (high vision, durable ship, 10-min timer, events unlocked), then layers scenario-specific overrides — biome, planet ID, worldKnobs.enemyCountMult/DamageMult/SpeedMult, spawn cadence, artifact preloads, etc. Unknown names log a warning and fall through to no scenario. The current registry: sunrise-city, elite-showcase, telegraph-test, damage-test, speed-compare, horde-peak, flame-test, empty-canvas, weapon-showcase, pillar-test, pillar-only, plus 11 artifact-test scenarios (art-echo-gen, art-fortress, art-droid, art-crate-bust, art-tbone, art-ram, art-reactive, art-healer, art-soul, art-force-field, art-personal-space).
?perftest — telemetry capture mode. Set in PERF_FLAGS.perftest from _perf-flags.ts; isPerfTestMode() returns the flag. When active, GameScreen calls buildPerfTestRunDef() instead of the normal runDef and starts startPerfTestSession() plus notifyPerfTestRunStart() — a 30-second telemetry snapshot loop that writes perf data to Supabase player_events, auto-restarts on death, and runs indefinitely for overnight soak testing.
?kills=N — pre-seed the kill counter. Parsed inside parseDevOverrides() and exposed on the DevOverrides interface. The horde-peak scenario relies on it to jump the kill-cap table forward, with the actual game.stats.totalKills setter applied via window.__dev.setKills(n) in the bridge dev API (per the comment _devPreSeedKills handled by bridge dev API in dev-scenarios.ts).
Companion params
parseDevOverrides() also reads ?weapon=<id>, ?level=<int>, ?ship=<id>, and ?tier=<int> for cross-scenario tuning — e.g. ?dev=weapon-showcase&weapon=laser&level=20. baseRun() applies ship, weapon, and level defaults; artifact scenarios feed tier into devAutoArtifacts.
_perf-flags.ts parses an additional family of render-disabling flags from the same URLSearchParams instance: ?noStickers, ?noTerrain, ?noNebula, ?noWorldObj, ?noBullets, ?noPostFx, ?noParticles, ?noEffects, ?noBackground, ?noWebgl, ?autoplay, ?lowPerf=0|1, ?dpr=<float>. Plus the persistent perf flags lowPerf (sticky via localStorage 'lowPerf') and dprOverride (pixel-budget cap, 1.5M total canvas pixels).
Boot wiring
_perf-flags.ts constructs a single URLSearchParams at module load — once per page — and freezes every flag on PERF_FLAGS. GameScreen.tsx re-reads ?dev= at mount to handle SPA navigation that doesn’t trigger a module reload, and writes it back into PERF_FLAGS.devScenario so bridge.ts picks it up. The bridge then exposes window.__dev (spawn/clear/godMode/teleport/setKills/getState/bossDiag/etc.) whenever PERF_FLAGS.devScenario || runDef.sandbox is truthy, and additionally exposes window.__mission for Playwright/console scripting.
Active flags are joined onto PERF_VERSION_TAG (e.g. 5.123.3-perftest-autoplay) so telemetry tags every event with the exact dev configuration that produced it.
Why it matters
These params are the only way to run the engine outside the metagame’s normal run-assembly pipeline — they bypass hub navigation, ship selection, mission picking, and reward flow. They’re essential for screenshot baselines (empty-canvas), single-system stress (pillar-only, art-soul), Playwright integration tests, and overnight perf soak on real phones (?perftest). Production users never see them; they only fire when a query string is present at boot.