Make Your First Game With AI: A Beginner Walkthrough

By TBOG Team - November 22, 2026 - 5 min read

You can make your first game with AI in about half an hour, with no coding experience. Ask an AI chatbot to write a small game as a single HTML file, save that text as a file on your computer, and open it in your web browser. Then play it, notice what feels wrong, and ask the AI to fix one thing at a time.

Quick answer: the 6 steps

  1. Pick one tiny game idea.
  2. Write a clear prompt that asks for one HTML file.
  3. Copy the full answer into a text file and save it as mygame.html.
  4. Double-click the file to open it in your browser.
  5. Play it and write down what to change.
  6. Ask for one change at a time until it feels right.

This works with most general AI chatbots, such as ChatGPT, Gemini or Claude. The steps are the same whichever you use.

What should your first game be?

Smaller than you think. The most common beginner mistake is asking for too much at once. A first game should have:

  • One action (tap, drag, or arrow keys)
  • One thing to avoid or collect
  • A score
  • A way to lose and restart

Good starter ideas: dodge falling blocks, catch falling stars in a basket, tap targets before they shrink, or keep a ball from touching the floor. Skip story, levels, menus and shops for now.

Avoid asking for a copy of a famous game by name. Describe the mechanic in your own words instead. You get something that is actually yours, and you avoid copying someone else's work.

How do you write the prompt?

Be specific about the action, the rules, the device and the format. Here is a prompt you can copy and adjust:

Make a simple game as one single HTML file with all the CSS and JavaScript inside it. Do not use any external libraries or images. Use an HTML canvas. I control a small square at the bottom of the screen with the left and right arrow keys, and on a phone by dragging my finger. Circles fall from the top at random positions. If a circle touches me, I lose one of 3 lives. Each circle that reaches the bottom without touching me adds 1 point. Show the score and lives at the top. The falling speed should start slow and increase a little every 10 points. When lives reach zero, show "Game Over" with the score and let me tap or press Space to restart.

Why each part matters:

  • "One single HTML file" means you only have one thing to save and open.
  • "No external libraries or images" means nothing can fail to load.
  • "Canvas" is a standard browser feature for drawing games, so the code stays simple.
  • Controls for both keyboard and touch make it work on your phone too.
  • Clear win, lose and restart rules turn a moving picture into a game.

How do you save and open the file?

  1. Copy the AI's whole code answer. It should start with <!DOCTYPE html> and end with </html>.
  2. Open a plain text editor. On Windows, Notepad works. On a Mac, use TextEdit and switch to plain text first (Format, then Make Plain Text).
  3. Paste the code and save the file as mygame.html. Make sure the name ends in .html, not .txt.
  4. Double-click the file. It opens in your default browser and the game starts.

That is it. You made a browser game. It runs entirely on your own computer.

What if it does not work?

Don't worry, this is normal. Try these in order:

  • Blank page? You may have copied only part of the code. Copy it again, all of it.
  • File opens as text? It was saved as .txt. Rename it to end in .html.
  • Something is broken? Open your browser's developer console (usually F12, or right-click and choose Inspect, then Console). Copy any red error message and paste it back to the AI with "fix this error."
  • Still stuck? Ask the AI to "rewrite the whole file from scratch with the fix included," so you don't have to patch pieces together.

How do you make it actually fun?

This is the real game design part, and it is where your judgment matters more than the AI's. Play for two or three minutes and ask yourself:

  • Is the start too hard or too easy?
  • Does the speed increase feel fair?
  • Do the controls feel quick or sluggish?
  • Do I want to play again after losing?

Then ask for one change at a time. Small, specific requests work best:

  • "Make the player move 30% faster."
  • "Start the circles slower and increase speed more gradually."
  • "Add a best score that stays after I restart."
  • "Add a short flash when I lose a life."
  • "Make everything bigger on phone screens."

After each change, save the new full file and play again. If a change makes things worse, go back to the version that worked. Keeping copies like mygame-v1.html and mygame-v2.html makes that easy.

How do you play it on your phone?

The easiest way is to use your desktop browser's device mode, found in the developer tools, which shows how the page looks on a phone-sized screen. You can also send the file to your phone and open it in the phone's browser, though some phones handle local files differently. If touch controls feel off, tell the AI exactly what happens: "When I drag, the square jumps instead of following my finger."

What about tools that do all of this for you?

If copying code is not for you, dedicated tools handle the files and hosting:

  • Rosebud AI lets you describe a game in a chat, shows a preview next to it, and lets you publish it and share a link.
  • Google Playground, launched in October 2026 as an experiment, builds browser games from a text description. At launch it was limited to US users aged 18 and older.

They are faster to start but give you less direct control over the code. The single-file method above teaches you more about how games actually work. For a wider look at what these tools can do, see can you build a game with one prompt.

Where should you go from here?

Once your first game works, try one new idea per game: a second enemy type, a power-up, a timer mode. Each one teaches you something about why games feel good or bad.

It also helps to play small, well-tuned games to see how they handle pace and controls. Our own Puzzle Master is a good example of how little a game needs to be satisfying, and you can find more on our play page. We are also working on ways to build and play your own games right here on TBOG, which you can read about in build your own games on TBOG: what we are working on.

Questions people ask

What do I need to make a game with AI?

A computer with a web browser, a text editor (the one built into your computer is fine) and access to an AI chatbot. No coding experience or game engine is needed for a first simple game.

How long does it take to make a first game with AI?

A simple playable version can take 15 to 30 minutes. Making it feel good usually takes longer, because you will want to adjust speed, controls and difficulty over several rounds.

Why does my AI-made game not work?

Common causes are code that was only partly copied, a file saved with the wrong extension, or a bug in the generated code. Copy the full answer, save it ending in .html, and paste any error back to the AI.

Can I make a game that works on my phone?

Yes. Ask for touch controls and a layout that fits a phone screen in your first prompt, then open the file on your phone or test it with your browser's mobile view.

Is there a tool that does this without copying code?

Yes. Dedicated tools like Rosebud AI and Google's experimental Playground build and run the game for you in the browser. Playground was limited to US users aged 18 and older at launch.

Sources