Make games with ChatGPT, from chat to Codex

By GamesByAI · Updated · 17 sources

ChatGPT can make a small browser game right in the chat, and Codex, OpenAI’s coding agent, builds games that span many files. Every ChatGPT plan includes both. Tool facts below are as of September 2026 and link to their sources.

Which ChatGPT route should you take?

Take the chat for a first playable page, and Codex for a game with several files that you keep editing.

Route What it is Good for
Chat A ChatGPT conversation where code blocks can show a preview A one-file game in minutes
Codex in the desktop app The ChatGPT desktop app combines ChatGPT, ChatGPT Work and Codex A multi-file game in a project folder
Codex CLI or IDE extension Codex in your terminal, or in VS Code, Cursor and Windsurf Your own tools and terminal workflow
Codex cloud Tasks that run in the cloud from chatgpt.com/codex Changes you review before you merge

Sources: code blocks, desktop app, Codex README and Codex cloud. The Codex game development guide covers the last three routes in depth.

Route 1: a one-file game in the chat

Ask for one HTML file with everything inline, then select Preview on the code block to play it inside ChatGPT. OpenAI’s help center lists HTML pages and React components among the content a code block can preview (code blocks).

Previews run in a sandbox, and one that loads external packages or web resources depends on your workspace’s network settings (canvas article). A file with no libraries has nothing to load. If the preview still stays blank, save the file as index.html and open it in your own browser.

Write a complete one-file HTML game with inline JavaScript and CSS and no external libraries. The player steers a small boat with drag or arrow keys and collects coins for 60 seconds while dodging rocks. End each run on a score screen. It must work on a phone.

Send follow-ups one change at a time, each small enough to test in a single run:

Rocks start drifting sideways after 30 seconds.

Save the best score in localStorage and show it on the end screen.

When a change breaks the game, you know which message did it.

Route 2: Codex in the ChatGPT desktop app

Codex is the route for a game you keep building, because it works on the files in a project folder and runs the tools installed on your machine (CLI docs). The desktop app runs on macOS, Windows and Linux; choose Codex, then open a folder or create a project (desktop app).

Its built-in browser opens pages, clicks, types, takes screenshots and checks the result in the page. It works in ChatGPT on the web and in the desktop app, but not in the Codex CLI or IDE extension (browser docs).

OpenAI’s own browser-game workflow for Codex sets a project up in four steps (Codex use case):

  1. Plan with the /plan command and save the plan to PLAN.md.
  2. Write standing rules in AGENTS.md, which Codex loads into context automatically (best practices).
  3. Add skills: Playwright Interactive plays the build in a live browser, and ImageGen makes sprites, backgrounds and UI elements.
  4. Test after every feature. In the page’s words: “Use playwright to test the visual output of your work, and iterate if it doesn’t look right or fit the vibe.”

The same page suggests Next.js with Phaser or PixiJS, plus Fastify, WebSockets, Postgres and Redis when the game needs a backend. It also says to save the prompts behind every batch of generated assets, so you can make more that match.

For each task, OpenAI’s best-practice guide names four parts of a good prompt: the goal, the context, the constraints and a “done when” condition (best practices).

Goal: add a boss wave to the boat game at 45 seconds. Context: the game loop is in src/game.js and enemies are in src/enemies.js. Constraints: no new libraries, and it must stay smooth on a phone. Done when: the boss appears at 45 seconds, takes five hits, and a browser screenshot shows its health bar.

OpenAI’s post on building games with GPT-6 Astra shows how far that can scale. Void Explorer has 2,048 star systems and more than 10,000 procedurally generated planets, built with TypeScript, Vite and Three.js on WebGPU. Playwright loads named test scenes and checks landing, walking, saving and takeoff without anyone flying across the universe by hand.

The post’s advice is to “start with one thing you want to feel right, give it a few visual references, and test the result” (Building games with Astra).

Publish the game

Sites can publish it from inside ChatGPT. OpenAI says Sites “lets ChatGPT create, host, refine, and share websites, web apps, and games.” It is in public beta for Plus, Pro, Business, Enterprise and Edu plans, with plan-specific usage limits (Sites). In OpenAI’s game post, one prompt does it: “Use @Sites to deploy this game and give me a link.” The game goes out with public access, so anyone can play it in a browser.

To host the game yourself, itch.io takes a zip with index.html at the root and needs relative asset paths (itch.io docs). GitHub Pages serves HTML, CSS and JavaScript files straight from a repository (GitHub docs).

Then submit your game. The editorial policy lists what we accept, and every game is reviewed before it’s listed. If you plan to charge for it, read selling AI-made games.

Which GPT model should you pick?

Start with GPT-6 Astra. OpenAI’s model list says to use it if you’re not sure where to start and calls it its flagship for complex reasoning and coding. In the chat, your plan decides which models you can pick.

Model What OpenAI says it is for Released
GPT-6 Astra Its most capable model, for the most demanding work September 3, 2026
GPT-6.1 Sol Near-Astra performance at a lower cost, for complex coding and professional work September 29, 2026
GPT-6 Luna Its most efficient model, for focused, high-volume tasks September 22, 2026

GPT-6.1 Sol arrived a week after GPT-6 Sol, which launched with Luna on September 22. The model list now shows 6.1, while the plan comparison still names GPT-6 Sol. Release dates come from the API changelog (changelog).

Cost, as of September 2026

OpenAI’s pricing page says ChatGPT Work and Codex are included in the Free, Go, Plus, Pro, Business, Edu and Enterprise plans (pricing).

Plan Price What OpenAI says about Codex
Free $0 Explore Codex capabilities on quick coding tasks
Go $8 a month Use Codex for lightweight coding tasks
Plus $20 a month Power a few focused coding sessions each week
Pro From $100 a month Plans at $100, $200 or $500 a month

Business costs $20 per user a month. OpenAI says model choice, context, reasoning, tool use, retrieval and caching all affect how fast you use your allowance, and it lists GPT-6 Luna in the desktop app for Free and Go, subject to rollout.

ChatGPT and Codex games in the catalog

Data note: as of September 30, 2026, the catalog lists 403 games, and 367 of them are Vibe Jam 2026 entries (jam rules: at least 90% of the code written by AI). Creators name the tools themselves, mostly in the jam submission form. We don’t verify them.

Creators name Codex on 72 games and ChatGPT on 5. Starwind Route, Three Suns and towershot name ChatGPT alone, and BoneCrawler’s creator says Claude, ChatGPT and Codex handled code generation while Gemini was used for planning.

Measure ChatGPT games Codex games All 403 listed games
Listed games 5 72 403
Use Three.js 3 51 265
Playable on mobile 5 43 256
Online multiplayer 1 36 173

At Vibe Jam 2026, Starwind Route placed 200th and Three Suns 217th of 945 entries.

GPT-6 Astra is named as a model on 4 games, among them little flock, Meridian Wake and Chess3dastra. According to its entry, little flock was made with GPT-6 Astra in Codex.

Browse them on the ChatGPT hub, the Codex hub, the GPT-6 Astra hub or games made with OpenAI models.

Keep building

Games to look at

Questions

Can ChatGPT make a game?

Yes, for small browser games. OpenAI's help center says code blocks in ChatGPT can preview HTML pages and React components, and 5 of our listed games name ChatGPT as their tool. For bigger games, use Codex.

Is ChatGPT free for making games?

You can start free. OpenAI says Codex is included in every ChatGPT plan, and the Free plan offers it for quick coding tasks. Some chat features vary by plan, and Sites hosting is not on the Free and Go plans.

Can ChatGPT publish my game?

Sites, in public beta for Plus, Pro, Business, Enterprise and Edu plans, can host web apps and games. OpenAI's game post shows a prompt that deploys the game with @Sites and returns a link. You can also host the files yourself.

What is the difference between ChatGPT and Codex?

ChatGPT is OpenAI's chat assistant. Codex is its coding agent, which works on the files in a project, and both are included in ChatGPT plans. The ChatGPT desktop app combines them.

Which GPT model is best for games?

For a multi-file game in Codex, start with GPT-6 Astra: OpenAI's model list recommends it when you're not sure, as its flagship for complex reasoning and coding. GPT-6.1 Sol offers near-Astra performance at a lower cost, and GPT-6 Luna is the efficient model that Free and Go users get in the desktop app.