Skip to main content
Back

OpenGame Lets Coding Agents Build and Test Browser Games Locally

Nexu-io open-sourced OpenGame, a local MCP toolkit that turns 20+ coding agents into a full-stack studio for 3D and mini-games.

Pro

Repo, Full Access
  • Nexu-io open-sourced OpenGame, a local MCP server turning coding agents into a game studio
  • Works with 20+ coding agents including Claude Code, Codex, DeepSeek, Gemini CLI, and Cursor
  • Ships 25 playable templates across 3D, voxel, anime, pixel, and 9:16 formats with editable source
  • 12 MCP tools enforce validation, 3-tier balance simulation, headless playtesting, cover capture, and auto trailers
  • Multimodal Model Gateway supports BYOK art, music, voice, and video, with procedural fallbacks requiring no keys
  • Apache 2.0 licensed, built on Node.js 22.18+, React 19, Three.js, and Puppeteer for headless QA

OpenGame is a new open-source toolkit for building browser games with coding agents. Created by the team behind OpenDesign, it combines a local Model Context Protocol server with a React-based Studio for generating playable 3D worlds, narrative games, and portrait-mode ads. MCP provides a standard way for an agent to call local tools and receive structured results.

The team describes OpenGame as a “Super Game Agent,” a marketing label for the scaffolding around the underlying model. The agent writes and revises the game, while OpenGame supplies templates, project conventions, asset generation, testing, and export tools. The Apache 2.0 repository is written primarily in TypeScript, targets Node.js 22.18 or newer, and produces browser-based HTML5 projects.

A local stack with inspectable output

Each generated project keeps its core implementation available as editable source. A typical game contains an index.html entry point, deterministic logic in logic.js, a vendored copy of Three.js for 3D work, and design records under the design/ directory.

Component What it provides
React Studio A local interface for browsing, running, and remixing projects.
Template library Twenty-five editable games spanning 3D, voxel, anime, pixel-art, and 9:16 formats, including a Three.js speedboat racer and a pull-the-pin physics puzzle.
MCP server Twelve game-engineering tools exposed under the openmotion_game_* namespace.
Agent Skill The openmotion-game Skill and 18 handbooks covering character, camera, and controls, along with game feel, stylization, audio, and playable-ad requirements.
Design records plan.md, style.md, assets.csv, and verification.md files that document the intended game and its test results.
Model Gateway Connections to external image, music, voice, and video services through developer-supplied API keys.

MCP opens the agent roster

OpenGame’s published compatibility list includes DeepSeek TUI/Harness, Claude Code, Codex CLI, WorkBuddy, OpenCode, Hermes, Antigravity, Gemini CLI, Grok Build, Kimi CLI, Cursor Agent, Qwen Code, Qoder CLI, GitHub Copilot, Pi, Kiro CLI, Kilo, Mistral Vibe, Reasonix, Aider, Devin, and Trae CLI. Other MCP-compatible hosts can connect through stdio, the local standard-input and standard-output transport commonly used by MCP servers.

The MCP tools and Skill retain the project’s earlier openmotion naming, which developers must use in configuration files and agent prompts. Host configuration varies because each agent stores MCP server definitions in a different location and schema.

Local setup

  1. Install Node.js 22.18 or newer, clone the repository, and start the Studio:
    git clone https://github.com/nexu-io/opengame.git
    cd opengame
    npm ci
    npm run build:studio
    npm start
  2. Install the game-development Skill:
    npx skills add nexu-io/opengame --skill openmotion-game
  3. Copy the repository’s stdio MCP configuration into the selected agent host, then restart that host so it can discover the local tools.

The test loop targets common failures

OpenGame routes generated projects through automated checks that give the agent concrete failures to repair. The workflow covers source structure, deterministic behavior, balance, browser input, asset loading, and media capture.

  1. Static and tick validation: The validator checks index.html, asset and content-delivery-network policies, and required deterministic exports. It then runs a 50-tick smoke test with a target execution time below 5 milliseconds per tick.
  2. Balance simulation: Three bounded headless routes test whether a skilled reference player reaches a win milestone, a weak route struggles, and an idle player loses cleanly within 2,500 ticks.
  3. Browser playtesting: Headless Chromium drives keyboard, mouse, and touch input across one to four clients. It checks control responsiveness, a 390-by-844 mobile viewport, media URLs, console output, and network failures.
  4. Cover capture: The pipeline records a 1280-by-720 cover image from the running game canvas.
  5. Trailer generation: Three five-second gameplay clips are captured at 1280 by 720 and assembled into an editable video of roughly 19 seconds.

The automated suite catches unreachable goals, missing loss states, broken input, invalid assets, and browser errors before export. Its bounded routes sample specific behavior, leaving subjective pacing, accessibility, broad device coverage, security review, and adversarial edge cases for additional testing.

Remix begins with working mechanics

Each of the 25 templates includes editable controls, tuning parameters, deterministic rules, and automated test hooks. Selecting Remix in the Studio, or requesting a remix through an agent, creates an owned draft that can replace characters, palettes, sprites, textures, music, and genre styling while preserving the underlying project structure.

Template-based work also makes model selection more economical. A lower-cost model can handle palette changes, copy revisions, and asset regeneration, while a stronger model can focus on original mechanics or complex 3D implementation.

Procedural media fills the gaps

The Model Gateway connects media generation directly to a game project. OpenGame’s documentation lists several suggested services:

  • Images: GPT Image 2.6, Seedream 5.5, Nano Banana 2, FLUX, and Codex Image.
  • Music: ElevenLabs Music v2 and Suno v4.
  • Voice: ElevenLabs v3, BytePlus TTS 2, and Kokoro.
  • Video: Wan 2.7 and Seedance 2.5.

A project can remain runnable with no external API keys by using Canvas-generated sprites, Web Audio synthesis, and procedural Three.js geometry. External services introduce their own pricing, data-retention policies, availability constraints, and media-license terms.

The publishing ladder

Status Target Details
Available HTML5 export A self-contained web project that developers can inspect and host.
Available OpenDesign Cloud A static share link for distributing a playable build.
Roadmap Guided publishing Staged L1-to-L4 packaging scripts, checklists, and Skills for platform delivery.
Roadmap Additional platforms WeChat Mini Games, Douyin Mini Games, TikTok, Xiaohongshu Mini-Tools, itch.io, Poki, and CrazyGames.

The 9:16 mode targets common playable-ad conventions, including interaction from the first frame, an animated hand tutorial, short level progression, looping background music, and an App Store or Google Play call-to-action card. Acceptance still depends on each advertising network’s package size, tracking, content, and runtime requirements.

Production responsibilities remain

OpenGame fits developers prototyping web games, testing coding-agent workflows, or producing variations from proven mechanics. Its deterministic simulation and browser automation address several recurring weaknesses in generated games, especially missing end states, broken controls, and asset-loading failures.

The core workflow runs locally without a hosted subscription, while API-backed media generation can send prompts and assets to external providers and incur usage charges. OpenDesign Cloud adds optional hosted sharing. Teams evaluating the project for production should review generated code, dependencies, browser performance, accessibility, provider terms, and platform-specific packaging. The Apache 2.0 license covers the OpenGame repository; generated and imported media may carry separate rights and restrictions.