✦ SPELLVERSE

Dev log

Building a spell arena where the players write the spells

Maneki · Nov 15, 2026 · 2026 Epic AI MegaJam · Unreal Engine 5.9 Preview

Spellverse is a 5v5 wizard arena with no spell list. You hold V and say what you want ("a tsunami of rubber ducks", "give me a shotgun"), and a few seconds later it exists as a real, balanced spell. Three of us (Bek, Paul, Danyal) built it in four days with a crew of Claude Code agents, on 16 GB Macs and one Windows PC. This is how it works and what broke along the way.

Contents
  1. The Spell Forge: words to a balanced spell
  2. Day 1: grey box to arena, feel loops, voice
  3. Day 2: the library, 5v5, and three bugs
  4. Day 3: a thousand models and a browser version
  5. Day 4: rounds, the wall, ship it
  6. Running seven agents on one Unreal editor
  7. By the numbers

How it worksThe Spell Forge: words to a balanced spell

The pipeline, end to end:

  1. Voice. Hold V: audio streams to Deepgram Nova-3 with a short-lived token minted by our relay (POST /speech/token). Apple's on-device recognizer is the Mac fallback. Clients send their audio through the host by RPC.
  2. Relay. The transcript goes to our relay (tools/spellforge/relay.py, now on Cloud Run with the key in Secret Manager). The game never holds an API key.
  3. Model. The relay asks Claude Haiku for a spec built from game blocks: a delivery (bolt, beam, burst, nova, wall, self), effects (damage, heal, dot, impulse, stat, morph, root, freeze, shield) and world blocks (construct, terrain, field, summon, move, transform, physics, mass) with modifiers (delay, repeat, chain, split). It also gets the ~8 best library models for the request, so "a dragon" is a real rigged dragon, not a pile of spheres.
  4. Clamp and cost. The game trusts no number. DCSpells::Finalize clamps every value and prices the spell against one power budget: breadth against depth, so you can freeze one player for long or everyone briefly, never everyone for long.
  5. Cast. Only the left mouse button casts. Words never do.

A few-shot example from the relay, as source (the "sinkhole" the owner asked for in the first playtest):

("sinkhole", spell("Sinkhole", "Going down!",
    "The ground has been waiting all day to eat someone.",
    "burst", "earth", "#6B4F2A", "#2E2114",
    effects=[fx("root", duration=1.5)],
    blocks=[blk("terrain", "lower", anchor="aim", width=6, length=6,
                height=2, material="earth", duration=5, damage=8)])),
# each example's power tier floors the cooldown: 1 = 1.5 s, 2 = 3.5 s, 3 = 6 s

JSON was too slow. The model first answered in JSON. We switched it to a compact line language that the relay expands back to the JSON the game reads: output tokens p50 846 → 320, forge p50 3.6 s → 2.5 s, and the name and flavour line arrive at 1.4 s, streamed, so the UI reveals the spell while the rest forges. The eval set starts with the owner's own playtest requests ("a big bridge", "antigravity", "summon dragon ally", "clone army", "sinkhole") and went from 6/50 to 50/50 after the block set grew.

The system prompt's core rule: "Be literal and creative: what they asked for must visibly happen... Never swap the request for a generic damage spell." A teen guard turns anything rude into a harmless comedic version (a falling rubber duck, a cream pie). With no relay reachable, an offline keyword forge always answers.

The forge side panel while running
The forge is a side panel: you keep moving and aiming while you speak or type.

Day 1 · Thu Nov 12Grey box to arena, feel loops, voice

Day 1 startArena round 4
Morning: the template mannequin on a flat floor. Afternoon: a floating-island plaza from a procedural Blender kit (~15k grass clumps) plus 8 landmark props, each a fal concept styled from our own arena frame, then Tripo image-to-model.

Look target first. Style adjectives alone gave generic concepts for three rounds. Feeding eight reference screenshots as image inputs to nano-banana-pro edit fixed it (3 of 4 kept). Those frames became the yardstick: agents were judged on side-by-side captures from the running game, not on "it compiles".

Feet that wouldn't move. The retargeted AnimBP ends in Epic's foot-IK Control Rig, and the Tripo rig had no ik_foot_* bones, so full-body IK pinned both feet at the origin while the legs animated (measured in PIE: foot_l stuck at (15,-2,-89) for 3 s at a 560 cm/s jog). Fix: add the IK bones in Blender and bake them on every clip.

Performance. Cheaper volumetric clouds took the GPU frame from 51 ms to ~13 ms.

"Clunky, spells don't work." After the owner's playtest, an agent made a measured, frame-by-frame teardown of a reference action game's footage (dodge timings, hitstop frames, camera distances, VFX layers) into a ranked gap list. Then feel loops: each agent implements its items, captures frames matching the reference framing, an independent critic reviews, next round. Round 1 shipped soft/hard lock-on, release re-aim, homing, dodge i-frames and hitstop.

Voice spells. Push-to-talk over a WebSocket to the relay. The first pick measured release → final transcript p50 151 ms at 97.8% word accuracy; Apple on-device scored 79% ("summon" heard as "some in"). In game: release → spell ready p50 2.5 s, and saying a held spell's name re-casts it at p50 171 ms.

Multiplayer. A listen server with replicated spellbooks, spells, constructs, fields and summons; server-authoritative hits; client RPCs for cast, dodge and forge.

Day 2 · Fri Nov 13The library, 5v5, and three bugs

Generate or pick? We measured it. The fastest text → textured mesh was ~20 s (flux/schnell 2.7 s + trellis 17.2 s warm; cold queues 71-216 s). A library pick costs under 1 ms and is already cooked into every client. So: a big library, with generation only for what nothing covers.

Every library model goes through a Blender house-style pass (ink outline, painted breakup, AO), then a Claude Haiku style QA (tools/library/qa.py): rendered next to an arena prop under the same light, scored 0-10 on a rubric (painted not plastic, dark outline, warm palette, no toy faceting, readable silhouette), and it must name the object, which catches wrong tags. Under 5 is rejected.

Bek added teams, a lobby, bots and 5v5, plus voice for clients: the clip goes to the host, whose relay transcribes it with local whisper.cpp (~0.3 s, no key).

Bug: every element turned white

VFX white blowoutVFX after hue pass
Before (01:48) and after (10:30).

Spell cores and laser pillars washed out to white under tonemapping and bloom, so fire and frost looked the same. Fix: emissive boosts 2-3x lower, smaller white cores, element hue ranges clamped in the shared spawn path (which also fixed a "rainbow frost" bug from a template colour module), and density over brightness: 3-5x more sparkles instead of brighter ones.

Bug: players spawned in an orange void

Spawned on the sky domeArena again
The host on the sky dome's shell, then the fix.

A stylised sky dome went in at 10:42. Its simple sphere collision pushed every character 1.5 km out onto the shell. Fix (10:52): no collision on the dome, and spawn traces that only accept a floor near base height within 40 m of the arena centre.

Bug: holes in the cape

Cape holesCape fixed
Toggling the outline overlay and cast shadow at runtime ruled both out.

The cloth was open sheets with bridge cuts, rendered one-sided. Fix: two-sided body materials, bridge faces kept, blend weights spread across a 3 cm seam to the legs and skirt.

Day 3 · Sat Nov 14A thousand models and a browser version

The library at scale. tools/library/gen.py took a 754-row list of things players ask for and generated them on Rodin, Tripo and Meshy with a credit ledger, in a loop: prep → Haiku style QA → one Rodin redo for rejects (best of two) → headless import → catalog. Each row carries gameplay affordances (default use, mass, element, socket, projectile or not). Walls and towers that spells build wear 71 hand-painted PBRgen tiling materials.

Library batch
A batch of library models after the house-style pass.

Flight and powers (Paul): eight flight styles, each with its own pose and trails, a scripted spell.FlyTest <style> route for contact sheets, and spell-granted wall runs (capped at 5 wall jumps per air stay), air jumps and super speed. Twelve text-to-motion takes (fal hunyuan-motion, 24 calls, $1.92) were retargeted for take-offs and loops.

Play in a browser (Danyal): the packaged Windows game on Google Cloud L4 GPU VMs, streamed with Pixel Streaming 2 behind a lobby with a queue. Measured on one L4 at 720p30 with a full 5v5 of bots:

PresetPlayers per L4Notes
720p304~5.8 Mbps each, 86-90 ms capture to screen
1080p30, TSR 75%32.1 cores per player
1080p60, TSR 67%2~11 Mbps, the quality preset

The encoder is never the limit: NVENC sat at 7% with four streams (the L4 has two engines and no session cap). The GPU limits at 60 fps, the CPU at 30. A memory leak in the stream was fixed at the root by sending NVENC through CUDA instead of its D3D12 path, and AV1 at 1440p is used where the browser decodes it in hardware.

Day 4 · Sun Nov 15Rounds, the wall, ship it

The owner reviewed the game fresh and made a batch of calls; agents worked them in parallel worktrees and merged one by one. The game was renamed Spellverse. The format became 5v5, 30 s prep, 90 s rounds with one life, first to 3. During prep you forge and cast on your own half behind a rune curtain, but spells touch nobody's health; spells that cross fizzle.

Prep phase behind the wall
Prep: the wall splits the map while each team forges.

251 of 365 creatures got rigs with idle, walk, run, attack and hit clips (Rodin and Meshy rigs, each checked for tearing); the 114 no skeleton fits (crabs, slimes, ghosts) got procedural scuttle, slither, swim, float or hop. "Give me a shotgun" now puts a gun in your hand that fires from its tip. The forge's text box moved to a Slate input preprocessor after Backspace deleted two letters (the platform also sends \b). The final Windows build passed 96 of 96 automation tests.

Victory screen
A three-round match, won 2-1.

ProcessRunning seven agents on one Unreal editor

Up to seven Claude Code agents (feel, animation, VFX, UI, characters, Spellforge, library, voice, audio) shared one Unreal editor on one 16 GB Mac, driving it through Epic's Unreal MCP. The protocol:

Every rule came from an incident: in-editor Python calling the editor's own MCP deadlocked it for 600 s; the editor leaked to ~40 GB during a Niagara rebuild and swap filled the disk; an unconditional rm -rf editor.lock let one agent kill another's capture. Every agent prompt and tool call is logged by a hook to devlog/events.jsonl, keys redacted.

SummaryBy the numbers

Built with Unreal Engine 5.9, Claude Code and Claude Haiku, Deepgram, Rodin, Meshy, Tripo, PBRgen, fal, Blender and Google Cloud.

Play in your browserDownload on itch.io