How to Make a Game with ChatGPT, and What to Do When Chat Runs Out
ChatGPT can write a working game in a single reply, as long as the game is small and you know how to run what it gives you. Past a certain size, a chat window stops being a good place to build: it cannot see your game running, it loses track of many files, and it cannot put the game on a phone or in a store. This guide shows the route that works in chat, where it stops, and the ways past each wall.
What chat alone gets you
In a chat, ChatGPT writes code as text. You copy it, save it and run it yourself. For games, the simplest version of that is one HTML file containing everything: the page, a canvas, and the game's JavaScript. Any browser runs it, with no install.
OpenAI's help center says canvas can render HTML and React code in a sandbox, so you may be able to see a small game inside ChatGPT itself. Even so, save a copy of the file and run it on your own machine, so you can keep it, change it and test it on a phone.
A first game in chat, step by step
- Ask for one file. "Write a complete browser game in a single HTML file, no outside libraries. A frog crosses three lanes of traffic using arrow keys or swipes. Reaching the top scores a point; a car hit ends the run. Show the score and a restart button."
- Save and open it. Paste the reply into a text editor, save it as
game.html, and open it in a browser. - Report what you see. If nothing appears, open the browser's developer console and paste the red error into the chat. If it runs but feels wrong, say exactly how: "The frog moves two lanes per swipe" works better than "controls are broken".
- Ask for the whole file back. Partial snippets ("replace the update function with this") are easy to paste in the wrong place. Until the file gets long, ask for the complete updated file each time.
- Change one thing per message. Movement, then cars, then score, then difficulty. Test after each.
- Keep the numbers together. Ask it to put speeds, spawn rates and sizes in one table at the top of the file, so you can tune them yourself without another round trip.
Simple arcade games, puzzles and card games fit this well: a frog crossing, a snake, a breakout, a memory match, a small idle clicker.
Where chat stops
It cannot see the game run
ChatGPT knows what the code says, not what happened on your screen. Every bug goes through you: you notice it, describe it and paste the error. That is fine for ten bugs and slow for a hundred.
Long files and many files
As the game grows, one file becomes thousands of lines, and asking for the whole file back stops being practical. Splitting it into many files means you carry the structure in your head and paste the right pieces into each conversation. Changes start to break things the chat cannot see.
Testing on a phone
A file on your computer is not on your phone. You need to serve it on your local network or put it on a web page, then test touch controls, screen sizes and performance on a real device. Chat can explain how, but you do the steps.
Art
ChatGPT's plans include image generation, listed on its pricing page as limited on Free. One picture is easy. A game needs many pieces in one style: characters with animation frames lined up on a sheet, tiles that join, buttons that match, all at sizes the code expects. Getting that from separate image requests, and fitting each into the game, is slow work.
Exporting
Putting a web game on Google Play or the App Store means wrapping it in a native app, installing build tools, signing it and filling in store forms. Chat can talk you through it, but it cannot run the tools. For the store steps, see how to publish a game on Google Play and how to publish a game on the App Store.
The routes past chat
A coding agent
A coding agent works on your files directly and runs commands, so it can edit many files at once, run tests and read errors itself. OpenAI's own is Codex, which its docs list in a CLI, an IDE extension, the cloud and the ChatGPT apps; the pricing page shows Codex as limited on the Free and Go plans and included on Plus. Other agents work the same way; our guide to making a game with Claude Code walks through the setup, testing and export with one.
You still test on a phone yourself and still need art, but the copying and pasting go away.
A game engine
An engine such as Godot gives you an editor, physics, a way to run the game instantly, and export tools for phones and desktops. You can keep asking ChatGPT for scripts and explanations while the engine handles running and exporting. The cost is learning the engine.
An AI game maker
A tool built for games handles the parts chat leaves to you: running every build, the art in one style, and the exports. You describe the game rather than paste code.
Tips that save the most time
- Name the input up front. Say touch, keys or both, and portrait or landscape, in the first message.
- Ask what it assumed. After the first version, ask "What did you assume that I did not say?" and correct the answers.
- Save working versions. Keep a copy of every version that runs, named by number, so you can go back.
- Start a fresh chat for a big change, and paste the current file in, so old attempts do not confuse it.
Where Tyrbo fits
Tyrbo is a browser AI game maker, with nothing to install. You describe a game; it asks a few questions, shows a plan and concept art, then builds it and tests every build to confirm it builds, boots, answers touch and keys, and plays. It keeps save points, makes the art in one style (animated 2D, rigged 3D, UI, sound and music), and exports a signed Android build, an iOS Xcode project you sign on a Mac, desktop builds and a web zip. You own the game and upload it to the stores yourself. Plans are on monthly credits, with a 4.99 dollar seven-day trial of Pro; see pricing.
Honest limits
Chat is a good teacher and a quick way to a first playable file. It is not a place to keep a growing game. Move to an agent, an engine or a game maker once the file gets long or the game needs to reach a phone.
Questions people ask
Can ChatGPT make a full game?
It can write a small, complete game as one HTML file that you save and open in a browser. Larger games outgrow the chat: it cannot see the game run, struggles with many files, and cannot test on a phone or publish to a store for you.
How do I run a game ChatGPT wrote?
Ask for a single HTML file with no outside libraries, paste the reply into a text editor, save it with an .html ending and open it in a browser. If it does not work, copy the error from the browser console back into the chat.
Can ChatGPT make the art for my game?
It can make single images. A game needs many pieces in one style, with animation frames and sizes the code expects, which takes much more work to get from separate image requests.
What should I use when a ChatGPT game gets too big?
A coding agent that edits your files and runs commands, a game engine with its own editor and export tools, or an AI game maker that runs, tests, draws and exports the game for you.
Make the game this guide is about.
Make your gamePlan it free with a free account. Then build it: 7 days of Pro for $4.99, then $29 a month unless you cancel.