NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

OpenGame: Open Agentic Coding for Games

Yilei Jiang, Jinyuan Hu, Qianyin Xiao, Yaozhi Zheng, Ruize Ma, Kaituo Feng, Jiaming Han, Tianshuo Peng, Kaixuan Fan, Manyuan Zhang, Xiangyu YuearXiv 2026

TL;DR

OpenGame is the first open-source agentic framework designed for end-to-end 2D web game creation from natural language specifications. By combining a domain-specialized model (GameCoder-27B) with an evolving "Game Skill" mechanism and a playability-focused evaluation benchmark (OpenGame-Bench), it successfully navigates the complex, multi-file engineering challenges that typically cause general-purpose LLMs to fail.

What Problem Does This Paper Address?

While modern Large Language Models (LLMs) excel at generating isolated code snippets or solving discrete algorithmic problems, they hit a "complexity wall" when tasked with building fully playable video games. Game development requires orchestrating real-time update loops, physics engines, asset pipelines, and tightly coupled states across multiple files.

The authors identify three primary failure modes in frontier models attempting game generation:

  1. Logical Incoherence: Models lose track of global state across the game loop, causing games to freeze or fail to realize key mechanics.
  2. Engine-Specific Knowledge Gaps: General models misuse or ignore native engine abstractions (like physics or event systems), trying to re-implement them from scratch.
  3. Cross-File Inconsistencies: Projects break due to mismatched asset keys, flawed scene wiring, or incorrect initialization orders, even if individual files look plausible.

Furthermore, traditional software engineering benchmarks rely on static unit tests, which are fundamentally unsuited for evaluating the temporal and interactive nature of gameplay.

End-to-end agentic game generation with OpenGame across distinct genres.

Methods

OpenGame addresses these challenges through a structured architecture combining a specialized foundation model and an evolving agent workflow:

  • GameCoder-27B: Built on top of a Qwen3.5-27B backbone, this model is trained via a three-stage pipeline: Continual Pre-Training (CPT) on open-source Phaser and JS game repositories, Supervised Fine-Tuning (SFT) on curated game design prompts, and execution-grounded Reinforcement Learning (RL) at the component level to ensure code executability.
  • Autonomous Agent Workflow: A 6-phase operational process spanning initialization/classification, scaffolding, design generation, multimodal asset synthesis (generating images, animations, and audio), code implementation, and verification.
  • Game Skill (Agent Evolution): Rather than writing code from scratch, the agent utilizes two evolving capabilities:
  • Template Skill: Grows a library of specialized project skeletons (e.g., top-down continuous motion, gravity-based side view) from experience, drastically reducing the generation search space.
  • Debug Skill: Maintains a living protocol of verified fixes derived from compilation and runtime outcomes to systematically resolve recurring integration errors.
The OpenGame architecture, featuring model training, agent workflow, and skill evolution.

Datasets

The authors introduce OpenGame-Bench, a new evaluation pipeline to assess interactive web game generation. It consists of 150 unique natural-language prompts spanning five distinct genres: platformers, top-down shooters, puzzle games, arcade classics, and strategy games.

Unlike static benchmarks, OpenGame-Bench evaluates projects dynamically via headless browser execution and Vision-Language Model (VLM) judging across three dimensions:

  • Build Health (BH): Compilation and runtime stability.
  • Visual Usability (VU): Coherence, animation, and interactability of rendered content.
  • Intent Alignment (IA): Satisfaction of the user's original prompt requirements.

Key Insights and Ideas

  • Hooks over Scratchpad: Forcing an agent to write entire implementation scripts from scratch frequently introduces fatal lifecycle errors. OpenGame uses a Template Method Pattern, where the agent copies stable skeletons and overrides designated hook methods, drastically improving stability.
  • Proactive Debugging Matters: Traditional debugging is reactive (fixing syntax errors after compilation fails). OpenGame's Debug Skill includes lightweight pre-execution validations to catch high-frequency inconsistencies (like missing configuration fields or mismatched asset keys) before compiling.
  • Spatially Grounded Environments are Easier: Agents perform significantly better in physics-centric environments (like platformers) where mechanics are tightly bound to visible rendering. Abstract genres (like strategy or puzzle games) suffer from silent logic desynchronizations that don't trigger compiler crashes, making them harder for agents to self-correct.

Key Results

  • State-of-the-Art Performance: When powered by Claude Sonnet 4.6, OpenGame establishes a new SOTA on OpenGame-Bench, achieving BH = 72.4, VU = 67.2, and IA = 65.1, outperforming the strongest baseline (Cursor) across all dimensions.
  • Highly Competitive Custom Model: OpenGame equipped with the custom-trained GameCoder-27B (63.9 BH / 57.0 VU / 54.1 IA) outperforms all open-source and direct closed-source LLM baselines, matching or exceeding much larger proprietary agentic systems.
  • Efficiency of Iterative Repair: Ablation studies show that the steepest performance gains occur within the first 3 automated debugging iterations, effectively resolving most cross-file inconsistencies before plateauing at iteration 5.
Performance metrics as a function of the maximum allowed automated debugging iterations.
Intent Alignment (IA) scores across different game genres, highlighting OpenGame's strength in physics-centric environments.

Limitations and Future Work

Despite setting a new benchmark, game generation remains an open challenge; even the top-performing OpenGame configuration leaves roughly 34.9% of mechanical requirements unsatisfied.

The framework's primary limitation lies in abstract genres (Strategy, Puzzle/UI), where logical errors (e.g., inventory tracking bugs or match-three rule violations) happen silently without crashing the engine. Because there are no explicit error traces or compiler warnings for these failures, the agent struggles to detect and repair them. The authors note that developing explicit trace signals for silent logical desynchronizations is a crucial direction for future work.

Summary updated

BibTeX
@misc{jiang2026opengame,
  author = {Yilei Jiang and Jinyuan Hu and Qianyin Xiao and Yaozhi Zheng and Ruize Ma and Kaituo Feng and Jiaming Han and Tianshuo Peng and Kaixuan Fan and Manyuan Zhang and Xiangyu Yue},
  title = {{OpenGame: Open Agentic Coding for Games}},
  year = {2026},
  eprint = {2604.18394},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2604.18394},
}
Figure