Skip to Content
🚀 OpenGame Playable Ads SAAS — AI-generated playable ads from $9/creative
User GuideQuickStart

Quickstart

👏 Welcome to OpenGame!

This quickstart will have you generating a playable web game from a prompt in just a few minutes.

Before you begin

Make sure you have:

  • A terminal or command prompt open
  • An empty folder where the generated game will live
  • An OpenAI-compatible API key (or a local deployment of GameCoder-27B)
  • Node.js 20+ . Run node -v to check.

Step 1: Install OpenGame

Install from source while we prepare the npm release:

git clone https://github.com/leigest519/OpenGame.git cd OpenGame npm install npm run build npm link

This exposes the opengame command globally on your PATH.

Step 2: Configure authentication

Set up an OpenAI-compatible endpoint:

export OPENAI_API_KEY="your-api-key-here" export OPENAI_BASE_URL="https://api.openai.com/v1" # optional export OPENAI_MODEL="gpt-4o" # optional; swap in GameCoder-27B when running locally

You can also run /auth inside an interactive session to switch authentication methods.

Step 3: Start your first session

mkdir snake-game && cd snake-game opengame

You’ll see the OpenGame welcome screen. Type /help for available commands.

Build your first game

Describe the game you want

Try a simple prompt:

Build a Snake clone with WASD controls and a dark theme.

OpenGame will:

  1. Plan the architecture (engine choice, files, game loop, state).
  2. Scaffold the project using Template Skill.
  3. Write the code, install dependencies, and run the game in a sandboxed browser.
  4. Use Debug Skill to catch errors, broken interactions, and missing assets — and fix them automatically.
  5. Stop when the game is playable end-to-end.

When done, open the printed local URL (or index.html) in your browser to play.

Iterate on it

Just keep talking to OpenGame:

add a power-up that doubles the snake's speed for 5 seconds
make the background a starfield instead of solid black
the snake passes through itself when going fast — fix that

OpenGame will edit the relevant files, re-run the game, and verify the change.

Headless mode

For scripts and CI, skip the interactive UI:

opengame -p "Build a memory-matching card game with 16 cards and a 60-second timer."

Essential commands

CommandWhat it doesExample
opengameStart OpenGame (interactive)opengame
/authChange authentication method/auth
/helpDisplay help information for available commands/help or /?
/compressReplace chat history with a summary to save tokens/compress
/clearClear terminal screen content/clear
/themeChange OpenGame visual theme/theme
/languageView or change language settings/language
/quitExit OpenGame/quit or /exit

See the commands reference for the full list.

Pro tips for game prompts

Be specific about gameplay

  • Instead of: “make a platformer”
  • Try: “Build a single-screen platformer with arrow-key controls, double jump, 3 enemies that patrol left-right, and a goal flag at the top-right.”

Specify the engine if you care

  • “Use Phaser 3 for this.”
  • “Plain HTML5 canvas, no external libraries.”
  • “Use three.js for a 3D first-person view.”

Iterate one thing at a time

  • Make the core loop work first, then add polish (sound, particles, menus).

Getting help

  • In OpenGame: type /help or ask “how do I…”
  • Documentation: you’re here! Browse other guides.
  • Community: open an issue or discussion at github.com/leigest519/OpenGame .