Make games with ChatGPT, from chat to Codex
On this page
ChatGPT can make a small browser game right in the chat, and Codex, OpenAI’s coding agent, builds games that span lots of files. The nice part is that every ChatGPT plan includes both.
Everything here is as of September 2026, and the links mostly go to OpenAI’s own pages, so you can check what’s changed.
Which ChatGPT route should you take?
Use the chat for a first playable page, and Codex for a game with several files that you keep working on.
| 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 |
The table draws on OpenAI’s pages on code blocks, the desktop app, the Codex README and Codex cloud. Our Codex game development guide covers the last three routes in depth.
Preview 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). That’s actually why the prompt below asks for no libraries, since then there’s 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.
Then 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.
That way, when a change breaks the game, you know which message did it.
Open a project folder in Codex
Codex is really 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, and you just choose Codex, then open a folder or create a project (desktop app).
Its built-in browser does a lot, since it 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 it doesn’t work in the Codex CLI or IDE extension (browser docs).
OpenAI’s own browser-game workflow for Codex sets up a project in four steps (Codex use case).
-
Plan with the
/plancommand and save the plan toPLAN.md. -
Write standing rules in
AGENTS.md, which Codex loads into context automatically (best practices). -
Add skills. Playwright Interactive plays the build in a live browser, and ImageGen makes sprites, backgrounds and UI elements.
-
Test after every feature. The page says “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 even 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 says a good prompt has four parts, 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 its health bar is visible in a browser screenshot.
OpenAI’s post on building games with GPT-6 Astra shows how far that can scale. Its example, Void Explorer, is built with TypeScript, Vite and Three.js on WebGPU, and the post gives the size of its world.
| World detail | Size |
|---|---|
| Star systems | 2,048 |
| Procedurally generated planets | More than 10,000 |
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
You can publish right from inside ChatGPT with Sites. OpenAI says Sites “lets ChatGPT create, host, refine, and share websites, web apps, and games.” It’s in public beta for Plus, Pro, Business, Enterprise and Edu plans, with plan-specific usage limits (Sites).
In OpenAI’s game post, the whole thing takes one prompt: “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.
If you’d rather 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 first.
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 it calls Astra its flagship for complex reasoning and coding. In the chat, though, 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 came out a week after GPT-6 Sol, which launched alongside GPT-6 Luna.
The model list already shows GPT-6.1 Sol, while the plan comparison still names GPT-6 Sol. We took the release dates from the API changelog (changelog).
Match your ChatGPT plan to the coding workload
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 up your allowance. It also lists GPT-6 Luna in the desktop app for Free and Go, subject to rollout.
ChatGPT can share code generation with other tools
Starwind Route, Three Suns and towershot name ChatGPT alone. BoneCrawler’s creator, on the other hand, says Claude, ChatGPT and Codex handled code generation, while Gemini was used for planning.
Starwind Route placed 200th at Vibe Jam, and Three Suns placed 217th.
That jam’s rules required at least 90% of the code to be written by AI. The counts below are as of November 14, 2026, and they’re only as good as what creators reported. The tool names come from the jam submission form or a project README, and we don’t verify them independently.
| Measure | ChatGPT games | Codex games | All 588 listed games |
|---|---|---|---|
| Listed games | 19 | 101 | 588 |
| Use Three.js | 5 | 67 | 322 |
| Playable on mobile | 8 | 53 | 293 |
| Online multiplayer | 2 | 42 | 200 |
GPT-6 Astra is named as a model on 10 games, among them little flock, Meridian Wake and Chess3dastra. According to its entry, little flock was made with GPT-6 Astra in Codex.
You can browse them all on the ChatGPT hub, the Codex hub, the GPT-6 Astra hub or among games made with OpenAI models.
Move the game into a project folder
When the chat version outgrows one file, Codex game development covers the agent workflow in depth. Claude Code vs Codex for game development and best AI for game development put the agents side by side. Game assets with AI covers sprites, sound and 3D models for the game you just built.
Cursor game development and make games with Gemini answer the same question for two other tools. For the tool-neutral basics, see how to make a game with AI and vibe coding a game, and the Vibe Jam 2026 archive has every jam entry we list.
Games to look at
, Phone friendlyStarwind Route
Sail a Mediterranean trade route, recruit tavern companions, and dodge pirates.
, Phone friendlyThree Suns
Place gravity anchors to keep a world alive under three unpredictable suns.
, Phone friendlytowershot
Fire shots with a single button and place each one with careful spatial judgment.
, Phone friendlyBoneCrawler
Explore a dark gothic world and fight through fast combat in an NES-style action game.
, Online multiplayerlittle flock
Tend a shared flock of sheep on a cozy farm with other players.
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 19 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 isn't on the Free and Go plans.
Can ChatGPT publish my game?
It can. Sites, in public beta for Plus, Pro, Business, Enterprise and Edu plans, hosts web apps and games, and 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, while Codex is its coding agent, which works on the files in a project. Both are included in ChatGPT plans, and 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, since OpenAI's model list recommends it when you're not sure and calls it 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.