MMO Living World — Stormhaven Shard
A live MMO server in your browser: 64 AI players, /general chat, world bosses, guild raids, epic drops, GM announcements, and a shard reset every 9 minutes.
Built with:
three.jsr160single-file
Prompt
Build a single-file three.js r0.160.0 demo that feels like watching
a live MMO server, not a demo. The fiction: STORMHAVEN, a populated
shard with 64 AI players, all behaving simultaneously.
Constraints:
- Single HTML file < 200KB. three.js from unpkg only.
- First line of <body>: <!-- ROUND14_LIVING v1 -->.
- IIFE + strict mode. Disposables registry. Reseed at shard restart
every ~9 min. Autoplays forever.
3D world:
- Central glowing fountain. AH north. Bank west. Tavern south.
Blacksmith with smoking chimney east. Mage tower NW with floating
orb. Bazaar stalls. Training dummies. Guild hall. Dungeon portal
at +60x with shimmering gate. World-boss arena at -80z. 60 trees,
pier + pond, banners.
Living world:
- 64 AI players via InstancedMesh (body capsules + head spheres),
per-instance class colors (15 classes), state machines per player
with 8 states. Procedural names mixing 6 patterns plus class, level,
guild tag.
- Live scrolling chat (right side): say / general / guild / whisper /
trade / system / GM channels with proper colors, fed every 380–
1,100ms from templated lines.
Live events every 5–13s:
LEVEL_UP (gold beam+ring), EPIC_DROP (purple beam + banner),
GUILD_RAID (8–10 members line up and march to dungeon), AH_SOLD,
WORLD_BOSS (12–14 players converge on Voidmaw), NEW_PLAYER,
PVP_DUEL, GM_ANNOUNCE.
Broadcast chrome: STORMHAVEN logo + tagline, online/peak/ping/server,
LIVE camera badge with current preset, world-board panel, lower-third
ticker (TWITCH bug, REC dot, scrolling marquee, NOW PLAYING, EVENTS
counter, uptime), nameplates rendered as HTML overlay (top-14 nearest
projected), 200×130 anchor PIP cam following a random player.
Cams: 10 presets (TOWN_WIDE, AUCTION_HOUSE, TAVERN, BAZAAR,
MAGE_TOWER, TRAINING_YARD, LOW_OVERVIEW, GUILD_HALL, WORLD_BOSS_VIEW,
NEW_PLAYER_FOUNTAIN), auto-cycling every 8–12s, with event overrides
(DUEL_CAM, LOOT_CAM).
Forever loop:
- At 8:30 a "SHARD RESTART IN N s" red countdown appears bottom-center.
- At 9:00 a black "STORMHAVEN ONLINE — SHARD RESET — RECONNECTING"
overlay fades in, disposeAll runs, state reseeds, scene rebuilds,
chat clears, RAF resumes — repeats forever.
Paste this into Claude, Cursor, or Copilot. Change one thing that matters to you.
What I learned shipping it
- Channel-coded chat is the single highest-leverage UI you can add to a sim — it makes 64 idle NPCs feel like a server.
- InstancedMesh + per-instance color + 8 state machines is the cheapest possible 'crowd of players' implementation.
- Shard restarts (with countdown + reconnect overlay) is what turns a long-running demo into something that feels like an actual MMO.