We Asked 10 LLMs to Build the Same Game — Here's How Each One Did

We gave 10 different LLMs (local and cloud) the exact same prompt to build an AI dodge game in Phaser.js. We tracked tokens, code quality, bugs, and speed. The results surprised us.

What happens when you give 10 different language models the exact same prompt to build a browser game? We tested exactly that.

The task: build a Phaser.js 3 game where the player is a blue circle dodging red AI enemies. Identical prompt, same game engine, zero human edits. We fed it to cloud APIs (DeepSeek V4, Mistral, OpenRouter) and local models (GPT-OSS-20B, Llama 3.1, Gemma 4, Qwen 3.5) and compared the results.

Playable Demos

Two versions are embedded below. All other model builds are playable at their own URLs.

MetricValue
ModelDeepSeek V4 Flash (API)
ProviderDeepSeek API
Model IDdeepseek-v4-flash
Temperature0.7
Max Tokens8,192
Tokens Used8,399 (207 in / 8,192 out)
Build Time68s
File Size14.8 KB
Cost$0.0012
NotesLargest original output (15,487 chars, 429 lines)
Sourcegithub.com/driphtyio/ai-dodge
MetricValue
Modelopenai/gpt-oss-20b (local)
ProviderLocal — Apple Mac Mini M4 (16GB)
Model IDopenai/gpt-oss-20b
Temperature0.7
Max Tokens8,192
Tokens Used1,823 (269 in / 1,570 out)
Build Time23s
File Size14.8 KB
Cost$0 (local)
NotesOriginal output had player speed bug + double R key
Sourcegithub.com/driphtyio/ai-dodge

All other model builds are playable here:

All games: Move with WASD/arrows, survive as long as you can, press R to restart.

The Lineup

We tested 10 models across cloud APIs and local inference:

TierModels
Cloud APIsDeepSeek V4 Flash, DeepSeek V4 Pro, Mistral Small, OpenRouter (owl-alpha, Nemotron 3 Ultra)
Local — Apple Mac Mini M4 (16GB)openai/gpt-oss-20b, Llama 3.1 8B, Gemma-4-12b-qat, Qwen 3.5 9B, Gemma-4-12b-coder-fable
Blocked by content policyGroq (70B + 8B), Cerebras (120B) — ironic given they’re great at playing games via API

Key Findings

  • DeepSeek V4 Flash (API, 0.7 temp) produced the largest output by far — 15,487 chars, 429 lines — but cost $0.0012 and took 68 seconds
  • Mistral Small was the cleanest: zero bugs, 12 seconds, 6,869 chars, $0 — the smallest cloud model outperformed everyone on first-attempt quality
  • openai/gpt-oss-20b (local 20B) built a playable game in 23s at $0 but had two bugs: player speed coupled to enemy speed, and double-bound R key
  • DeepSeek V4 Pro (the “better” model) underperformed Flash — it spent its 8,192 output tokens on reasoning text before the code, producing only 50 lines of actual game (1,424 chars)
  • Local models (Llama 3.1 8B, Gemma 4, Qwen 3.5 9B) all produced functional games but with tradeoffs: Gemma-4-12b-qat took 281 seconds (slowest), while Gemma-4-12b-coder-fable produced only 3,451 chars (shortest working output)
  • Groq and Cerebras both refused to generate game code entirely — error code 1010 (content policy) — yet their APIs work perfectly when used to play the game via the bot-brain system
  • Total cost for all 10 API calls combined: $0.0032 — less than a penny for 10 working games

Results Table

ModelStatusTimeTokensLinesCharsCost
DeepSeek V4 Flash (API, 0.7)✅ PASS68s8,39942915,487$0.0012
DeepSeek V4 Flash (0.4 temp)✅ PASS14s2,0772567,376$0.0005
Mistral Small✅ PASS12s1,7542336,869$0
owl-alpha (OpenRouter)✅ PASS53s2,0242418,272$0
openai/gpt-oss-20b (local)✅ PASS23s1,8232164,849$0
Llama 3.1 8B (local)✅ PASS55s1,2201535,183$0
Gemma-4-12b-qat (local)✅ PASS281s3,5631825,410$0
Qwen 3.5 9B (local)✅ PASS190s3,2101774,804$0
Nemotron 3 Ultra (OpenRouter)✅ PASS86s2,0151325,323$0
DeepSeek V4 Pro (API)✅ PASS101s8,399501,424$0.0012
Gemma-4-12b-coder-fable (local)PASS112s1,4631073,451$0
Lfm2.5-8b (local)⚠️ NO LOGIC128s8,36955125,966$0
Vibethinker-3b (local)❌ OVERFLOW204s8,38310
Groq 70B / 8B❌ POLICY1s
Cerebras 120B❌ POLICY0.3s

Total Cost

$0.0032 — that’s all 10 successful API calls combined. The local models cost $0 (they ran on our machine). The cloud calls (DeepSeek) cost less than a penny. AI game development is effectively free for prototyping.

Bug Breakdown by Model

ModelBugsNotes
DeepSeek V4 Flash (0.4 temp)Score timer stacked on each restart; no edge wrapping; no speed scalingFixed in second prompt. At 0.7 temp / 8,192 tokens, produced 15,487 chars (429 lines)
DeepSeek V4 ProSpent 8,192 output tokens on reasoning text before codeOnly 1,424 chars (50 lines) of actual game — Flash was more efficient for code gen
openai/gpt-oss-20b (local)Player speed scaled with score; double R key listener; add.circle() shapesFast local model (23s). Shape-based collision less precise
Mistral SmallNoneCleanest output — zero bugs, 12s, all features working
owl-alpha (OpenRouter)None reportedLargest free output (8,272 chars). Strong free-tier contender
Llama 3.1 8B (local)Sparse game logic (5,183 chars)Functional but minimal. Most reliable local fallback
Gemma-4-12b-coder-fable (local)Shortest output (3,451 chars, 107 lines)Playable but missing some features
Gemma-4-12b-qat (local)Took 281 secondsSlowest model by far. Output adequate but not proportional to wait time
Qwen 3.5 9B (local)Minor — functional first attempt (4,804 chars)Best local model after GPT-OSS-20B
Nemotron 3 Ultra (OpenRouter)Compact (132 lines) — may lack edge wrappingFunctional but minimal feature set
Lfm2.5-8b (local)Produced 551 lines of HTML with zero game logicRenders empty canvas. No generateTexture, keyboard, or game-over
Groq 70B (provider block)Error 1010 — provider-level content safety filterLlama 3.3 70B itself can generate game code (works via other providers). Groq’s API blocks any request containing game/HTML/JS generation keywords
Cerebras 120B (provider block)Error 1010 — provider-level content safety filterGPT-OSS-120B model itself works when accessed directly. Cerebras API blocks game code prompts the same way Groq does
Vibethinker-3b (3B)Reasoning overflow at 204s, 8,383 tokensToo small for this task (3B parameters)

What Each Model Did Best

ModelBest At
DeepSeek V4 Flash (API)Largest output — 429 lines, full feature set
Mistral SmallCleanest output — no bugs, no edits needed
owl-alphaBest free-tier output — 8,272 chars, no bugs
openai/gpt-oss-20bBest local model — fast (23s), functional, cheap (0 RAM cost)
Llama 3.1 8BMost reliable local — always produces something functional
Qwen 3.5 9BBest local code quality — clean structure, few bugs
Nemotron 3 UltraMost compact — 132 lines that all work
DeepSeek V4 Flash (0.4)Fastest — 14 seconds from prompt to playable game

The Prompt

In case you want to run your own benchmark:

“Create a complete, playable Phaser.js 3 game as a single HTML file. Player is a blue circle that moves with WASD/arrow keys. Red circles spawn from screen edges and chase the player with simple AI (seek behavior). Score increases by 1 every second. Collision with any red circle = game over. Press R to restart after game over. Enemies wrap around screen edges. Player wraps around screen edges too. Enemies speed up gradually as score increases. Player has a subtle glow/pulse effect. Dark theme. 680x480. Centered canvas with instructions below.”

Want to pit your favorite model against this? Drop it the same prompt and see if it beats Mistral Small’s clean record.

Methodology

  • All models received the same prompt verbatim
  • No human edits or iterations after generation
  • Temperature: 0.4-0.7, max_tokens: 4096-8192
  • Local models ran on 10.0.0.25:1234 (LM Studio) — Apple Mac Mini M4 (16GB memory)
  • Cloud models used official API endpoints with free/free-tier keys
  • Games were validated by rendering in browser and checking for core features

What’s Next

This comparison revealed something unexpected: bigger and more expensive doesn’t mean better code. Mistral Small (the smallest cloud model) produced the cleanest output. DeepSeek V4 Flash (0.7 temp) produced the most code but with more bugs. And Groq/Cerebras won’t build games at all but are happy to play them.

Upcoming posts will extend this benchmark to:

  • Iterative builds — which model fixes its bugs fastest with a second prompt
  • Bot performance — which LLM survives longest when playing its own game
  • Larger scope — how models handle a 500-line game spec vs this 150-word prompt