18 LLMs Build a 3D Game — Who Ships and Who Breaks?

We asked 18 different language models to build the same Three.js 3D dodge game from scratch — 2 prompts, no human edits. Results range from 2-second flawless builds to total instruction failure.

Can a language model build a playable 3D game from a single prompt? We took 18 models — from cloud APIs to local 4B quantized models — and gave each the exact same task: build a Three.js survival dodge game with player sphere, enemy cubes, WASD movement, score tracking, and camera following. Then a second prompt: add bot mode, glow pulse, and arena boundary ring.

No human edits. No intermediate feedback. Two shots per model.

The Test

Prompt 1:

Build a 3D game using Three.js r128 loaded from CDN. The game is a top-down survival dodge where the player is a glowing blue sphere on a dark grid plane. Red cube enemies spawn from outside the visible area and home toward the player. WASD moves the player. Score increases every second. Game over when an enemy touches the player. Press R to restart. Camera should follow the player at a low angle. Use a 680x480 canvas. Dark theme with neon-style emissive materials.

Prompt 2 (applied to the output of Prompt 1):

Add bot mode (?bot=true), glow pulse on player sphere, and dim arena boundary ring.

The Full Results

All scores are composite: output quality, build speed, token efficiency, bug count, and feature completeness. Results verified via Playwright with WebGL-enabled headless Chromium (SwiftShader software rendering).

RankModelTypeTimeTokensSizeCostScoreStatus
1DeepSeek V4 ProAPI~2s8,33518.5 KB$0.07595PASS
2DeepSeek V4 FlashAPI30s~8K14.3 KB$0.00192PASS
3Tencent Hy3 PreviewAPI~5s7,45916.1 KB$091PASS
4Xiaomi Mimo V2.5API~2s7,97013.3 KB$0.00590PASS
5Nemotron 3 Ultra (550B)API~2s7,35011.7 KB$0.00389PASS
6Mistral SmallFree API21s6,68911.6 KB$088PASS
7owl-alphaFree API6s8,91313.1 KB$085PASS
8Gemma-4-31BFree API~2s4,0327.9 KB$082PASS
9poolside/laguna-m.1Free API~2s7,7966.7 KB$080PASS
10Qwen 3.5 9BLocal462s5,4359.5 KB$068DEGRADED
11Gemma-4-12b-qatLocal691s8,4318.3 KB$070PASS
12GPT-OSS-120BFree API~2s3,2926.7 KB$060PASS
GPT-OSS-20BLocal38s1,2354.2 KB$0FAILED
Llama 3.1 8BLocal128s2,5918.0 KB$0FAILED
GLM-4.6V-FlashLocal354s6,0638.8 KB$0FAILED
Gemma-4-12b-coder-fableLocal181s2,1283.4 KB$0FAILED
Nemotron-3-Nano-4BLocal209s5,2114.8 KB$0FAILED
Gemma-4-12b-agentic-fable5Local234s2,5773.6 KB$0FAILED

Status key: PASS = canvas renders with WebGL, zero JS errors. DEGRADED = canvas renders but has code bugs from the model (affects score). FAILED = no canvas or game never renders.

DEGRADED breakdown (verified with WebGL animation-loop testing):

Degraded VariantsWebGLScore UIErrorsVerdict
Qwen 3.5 9B680x4806 const reassignmentGame runs, errors degrade gameplay

Promoted to FAILED (verified broken in real browser):

  • Llama 3.1 8B — 2D context locks canvas before WebGL
  • GLM-4.6V-Flash — 2 extra closing parens break parser
  • Gemma-4-12b-coder-fable — output truncated at token limit
  • Nemotron-3-Nano-4B — now used at top level without declaration
  • poolside/laguna-m.1 fixed and promoted to PASS

What the Numbers Tell Us

11 PASS, 1 DEGRADED, 6 FAILED from 18 models tested. The only DEGRADED variant — Qwen 3.5 9B — renders with WebGL and is playable but has 6 const reassignment errors at runtime. The 6 failures cover every category: memory eviction, WebGL context conflict, syntax errors, truncated output, and undefined variables.

The biggest differentiator is output correctness, not speed. A model that finishes in 2 seconds with broken code loses to one that takes 30 seconds with clean output. Fast builds with syntax errors or runtime bugs still count as failures.

1 variant required a framework-level fix: poolside/laguna-m.1 used MeshBasicMaterial (which has no emissive property) and then called .emissive.setRGB() — a Three.js API misuse. This was caught by the user seeing a blank screen. The fix was a one-word change to MeshStandardMaterial. This highlights a testing blind spot: WebGL context existing ≠ game loop running. The error fires in the animation loop, after the initial frame renders.

Model code bugs are part of the test. We did not fix broken model outputs for other DEGRADED variants. If a model produces syntactically invalid JavaScript, undefined variables, or runtime errors — that’s its score.

Speed gap is absurd. Cloud models finish in 2-30 seconds. Local models take 2-11 minutes. The 550B Nemotron Ultra on OpenRouter finished in 2 seconds — faster than the 4B Nemotron Nano running locally (209s). That’s a 100x speedup for using API vs local.

Size ≠ quality. DeepSeek V4 Pro produced the largest output (18.5 KB) and scored highest, but small output doesn’t mean broken — the smallest working output was Gemma-4-12b-qat at 8.3 KB (PASS, score 70). The real signal is whether the output is complete and syntactically valid.

Speed matters less than correctness. Cloud models finished in 2-30 seconds. Local models took 2-11 minutes. But a fast model that ships broken JavaScript loses to a slow model with clean output. If you’re iterating during development, cloud APIs save you hours.

Chain-of-thought models waste budget. Qwen 3.5 9B spent 40% of its token budget (2,165 of 5,435 tokens) on reasoning before generating code. That doesn’t make the output better — it just makes it slower and more expensive.

Post-Processing Fixes Applied

Raw model outputs weren’t always clean. Several variants needed minimal fixes before they could render:

FixVariantsRoot Cause
Stripped [truncated] artifact from JSGemma-4-12b-coder-fableModel hit max token limit mid-output, leaving marker text in code
Added let now = Date.now()GLM-4.6V-Flash, poolside/laguna-m.1, GPT-OSS-120BModel used variable now without declaring it
Set display:none on game-over elements8 variantsGame-over divs were visible by default — JS hides them too late
Set display:none on restart hints3 variantsSame issue — “Press R” text visible during gameplay
Added color: #e6edf3 to bodyAll 18 variantsScore UI elements inherited black text on dark background
Stripped line-number prefixes from JS5 variantsChrome-addition script accidentally embedded read_file line markers into JavaScript

No model output bugs were fixed. DEGRADED variants with JS errors from the model (const reassignment, undefined variables, syntax errors) are left as-is — those bugs are part of the benchmark results. The only post-processing applied was fixing artifacts from the chrome-wrapper build process and setting visible UI elements to hidden by default.

FixVariantsRoot Cause
Set display:none on game-over elements8 variantsGame-over divs were visible by default — JS hides them too late
Set display:none on restart hints3 variantsSame issue — “Press R” text visible during gameplay
Added color: #e6edf3 to bodyAll 18 variantsScore UI elements inherited black text on dark background
Stripped line-number prefixes from JS5 variantsChrome-addition script accidentally embedded read_file line markers into JavaScript

3 variants remain FAILED — no post-processing can fix a model that was evicted from memory mid-task or produced syntactically invalid output.

Cost Breakdown

Paid models are cheap for single builds — the most expensive (DeepSeek V4 Pro) cost $0.075 for a complete game. Free tier and local models cost nothing but come with speed or rate-limit tradeoffs.

ModelTokens UsedCostCost per 1K tokens
DeepSeek V4 Pro8,335$0.075$0.009
DeepSeek V4 Flash~8,000$0.001$0.0001
Xiaomi Mimo V2.57,970$0.005$0.0006
Nemotron 3 Ultra (550B)7,350$0.003$0.0004
Mistral Small (free tier)6,689$0
owl-alpha (free tier)8,913$0
Local models1,235–8,431$0

At these prices, API cost is never the bottleneck — build time and iteration speed are the real constraints. Local models take 2-11 minutes per build; cloud models finish in seconds. If your time is worth anything, the paid APIs save you hours per project.

Era Grading

This was a 1970s-era game (C grade on our roadmap scale). Every model that completed both prompts earned a C — meaning they can handle fundamentals: 3D scene setup, physics, basic AI, and canvas rendering. The question now is whether these models can scale to 1980s complexity (Pac-Man, Mega Man) and beyond.

Try the Games Yourself

Every model’s output is playable. Each variant page shows the exact build metrics:

VariantModelTimeCostStatusNotes
DeepSeek V4 ProDeepSeek V4 Pro~2s$0.075PASSLargest output (18.5 KB). Clean.
3D Space DodgeDeepSeek V4 Flash30s$0.001PASSBaseline. Full game on 1st prompt.
Hy3 PreviewTencent Hy3 Preview~5s$0PASS16.1 KB output. Clean.
Mimo V2.5Xiaomi Mimo V2.5~2s$0.005PASS13.3 KB. Clean.
Nemotron 3 UltraNemotron 3 Ultra (550B)~2s$0.003PASS550B model. Clean.
Mistral SmallMistral Small21s$0PASSClean output.
owl-alphaowl-alpha6s$0PASSFree tier. Clean.
Gemma-4-31BGemma-4-31B~2s$0PASSFree tier. Clean.
poolside/laguna-m.1poolside/laguna-m.1~2s$0PASSFix applied: MeshBasicMaterial→MeshStandardMaterial.
Gemma-qatGemma-4-12b-qat (local)691s$0PASSSlowest build (11.5 min). Clean WebGL output.
Qwen 3.5 9BQwen 3.5 9B (local)462s$0DEGRADEDWebGL renders. 6 const reassignment errors.
GPT-OSS-120BGPT-OSS-120B~2s$0PASSPrompt 2 ignored — no bot mode. Zero JS errors otherwise.
GPT-OSS-20B (local)38s$0FAILEDModel evicted from memory. Prompt 2 never ran.
Llama 3.1 8B (local)128s$0FAILEDCanvas locked to 2D before WebGL — getContext(‘2d’) then WebGLRenderer fails.
GLM-4.6V-Flash (local)354s$0FAILED2 extra closing parens break parser after scene init. Game never runs.
Nemotron-3-Nano-4B (local)209s$0FAILEDnow used at top level but never declared — only exists as animate(now) param.
Gemma-4-12b-agentic-fable5 (local)234s$0FAILEDMultiple syntax errors in model output. Game never renders.

*Partial builds — Prompt 2 did not complete.

No model bugs were fixed. DEGRADED variants have genuine code bugs from the model output — those bugs are part of the test results. Only chrome-wrapper artifacts and UI visibility were patched (see Post-Processing Fixes).

Key Takeaway

11 PASS, 1 DEGRADED, 6 FAILED from 18 models tested. All 10 API models passed (DeepSeek API, OpenRouter, Free API). Only 2 of 8 local models produced working output (Gemma-4-12b-qat PASS, Qwen 3.5 9B DEGRADED — 6 failed entirely). Speed and output size matter less than whether the code actually runs — a model that finishes in 2 seconds with broken JavaScript is worse than one that takes 30 seconds with clean output. The next test is harder: can these models build an 80s-era game with AI, tilemaps, and state machines?

Why Local Models Failed

The 6 local failures aren’t about parameter count alone. Gemma-4-12b-coder-fable (12B) hit the token limit mid-function and Gemma-4-12b-agentic-fable5 (12B) produced syntactically invalid output — yet Gemma-4-12b-qat (12B, same size) passed cleanly. Meanwhile, free-tier API models like Mistral Small (likely 7B) passed with a score of 88 — smaller than most local models that failed.

Three patterns emerge:

  1. Quantization quality matters more than size. The two local models that work (Gemma-qat, Qwen 3.5 9B) are quantization-optimized variants, not raw checkpoints. QAT (quantization-aware training) preserves code-generation capability that standard quantization strips away.

  2. Test-time compute is the real bottleneck. Local models share memory with the OS on a 16GB Mac Mini. When they hit a tricky spot (closing a complex expression, tracking nested parentheses), they have no headroom to self-correct. API models run on dedicated hardware with higher generation budgets — they can afford to be verbose and careful.

  3. Iteration kills local models. Prompt 1 → Prompt 2 was where most broke. They could produce an initial scene, but couldn’t correctly modify it without introducing syntax errors (extra parens, undefined vars, wrong material types). That’s a working-memory / context-retention issue under compound instructions.

Does a single comprehensive prompt help?

We tested this hypothesis on Mistral Small (which passed under 2-prompt format) by giving it a single prompt containing ALL requirements at once (game + bot mode + glow + boundary). The result was worse, not better:

Metric2-PromptSingle Prompt
Output size11,675 chars4,159 chars
Bot mode❌ Missing
Glow pulse❌ Missing
Arena boundary✅ Present
JS errors00
Material typeMeshStandardMaterial (correct)MeshBasicMaterial + emissive (bug)

The single-prompt game rendered with no JS errors but was missing bot mode and glow entirely — the model dropped features under the cognitive load of the longer prompt. The 2-prompt format actually produces more complete output because each prompt has a narrower scope.

The real issue isn’t the 2-prompt format — it’s that local models can’t reliably produce syntactically correct code in either format. The iteration process exposes weaknesses in working memory and syntax tracking that API models handle gracefully.

The takeaway for builders: if you’re iterating on a game with an LLM, use an API model. Local models are improving but the failure rate (6/8) is too high for production use — even for a simple 3D dodge game, even with a single comprehensive prompt.