Skip to main content
Back

CUHK's OpenGame Turns a Single Prompt Into a Fully Playable Web Game

CUHK researchers release OpenGame, an open-source agent that turns a single text prompt into a fully playable browser game, complete with its own specialized 27B code model and a new benchmark for evaluating interactive software generation.

  • OpenGame is an open-source framework from CUHK MMLab that generates fully playable browser games from a single text prompt, end-to-end. GitHub
  • The system ships with GameCoder-27B, a code model trained via continual pre-training, SFT, and execution-grounded RL on game engine code.
  • Its core innovation is Game Skill: an evolving library of project templates (Template Skill) and a living debugging protocol (Debug Skill) that accumulates verified fixes across tasks.
  • On the new OpenGame-Bench (150 game prompts, scored on Build Health, Visual Usability, Intent Alignment), OpenGame outperforms Cursor and qwen-code by up to 6.2 points. Paper
  • Strengths are physics-centric genres (platformers: 76.8 IA, top-down shooters: 71.4 IA); weaknesses are abstract logic games (strategy: 58.2, puzzle/UI: 52.6) where failures are silent.
  • Available now under Apache 2.0, requires Node.js 20+ and your own LLM API keys; OpenGame-Bench evaluation pipeline coming soon.

OpenGame is a new open-source agentic framework from CUHK MMLab that takes a single natural-language prompt and produces a fully playable, multi-file web game end-to-end. We are not talking about a static HTML page with a bouncing ball. The demos include a side-scrolling Avengers beat-em-up with three selectable heroes, a King of Fighters-style quiz fighting game, a Squid Game reflex survival clone, and a Harry Potter card-battle game with a trivia combo system. All generated from a paragraph of text.

Why existing agents keep failing at this

Game development sits at the intersection of creative design and intricate software engineering, demanding the joint orchestration of game engines, real-time loops, and tightly coupled state across many files. While LLMs and code agents now solve isolated programming tasks with ease, they consistently stumble when asked to produce a fully playable game from a high-level design, collapsing under cross-file inconsistencies, broken scene wiring, and logical incoherence.

The paper identifies three specific failure modes that plague general-purpose models when asked to build games:

  • Logical incoherence: the model loses track of global state across the game loop, producing projects that freeze or never realize key mechanics.
  • Engine knowledge gaps: general models re-implement mechanics from scratch instead of correctly using framework-native physics, scene, and event systems.
  • Cross-file inconsistencies: even when individual files look plausible, the overall project breaks due to mismatched asset keys, flawed scene wiring, or broken initialization order.

A common failure mode is that base LLMs bypass multi-file software engineering by defaulting to single-file vanilla HTML5/JavaScript implementations. OpenGame is built specifically to fight all of these failure modes at once.

The architecture: three interlocking pieces

OpenGame is not just a clever prompt. It is a full system with three coupled components: a domain-specialized code model, a structured multi-phase agent workflow, and an evolving memory of reusable skills.

GameCoder-27B is the foundation model powering the agent. It is a code LLM specialized for game engine mastery through a three-stage pipeline of continual pre-training, supervised fine-tuning, and execution-grounded reinforcement learning. Concretely:

  1. Continual Pre-Training (CPT): the Qwen3.5-27B backbone is adapted on a large corpus of open-source Phaser and JavaScript/TypeScript game repositories, official docs, and community tutorials, building a strong prior over game loops, physics systems, and state management.