How to make a game with Claude (chat, Artifacts and Claude Code)
Three ways to build a game with Claude: a one-prompt Artifact, a multi-file project in Claude Code, or Claude connected to Unity or Godot through MCP.
Quick answer
You can make a game with Claude three ways: ask it in chat for a single-file HTML game and preview it as an Artifact, use Claude Code to build a multi-file project on your computer, or connect Claude to Unity or Godot through MCP. Beginners should start with an Artifact, then move to Claude Code when the file gets large.
Which Claude option fits you?
- Artifacts (in the Claude chat): best for your first game. Nothing to install, and it's available on the free plan. Claude writes one HTML file and shows a playable preview next to the chat.
- Claude Code: best once your game outgrows one file. It works on a project folder on your computer, in the terminal, in an editor or in the Claude desktop app. It's included with paid Claude plans (Pro and up) or pay-as-you-go API billing, not the free plan.
- Claude + a game engine through MCP: for Unity or Godot projects. Community-made MCP servers let Claude read and change your engine project. This is the most setup, so try it after you've finished a smaller game.
Steps
Start an Artifact with a tiny game. In a new Claude chat, describe one small game and ask for a single HTML file. For example: "Make a complete browser game in a single HTML file: a ball you move with the arrow keys that collects stars and avoids red blocks. Show the score, end the game on hit, and press R to restart." Claude shows it as an Artifact you can play right away.
Play it and ask for one change at a time. Say exactly what you saw: "The ball moves too fast, halve the speed." Small requests are easier to check, and if something breaks, you know what caused it.
Save your work. Download or copy the Artifact's code into a file called index.html and open it in your browser. Keep a copy each time the game works, so you can go back if a change goes wrong.
Move to Claude Code when the file gets long. When one file becomes hard to change, open Claude Code in a project folder and ask it to split the game into a few files (for example: game logic, drawing, input).
Add a project rules file. Claude Code reads a CLAUDE.md file in your project. Write your rules there, such as "Plain JavaScript, no frameworks", "Keep game logic separate from drawing" and "Run the game and check for errors after every change".
Plan first, then build. Ask Claude to write a plan for a feature and to ask you clarifying questions before it writes code. Approve the plan, then let it build one step at a time.
Share it and get it tested. Host the game on itch.io, Netlify or GitHub Pages, then post it on AI Game Universe so other makers can playtest it.
How do you connect Claude to Unity or Godot?
Unity and Godot don't have Claude built in. Instead, you install an MCP server for your engine. These are mostly community projects, so check that one is actively maintained and read what it can change before you use it. Then you add it to Claude Code or the Claude desktop app. Claude can then read your scenes and scripts and make changes in your project. Commit your project to git first, so you can undo anything you don't like. If you get stuck, ask in Advice.
What have builders learned from making games with Claude?
- Have Claude write a simulator for balancing. Ask it for a "headless" version of your game logic that plays itself thousands of times with no graphics. Then ask it to report win rates or how long a run lasts. This is much faster than tuning numbers by hand.
- Keep logic and graphics separate. Game rules in one place and drawing in another makes it easier for Claude to change one without breaking the other.
- Use a solid background for AI-made sprites. If you generate sprites with an image tool, ask for a plain magenta background. A color that doesn't appear in your art is easy to remove in code or an editor.
- Show it what you see. Claude handles game logic well but can't always picture your layout. Describe the problem precisely, or paste a screenshot in the chat.
What turns a prototype into a real game?
Before you call it done, check these:
- Core loop: is the main thing you do fun for at least a few minutes?
- Onboarding: can a new player understand it without you explaining?
- Saving: does high score or progress survive a refresh? (localStorage works for browser games.)
- Audio: a few sound effects make a big difference. See Add sound to your game.
- Menus: a start screen, a pause button and a clear game-over screen with restart.
Frequently asked questions
Is Claude good at making games?
Yes, especially for game logic and code structure. It's weaker at visual layout when it can't see the screen, so describe exactly what looks wrong or share a screenshot.
Is the free Claude plan enough to make a game?
For small single-file games built as Artifacts, yes. Claude Code needs a paid plan or API billing. Check claude.com/pricing for current plans.
Is Claude or ChatGPT better for making games?
Both can make small browser games. The best choice depends on your project's size and which tool you like working with. Many makers try the same prompt in both and keep the better result.
Can Claude balance my game?
Yes, if you have it write a simulator that plays your game many times and reports the results. Then you adjust the numbers based on real data instead of guessing.
How big can a game made with Claude get?
There's no fixed limit. Single-file Artifacts work best for small games. For bigger projects, use Claude Code with multiple files and a project rules file, so Claude can work on one part at a time.
Ask the community — answers earn credits, so people do help.
💬 0 comments
No comments yet. Tried this guide? Say how it went.