A 3D physics-based multiplayer game where you type what you want and Gemini generates the spell code. Not "press button to cast fireball" — actually prompt any spell and watch it execute in real-time.

The architecture is straightforward: Gemini 3 handles the spell generation, ThreeJS renders the WebGL physics world, Colyseus manages the multiplayer state (up to 6 players), and WebRTC handles voice chat. All running on a $6/month VPS with spell caching to keep API costs sane.

The Reddit thread hit 243 upvotes in r/singularity, with users immediately trying to break the game. One crafted "Soul Engine" — a necrotic bolt that permanently increases its damage, size, speed, and range with each enemy killed. That's the kind of emergent behavior you only get when the game mechanics aren't hardcoded.

Technical Stack:

  • AI: Google Gemini 3 (generates spell code from natural language prompts)
  • 3D Engine: ThreeJS (WebGL physics-based world)
  • Multiplayer: Colyseus (Node.js framework, up to 6 players)
  • VoIP: WebRTC for voice chat
  • Hosting: $6/mo VPS + Gemini API with spell caching

The caching trick: If someone else already crafted "fireball that explodes on impact," you don't pay for another Gemini call. The cache serves the existing spell code. This makes the economics work for multiplayer.

What makes this different:

  • AI Roguelite exists — 100% AI-determined mechanics, but single-player and text-heavy
  • Never Ending Dungeon does AI-generated scenarios, dungeon-focused
  • Questsmith is text-based AI RPG only

Spellwright is the first 3D physics multiplayer game with real-time LLM spell generation. Browser-based. VoIP support. And the creator is actively responding to technical questions about architecture on Reddit.

The uncomfortable question this raises: If Gemini can generate working spell code from natural language, what's the boundary between "game mechanics" and "AI hallucination"? A player crafted a spell that permanently buffs itself. Is that a feature or a bug? The game doesn't have hardcoded rules to check against.

Creator: u/VirtualJamesHarrison, 11-year Reddit veteran. Project live at https://spellwright.xyz/

Sources: