Galaxy Civilization — 5000 years across 5 star systems with named captains becoming legends
A 3D EPOCH demo: 22k-point spiral galaxy with 5 inhabited star systems, 5000 sim-years across 7 eras, 6 named civilizations, captains who progress to admiral to legend to statue, dyson swarm igniting at 2700, persistent across reseeds.
Built with:
three.js r0.160 (single file)22k-Points spiral galaxy + custom planet/wormhole shaderslocalStorage civilization memory across reseeds
Prompt
Build a single-file HTML page that recreates "5000 years of a fictional spiral galaxy" as a continuous 3D autoplay world. Civilizations rise on 5 inhabited star systems, ships travel between them, captains become legends, dyson swarms ignite, and over millennia some colonies collapse to ruins while beacons remain. Asimov / Foundation cozy on Twitch.
Hard constraints:
- One HTML file, < 200KB.
- three.js r0.160.0 from unpkg, IIFE, strict mode, full disposable cleanup, reseed every ~10 min advancing to the next galactic era.
- First body line: <!-- ROUND16_EPOCH v1 -->
- localStorage memory under key `galaxy_civ_memory_v1` — 6 named civilizations + 4 named flagship captains. On reseed, advance civilizations.
- Generational aging: captains progress captain → admiral → legend → statue (statue mesh appears on home colony).
- Visible structural change: InstancedMesh dome counts grow 1 → 4 → 12 → 28 → 48 → 60 across eras, then collapse to 14 with ruin instances post-4000. Orbital ring fades in. Dyson swarm of 80 panels ignites at year 2700.
- 5+ sub-locations (5 named star systems): Sol/Earth, Vega/Vegan colony, Centauri/Twin Worlds, Proxima/Water Moon, Tau Ceti/Forge World, plus Gate Sigma wormhole.
- Mini-map = galaxy spiral arms with named systems pinned + active focus + ship trails.
- 100+ named entities: 6 civilizations + 4 captains + 12 named ships + 16 named admirals/diplomats/scientists + 60 InstancedMesh trade ships + chyron name pool.
- 18+ director cameras: galaxy wide, system close-up, planet orbit, colony surface, ship bridge POV, wormhole gate, dyson orbit, war fleet wide, peace conference, statue close, last beacon.
- Cross-system chyron: "Year 1473 — UCS Solidarity reaches Vega. Capt. Halen Voss greets the Vegans for the first time. Sol parade tomorrow."
- 22k-point spiral galaxy as Points cloud with arm-shaped distribution.
Tone: Asimov, Star Trek, Foundation. No real-world politics. Interspecies contact peaceful first; conflicts handled diplomatically ("The Centauri Incident — full diplomatic resolution in 1834"). The galaxy is wondrous and big. No graphic violence.
Paste this into Claude, Cursor, or Copilot. Change one thing that matters to you.
What I learned shipping it
- How to render a believable spiral galaxy as a 22k-point Points cloud with arm-shaped distribution under 50KB
- How to grow a civilization visibly by gating InstancedMesh dome counts on a 0-5000 sim-year progress variable, then collapse it to ruins after the peak
- How to use localStorage to give captains real career arcs (captain → admiral → legend → statue) that persist across reseeds so a Twitch viewer sees the same Halen Voss commemorated centuries later