Repolode
studioigor

studioigor/ref2game

An agent skill for Claude Code and Codex that turns one reference image into a playable 2D browser game prototype.

Stars
296
Forks
41
Open issues
2
Last commit
23 days ago

What is it?

ref2game takes a screenshot, key art or concept image and produces a playable 2D game prototype in the browser. AI image generation paints the art piece by piece in the reference's style, while the movement, lighting, particles, camera and HUD are written as code in a small WebGL2 engine. The page updates live as the agent works.

The project ships as two editions of the same skill: a claude/ folder for Claude Code and a codex/ folder for Codex. Both share the engine, the rigs, the automated checks and the reference handling. Sprites are built from cut-out rigs with two-bone limbs, so walk cycles and animal movement are driven by joints rather than by moving a whole image.

The pipeline runs from asking a few setup questions, through a first frame compared against the reference, to a static playable build with textures, a manifest and sources. Each reported defect is fixed and then covered by an automatic check, and background critics score the asset, motion and fidelity of the result.

Key features

  • 01Generates art piece by piece in the reference's style, with the engine handling motion and effects.
  • 02Builds actors from cut-out rigs with two-bone limbs and joint-level measurement.
  • 03Provides automated motion checks such as foot slide and stride.
  • 04Reloads the browser page on each change while keeping play state.
  • 05Delivers a static playable build with textures, manifest and sources.

Use cases

  • Turning a game concept screenshot into a clickable prototype for a pitch or playtest.
  • Experimenting with 2D game genres such as platformers or top-down shooters from one picture.
  • Prototyping animated sprites from concept art without hand-building a rig.
  • Exporting a small browser game build from an agent session.

Quick start

  1. 1

    Send the install prompt to your agent (Claude Code or Codex)

  2. 2

    Use the claude/ folder for Claude Code or the codex/ folder for Codex

  3. 3

    In Claude Code send /ref2game, or in Codex send $ref2game, with your reference image attached

Things to know

  • Requires Claude Code or Codex, and runs only on macOS or Linux.
  • Needs Python 3.9+ and Node.js 18+; Playwright with Chromium is installed on first run.
  • ffmpeg is required for video references and video renders.
  • Image generation in the Claude Code edition depends on an image API or tool you choose and pay for.

In collections

Topics

FAQ

What is ref2game?
An agent skill for Claude Code and Codex that turns one reference image into a playable 2D browser game prototype. ref2game takes a screenshot, key art or concept image and produces a playable 2D game prototype in the browser. AI image generation paints the art piece by piece in the reference's style, while the movement, lighting, particles, camera and HUD are written as code in a small WebGL2 engine. The page updates live as the agent works.
Is ref2game free to use? What license does it have?
ref2game is open source under the MIT license. Check the license terms before using it in commercial products.
Is ref2game still maintained?
Actively maintained. The last commit to ref2game was on Oct 15, 2026.
What can I use ref2game for?
Turning a game concept screenshot into a clickable prototype for a pitch or playtest. Experimenting with 2D game genres such as platformers or top-down shooters from one picture. Prototyping animated sprites from concept art without hand-building a rig. Exporting a small browser game build from an agent session.
How do I install ref2game?
Send the install prompt to your agent (Claude Code or Codex) Use the claude/ folder for Claude Code or the codex/ folder for Codex In Claude Code send /ref2game, or in Codex send $ref2game, with your reference image attached
Where can I get ref2game?
The source code and installation instructions are on GitHub: https://github.com/studioigor/ref2game

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects