Codex game development with a clear finish line
On this page
Codex works in your game folder
Codex is OpenAI’s coding agent, and you can use it in a bunch of places. It comes as a command-line tool, an IDE extension for VS Code, Cursor and Windsurf, a desktop app and a cloud version at chatgpt.com/codex (README), and the command-line tool is open source under the Apache-2.0 license.
If you came here for the board or card games called Codex, they’re totally unrelated and just share the name.
You sign in with a ChatGPT account or use an OpenAI API key. From there, Codex reads your project, edits files and runs the tools already installed on your machine (CLI docs). All of this is as of September 2026, so if something looks different when you try it, the linked pages will have the current version.
The engine is still up to you. For a web game, Codex writes the code for a library like Three.js or Phaser. For Godot or Unity it writes GDScript or C#, and MCP servers let it work the editor as well. You add one with codex mcp add <name> -- <command>, and it works in the CLI, the IDE extension and the desktop app (MCP docs).
The community godot-mcp server runs a Godot project and reads its debug output, and MCP for Unity works with any MCP client. Unity’s official agent plugin supports Codex too, for Unity 6 or later. For setup and safety, see MCP servers for game development.
Set up Codex in a game folder
Install the command-line tool with npm install -g @openai/codex or brew install --cask codex, or use the install script or a GitHub release (README). Then run codex in your game folder and choose Sign in with ChatGPT.
It’s worth running /permissions early, since that’s where you choose what Codex may do without asking and see which folders it can write to (CLI docs).
Next, add an AGENTS.md file. Codex reads it before it starts work, first from your Codex home folder, then from the repository root down to the current folder, and files closer to where you work override earlier ones (AGENTS.md docs).
By default it stops reading at 32 KiB, and OpenAI’s guide says a short, accurate file is more useful than a long one full of vague rules (best practices). For a Phaser game, it can really be as short as this.
- Stack: Phaser from npm, Vite, TypeScript; game code in src/
- Run: npm run dev, then open http://localhost:5173
- Controls: arrow keys and touch; every action works with both
- Rules: relative asset paths only; run npm test after every change
Write a first prompt with a finish line
OpenAI’s best-practices guide says a strong prompt has four parts, which are the goal, the context, the constraints and a “done when” condition (best practices). A first game prompt in that shape might look like this.
Goal: a 60-second arcade game where you catch falling fruit with a basket. Context: an empty folder, Three.js from a CDN. Constraints: keyboard and touch controls, no build step, relative asset paths. Done when: it loads on a phone and each round ends on a score screen.
For anything bigger, plan first. OpenAI’s browser-game use case starts with a PLAN.md that sets the player goal, the main loop, controls, win and fail states, difficulty, visual direction, the stack and the milestone order (use case), which is a pretty complete list. Plan mode, /plan, lets Codex gather context before it writes any code (best practices).
Pick the model with /model. OpenAI suggests starting with Light reasoning for GPT-6 Astra, High for GPT-6 Luna and your account’s default effort for GPT-6.1 Sol (models).
Settle phones and multiplayer in the plan too. If you name the control schemes and how another player joins, those turn into checks you can actually run.
Iterate one mechanic at a time
Build one mechanic per loop, and have Codex run the build or tests after each one. In OpenAI’s browser-game use case, a Playwright Interactive skill even lets Codex play each build in a live browser and tune controls, timing and UI feel against the real game (use case).
When something looks wrong, pass Codex a screenshot with codex --image, and when you want to pick up where you left off, codex resume reopens a recent chat in the same repository.
Right before a commit, /review makes a nice last check, since it reports prioritized findings without changing your files (CLI docs).
And commit after every loop that leaves the game playable.
Test in a live browser
If you use ChatGPT on the web or the desktop app, the Codex browser can open localhost pages, click, type, take screenshots and verify results (browser docs). It’s a little more limited elsewhere, though, since it isn’t in the CLI or the IDE extension. It also keeps its own profile and can’t automate file uploads.
In the CLI, a browser MCP server does the same job, and you add it with codex mcp add playwright -- npx @playwright/mcp@latest. For checks you can rerun after every change, playtesting games with AI adds a game-state hook and a Playwright smoke test.
OpenAI’s use case also pairs Codex with an ImageGen skill for concept art, sprites and UI, and it has a clever tip, which is to save the image prompts in files so later batches match (use case). To keep generated art in one style, see how to make game assets with AI.
Cloud tasks take a different route. You connect GitHub, let Codex set up an environment and describe the task, then review the diff and test results before you commit or open a pull request (Codex cloud).
Publish and get it listed
Codex cloud tasks can end in a pull request, and on a connected GitHub repository Cloudflare Pages builds a preview URL for every one of them, ready to play before you merge (Cloudflare docs).
For a quick share, itch.io takes a zip with an index.html and needs relative asset paths (itch.io docs).
Then submit your game, and check the editorial policy for what we accept. If you plan to charge for it, read selling AI-made games too.
A haunted grocery race and a bonsai garden credit Codex
Creators list Codex for Fanto’s Mega-Mart and WenWare, both among the Vibe Jam winners (results post), and the catalog’s Codex games run from that haunted-grocery racer to a bonsai garden. In the first you race through a haunted grocery store, and in the second you guess where and when a historical scene takes place.
That jam’s official page required at least 90% of the code to be written by AI.
Kanso, a calm bonsai game that won Most Zen in a field of 945 entries (jam press page), names Codex too, and its creator says they built it in about a week.
Napless is a multiplayer toddler brawler and Effective Immediately a first-person shooter, while Fanto’s Mega-Mart is designed for desktop play.
Codex, Claude Code and Cursor lead the catalog’s tool counts, and Action is the most common genre among Codex games. The table counts games as of November 21, 2026 by each creator’s own tool credit, from a jam submission form or a README, which we take at their word and don’t verify independently.
| Measure | Codex games | All 588 listed games |
|---|---|---|
| Listed games | 101 | 588 |
| Vibe Jam 2026 entries | 77 | 414 |
| Use Three.js | 67 | 322 |
| No engine stated | 14 | 151 |
| Playable on mobile | 53 | 293 |
| Online multiplayer | 42 | 200 |
Every Codex game is on the Codex hub.
Use the Codex allowance in your ChatGPT plan
You don’t need a separate Codex subscription, because it’s included in every ChatGPT plan (OpenAI pricing).
| Plan | Monthly price |
|---|---|
| Free | $0 |
| Go | $8 |
| Plus | $20 |
| Pro | $100, $200 or $500 |
Even Plus covers Codex on the web, in the CLI, in the IDE extension and on iOS.
The pricing page counts usage in local messages per five-hour period, and the range depends on the model and the task. If you’re on Plus or Pro and you hit the limit, you can buy credits.
| Model | OpenAI’s description | Released |
|---|---|---|
| GPT-6 Astra | Most capable, for complex work across code, apps and research | September 3, 2026 |
| GPT-6.1 Sol | Near-Astra performance for complex work, at a lower cost than Astra | September 29, 2026 |
| GPT-6 Luna | Most efficient, for focused high-volume tasks | September 22, 2026 |
GPT-6.1 Sol comes with Plus, Pro, Business, Enterprise and Edu, though Enterprise and Edu admins have to turn it on first. Free and Go users get GPT-6 Luna in the desktop app (models page).
The release dates come from OpenAI’s API changelog. Some OpenAI pages still name GPT-6 Sol, which came out on September 22, 2026, so don’t be thrown if you see it.
In the catalog, model attribution is incomplete. The model named most often is Claude Opus 5.5, but that doesn’t tell us which model made most of these games.
Give Codex more tools, or try the others
MCP servers for game development gives Codex a browser, Blender or your engine. If you’re comparing tools, best AI for game development puts Codex next to Claude Code, Cursor and three other tools, and Claude Code vs Codex for game development has the two agents side by side.
Claude Code game development runs the same workflow with Anthropic’s coding agent, and make games with ChatGPT covers the chat route at OpenAI. For the tool-neutral basics, see how to make a game with AI and vibe coding a game.
Or just browse the OpenAI games, the Three.js games and the Vibe Jam 2026 archive.
Games to look at
, Online multiplayerFanto's Mega-Mart
Race through a haunted grocery store at rocket speed, grabbing items as you go.
, Phone friendly , Online multiplayerWenWare
Guess the place and year of a 360-degree historical scene.
, Phone friendlyKanso
Grow and tend digital bonsai trees in calm, pretty scenes.
, Phone friendly , Online multiplayerNapless
Brawl as a toddler and race to grab the TV remote before nap time.
Effective Immediately
Shoot your way out of a collapsing office nightmare as a burned-out worker.
Questions
Can Codex make a game?
Yes. Fanto's Mega-Mart and WenWare both finished on the Vibe Jam podium, and both list Codex as their tool. OpenAI even publishes a browser-game use case that starts with a plan and has Codex play each build in a live browser.
Which game engine works with Codex?
Any engine whose code lives in text files. OpenAI's browser-game use case suggests Phaser or PixiJS, while Godot and Unity work through MCP servers that let Codex run the editor. In our catalog, Fanto's Mega-Mart and WenWare took the Three.js route.
Can Codex generate game art?
Yes, through a skill. OpenAI's browser-game use case pairs Codex with an ImageGen skill for concept art, sprites and UI assets, and it suggests saving your image prompts in files so later batches stay consistent.
What is Codex in games?
In this guide, Codex means OpenAI's coding agent, which people use to build games. The name also belongs to board games, card games and video games that have nothing to do with it.