FROM CODE TO GAME WORLDS

Code2Games: Enabling Coding Agents
for Gaming World Generation

Wei Wu1* Ziyang Xu1* Zeyu Zhang1*† Yang Zhao2 Hao Tang1‡

1 School of Computer Science, Peking University 2 La Trobe University

* Equal contribution. † Project lead. ‡ Corresponding author.

Generated game worlds

10 games / 20 videos

Underwater Exploration

Exploration
Coral Reef Survey
Blackwater Survey

Monster Hunt

Action adventure
The Thornback Hunt
Stormwood Hunt

Third-Person Shooter

Tactical action
Rainforest Recon
Coastal Infiltration

Desert Rally

Racing
Desert Storm Rally
Oasis Rally

First-Person Shooter

Sci-fi combat
Ridgeline Uplink
Red Desert Assault

Block World

Resource exploration
Forest Expedition
Canyon Scavenger

Temple Adventure

Exploration & running
Jungle Relic Run
Ridgeline Recon

Alpine Skiing

Sports
Alpine Slalom
Golden-Hour Descent

Flight Missions

Flight
Dawn Corridor
Summit Intercept

Archer Hunt

Stealth action
Desert Assassination
Wasteland Hunt

Overview

Code2Games workflow: a game intent and a base world pass through scene analysis, gameplay planning, gaming world generation, and game engine customization.
Overview of Code2Games, which transforms a game intent and its paired base world into a gaming world and adapts it to a game engine.

Results

Visual Quality and Interactive Fidelity on GameCode4D
Score ↑ · Axis: 55–100Scroll to compare →
  • OpenGame + Qwen3.8-Max
  • AutoUE + Qwen3.8-Max
  • Qwen Code + Qwen3.8-Max
  • Codex + GPT-5.6 Sol
  • Claude Code + Opus 5
  • Ours + Qwen3.8-Max
  • Ours + GPT-5.6 Sol
  • Ours + Claude Opus 5
Grouped bar chart comparing eight methods on GameCode4D. The score axis runs from 55 to 100. All scores are shown above their bars. Focus or hover over a bar to identify its method and score. 55 60 65 70 75 80 85 90 95 100 62.8 80.5 94.1 78.5 65.0 67.0 63.1 82.2 93.8 80.3 65.8 68.7 61.7 77.8 93.5 75.2 60.8 64.8 63.3 83.2 94.9 80.7 67.8 69.2 63.6 81.8 95.1 80.0 66.0 68.4 64.3 84.8 94.9 83.1 70.6 70.3 65.4 87.2 95.8 86.3 76.2 74.4 66.1 88.2 96.1 87.5 75.8 73.9 IQ Dynamic Motion Setting Inter. Physics
Playable-Game Quality on GameCode4D
Score ↑ · Axis: 25–85Scroll to compare →
  • OpenGame + Qwen3.8-Max
  • AutoUE + Qwen3.8-Max
  • Qwen Code + Qwen3.8-Max
  • Codex + GPT-5.6 Sol
  • Claude Code + Opus 5
  • Ours + Qwen3.8-Max
  • Ours + GPT-5.6 Sol
  • Ours + Claude Opus 5
Grouped bar chart comparing eight methods on GameCode4D. The score axis runs from 25 to 85. All scores are shown above their bars. Focus or hover over a bar to identify its method and score. 30 40 50 60 70 80 53.5 39.8 43.6 39.7 60.8 54.5 38.9 44.3 39.0 61.3 43.5 31.0 35.8 30.4 51.5 58.1 42.9 45.4 40.4 64.2 56.8 42.2 46.0 41.5 63.8 58.2 46.0 51.5 45.5 68.0 67.8 54.8 59.5 54.3 75.5 68.8 56.7 61.0 57.0 77.5 M D V A Human