# How to Make a Game with AI (And Share It Instantly)

> Learn how to make a game with AI using ChatGPT or Claude, then turn the HTML file into a shareable link anyone can play in their browser.

Published: 2026-06-13  
Author: Damjan Malis (Founder, dropthis)  
Canonical: https://dropthis.app/blog/how-to-make-a-game-with-ai/

## Key takeaways

- AI tools like ChatGPT and Claude generate complete, playable browser games from a single plain-English prompt — no coding experience required.
- The hardest part is no longer building the game. It is getting the finished HTML file from your computer to a URL someone else can open.
- Vibe coding — describing what you want and letting AI write the code — works best for self-contained HTML5 games: arcade clones, puzzles, quizzes, and card games.
- A CLI command or API call can turn the generated HTML file into a live, shareable link in under ten seconds, skipping git repos and deploy pipelines entirely.
- ChatGPT excels at rapid prototyping with multimodal input; Claude produces more structured, longer code and renders playable previews inside the chat via artifacts.

If you want to learn how to make a game with AI, the good news is it takes minutes now, not months. ChatGPT alone has [900 million weekly active users](https://techcrunch.com/2026/02/27/chatgpt-reaches-900m-weekly-active-users) as of early 2026, and a growing share of them generate working browser games from a single prompt. You describe what you want in plain English, and the AI writes the entire game as a single HTML file you can open in a browser. The harder problem — the one every tutorial skips — is what happens after the AI hands you that file. You have a working game on your laptop. Your friends have a link that leads nowhere. This guide covers both halves: building the game and turning the result into a URL anyone can play.

That second half is the gap in every top-ranking article on this topic. They cover prompting, iteration, and polish in detail, then end with "save the file." We will not do that. The last mile — from local HTML file to shareable link — is where most AI-generated games die, and it is the easiest step to fix.

## What kinds of games can you build with AI?

Browser-based games that run in a single HTML file work best. AI coding assistants generate self-contained documents — HTML for structure, CSS for styling, JavaScript for logic — and the result plays in any browser without installs or dependencies. The sweet spot is games that rely on simple mechanics and minimal assets.

Proven categories, ranked by how reliably AI produces a working version on the first prompt:

- **Arcade clones** — Snake, Pong, Breakout, Flappy Bird. Simple rules, canvas rendering, immediate feedback. One developer [built three complete browser games in a single day](https://linuxbeast.com/blog/how-i-built-3-browser-games-in-one-day-with-claude-ai/) using Claude, including synthesized sound effects via the Web Audio API.
- **Puzzle and logic games** — Sudoku, 2048, Minesweeper, sliding tiles. Grid-based state is something language models handle cleanly.
- **Trivia and quiz games** — the AI generates both the engine and the questions. Easy to customize for a specific audience.
- **Typing tests and word games** — Wordle clones, anagram solvers, speed-typing challenges.
- **Card and board games** — Blackjack, memory matching, simple turn-based strategy.
- **Clicker and idle games** — minimal UI, exponential math, satisfying progression loops.

What does not work well in a single prompt: 3D games requiring asset pipelines, multiplayer games needing a server, or anything with dozens of sprites and levels. Those are possible with AI assistance, but they [require a project structure rather than a single file](https://howworks.ai/blog/how-to-make-a-game-with-ai).

## What do you need to learn how to make a game with AI?

Everything you need to go from idea to playable browser game is free. You do not need a game engine, a framework, a package manager, or any prior coding experience. The barrier to entry has dropped to three items that most people already have on their computer:

1. **An AI chat tool.** ChatGPT (free tier works) or Claude (free tier works). Both produce complete HTML games from a text prompt.
2. **A text editor or file manager.** To save the AI output as an `.html` file. Notepad, VS Code, or even the download button on a Claude artifact.
3. **A web browser.** To open and test the game locally. Chrome, Firefox, Safari — any modern browser runs HTML5 Canvas and JavaScript.

No game engine. No framework. No package manager. No terminal, unless you want to publish (more on that later). You can make a game with ChatGPT or make a game with Claude — both work as an AI game maker no coding required. This is the [vibe coding](https://www.merriam-webster.com/slang/vibe-coding) workflow that Andrej Karpathy coined in February 2025. Collins Dictionary named it word of the year for 2025. What follows is essentially a vibe coding game tutorial — the fastest way most beginners build a browser game with AI in 2026.

## How to make a game with AI: step-by-step walkthrough

This walkthrough shows how to create a game with AI using a Snake game as the example. The same steps work for any game type listed above. You write one prompt, generate the code, test it in your browser, and refine it with follow-up messages. The entire process takes five to fifteen minutes depending on how much polish you want.

### Step 1: write a specific prompt

Vague prompts produce vague games. Include the genre, controls, visual style, scoring, and end conditions. Here is a prompt that works on both ChatGPT and Claude:

```
Create a complete Snake game in a single HTML file.
Use HTML5 Canvas for rendering.
Arrow keys to control direction.
Score counter in the top-left corner.
Speed increases every 5 points.
Game over screen showing final score with a restart button.
Use a dark background with a neon green snake.
```

The more specific you are about mechanics and visual style, the fewer follow-up prompts you need.

### Step 2: generate and test

Paste the prompt. ChatGPT returns the code in a code block — copy it and save it as `snake.html`. Claude renders it as an [artifact you can play inside the chat](https://catalog.bensbites.com/tutorial/create-an-html5-web-game-with-claude) and also lets you copy or download the source.

Open the file in your browser. The game should be playable immediately. If the snake moves through walls when it should wrap, or the score does not increment, describe the bug in a follow-up message. The AI fixes targeted bugs faster than broad redesigns.

### Step 3: iterate with follow-up prompts

Good follow-up prompts for polishing:

- "Add sound effects using the Web Audio API — a short beep when the snake eats food and a low buzz on game over."
- "Add a high-score tracker that persists across page reloads using localStorage."
- "Center the canvas and add a title screen with a start button."
- "Make it mobile-friendly: add touch controls and scale the canvas to the viewport."

Each follow-up refines the game without starting from scratch. Keep changes small and test after every round. AI handles incremental edits reliably; asking it to change five things at once increases the chance of regressions.

### Step 4: save the final file

Copy the final version and save it as a `.html` file, or download it directly from Claude's artifact panel. This file is your complete game — it runs anywhere a browser exists. The question is no longer "does it work?" It is "how does anyone else play it?"

## How do you go from AI output to a playable link?

This is the step that kills most AI-generated games. You have a file. You need a URL. The traditional path — create a GitHub repo, configure a static site host, push, wait for a build — was designed for developers maintaining projects over months. You just want your friend to play Snake.

Even free hosts like [Netlify's free tier offering 100 GB bandwidth and 10 GB storage](https://www.netlify.com/pricing/) are overkill when all you have is one HTML file.

The options, from simplest to most involved:

| Method | Steps | Requires account | URL permanence | Programmatic |
| --- | --- | --- | --- | --- |
| CLI publish tool | 1 command | Yes (one-time login) | Depends on plan | Yes |
| Drag-and-drop host | Upload in browser | Varies | Varies | No |
| GitHub Pages | Git repo + push + config | Yes | Permanent | Yes (via git) |
| Netlify/Vercel | Git repo or drag-and-drop | Yes | Permanent | Yes (via git/CLI) |

For a single HTML file, a CLI publish tool is the fastest path. One command, one URL back:

```bash
dropthis snake.html
# → https://your-game.dropthis.app/
```

The link works immediately. Anyone with it can open the game in their browser — no downloads, no accounts, no app stores. On a free plan, the link stays live for 7 days, which covers playtesting and [sharing AI-generated work](/blog/pillars/sharing-ai-work/) with friends. Permanent links are available on paid plans.

This is the step the existing tutorials leave out. The AI did its job. The infrastructure to share the result should take seconds, not hours.

## Can you share your AI game without deploying to a server?

Yes, and you have three paths that skip traditional server deployment. Each trades convenience for control: sending the file directly is instant but creates friction for the recipient, using a built-in share link is zero-setup but gives you no control over the URL, and publishing to a static host costs one command but gives you a stable link you own.

**Send the file directly.** Email the `.html` file or share it via messaging. The recipient saves it and opens it in their browser. This works but creates friction: most people will not open an unknown HTML file from a message, and mobile devices make it harder.

**Use Claude's built-in share link.** If you built the game as a Claude artifact, Claude can publish it to a public share link. This is the fastest zero-setup option. The trade-off: the URL lives on Anthropic's domain, you cannot update the content in place, and you have no control over how long it stays live. For a deeper comparison, see [how to share Claude artifacts at a URL you control](/blog/how-to-share-claude-artifacts/).

**Publish to a static host.** A CLI command or API call uploads your file and returns a permanent URL on a domain you control. This is the middle ground — faster than setting up a full deploy pipeline, more reliable than sending raw files. Tools that accept a single HTML file without requiring a git repo are the right fit here.

The pattern that works: generate the game, test it locally, publish HTML game online with one command, share the link. If you want to share AI generated game online with friends or the public, the whole loop from prompt to playable URL takes under five minutes.

## How do you polish an AI-generated game before sharing it?

AI produces a working first draft, but turning it into something people actually enjoy playing takes a few more rounds of prompting. Focus on game feel first — movement speed, collision detection, and restart flow — then layer in sound effects, persistence, and mobile support. These tips come from building and publishing dozens of AI-generated browser games.

**Nail the game feel first.** Movement speed, collision detection, and restart flow matter more than visual polish. If the controls feel sluggish or the hitboxes are wrong, no amount of CSS will fix it. Prompt the AI to adjust these before anything else.

**Add sound with the Web Audio API.** AI generates synthesized sound effects — beeps, chimes, explosions — using oscillators and gain nodes, all in code. No audio files needed. One developer's Claude-generated games included [engine hums, explosions, and level-up chimes all synthesized in JavaScript](https://linuxbeast.com/blog/how-i-built-3-browser-games-in-one-day-with-claude-ai/).

**Use localStorage for persistence.** Ask the AI to save high scores, unlocked levels, or game state in `localStorage`. The data survives page reloads so players can come back to their progress.

**Test on mobile.** Add this follow-up prompt: "Make the game responsive. Scale the canvas to fit the viewport and add touch controls for mobile." Most AI-generated games default to keyboard controls. A five-second prompt fixes that.

**Keep the file self-contained.** Resist the urge to split the game into multiple files or add a build step. The power of a single HTML file is that it publishes anywhere with zero configuration. One file in, one URL out. The moment you introduce dependencies, you need a bundler, and the simplicity advantage disappears.

## What are the best AI game-making tools in 2026?

The landscape splits into two categories: general-purpose AI chat tools that generate game code, and specialized AI game builders with visual editors. With [over 900 million people using ChatGPT weekly](https://techcrunch.com/2026/02/27/chatgpt-reaches-900m-weekly-active-users), the chat tools dominate casual game creation. For larger projects with asset management, the specialized tools earn their place.

| Tool | Best for | Output format | Cost | Needs coding? |
| --- | --- | --- | --- | --- |
| ChatGPT | Fast prototypes, multimodal prompts (sketch + text) | HTML/JS code block | Free tier available | No |
| Claude | Structured code, in-chat preview via artifacts | HTML artifact (playable + downloadable) | Free tier available |  No |
| Rosebud AI | Beginners, text-to-game with built-in art | Playable browser game | Free tier available | No |
| Cursor / Claude Code | Larger projects, multi-file games | Project files | Free tier / subscription | Light coding |
| GDevelop | 2D games with visual scripting + AI assist | Exportable game | Free + paid tiers | No |

For the workflow this article covers — prompt, generate, publish, share — ChatGPT and Claude are the starting point. ChatGPT excels at rapid iteration and [accepts image uploads alongside prompts](https://howworks.ai/blog/how-to-make-a-game-with-ai), so you can sketch a game layout and ask it to build what you drew. Claude tends to produce longer, more organized code and gives you a [playable preview inside the chat window](https://catalog.bensbites.com/tutorial/create-an-html5-web-game-with-claude) via artifacts.

Both are capable of generating a complete, working browser game from a single prompt. The real differentiator is not which AI you use — it is what you do with the output. An HTML file on your desktop is a game only you can play. [Published to a URL](/blog/how-to-publish-website-made-with-chatgpt/), it is a game anyone with a browser can play. That is the step worth optimizing, and it is the step most [AI publishing workflows](/blog/how-ai-agents-publish-to-the-web/) now handle in a single command.

## Frequently asked questions

### Can I make a game with AI without coding?

Yes. Tools like ChatGPT and Claude accept a plain-English description of your game and return a complete HTML file with markup, styles, and JavaScript. You paste the prompt, copy the output, and open it in a browser. The AI handles all the code. Your job is describing what the game should do and playtesting the result.

### How do I share an AI-generated game with friends?

Copy the HTML file the AI produced and publish it to any static host that accepts a single file. A CLI tool or API call returns a live URL in seconds. Send that link to anyone — they open it in a browser with no downloads or accounts needed. No git repository or deploy pipeline required.

### What types of games can AI build?

Browser-based games that run in a single HTML file work best: Snake, Pong, memory matching, typing tests, trivia quizzes, platformers, clicker games, and card games. Anything that fits in HTML5 Canvas or DOM elements with JavaScript. Complex 3D games or titles needing large asset libraries are harder to generate in one prompt.

### Is ChatGPT or Claude better for making games?

Both produce working browser games. ChatGPT handles multimodal input well, so you can sketch a game concept and upload the image alongside your prompt. Claude tends to produce longer, more structured code and lets you play the game directly inside the chat via artifacts. Try both with the same prompt and compare results.

## Sources

- [How to Make a Game with AI: Complete Beginner's Guide (2026)](https://howworks.ai/blog/how-to-make-a-game-with-ai) — HowWorks
- [Create an HTML5 web game with Claude](https://catalog.bensbites.com/tutorial/create-an-html5-web-game-with-claude) — Ben's Bites
- [Claude vs ChatGPT for Making Games (2025 Comparison)](https://buildwithstar.com/blog/claude-vs-chatgpt-games) — Star
- [ChatGPT reaches 900M weekly active users](https://techcrunch.com/2026/02/27/chatgpt-reaches-900m-weekly-active-users) — TechCrunch
- [How I Built 3 Browser Games in One Day With Claude AI](https://linuxbeast.com/blog/how-i-built-3-browser-games-in-one-day-with-claude-ai/) — LinuxBeast
- [Vibe coding (slang definition)](https://www.merriam-webster.com/slang/vibe-coding) — Merriam-Webster
- [Netlify pricing — free tier details](https://www.netlify.com/pricing/) — Netlify