Skip to content

How to make a browser game with AI without coding: step by step

A game in 1 file from a free AI chat: a description, a first version in 10 minutes, fixes without breaking things, a phone and itch.io. Shown on SlipZone.

Filip Kostecki

Published

I made SlipZone without writing a single line of code. The first playable version came out of free ChatGPT after 10 minutes, and after 30 minutes the game had a score, effects, sound and finger controls on a phone. You can play it on itch.io. Below I describe the whole route in 7 steps, with the prompts I sent. I wrote them in Polish, so here they are in translation.

What you need

  • a computer with a browser,
  • a free account with an AI chat: ChatGPT, Gemini or Claude (I used ChatGPT),
  • a folder for each new version of the game,
  • at the end, a free account on itch.io if you want to show the game to others.

You don’t install anything. The game is 1 HTML file that you open with a double-click, like a photo.

Step 1. Choose a game that fits in 1 file

For your first game, choose something you can describe in 1 sentence and that has 1 main mechanic. Arcade games (you dodge obstacles), puzzle games (you match 3 of the same), clickers, quizzes and endless runners work well. SlipZone fits in 1 sentence: you move left and right and dodge obstacles falling from the top, faster and faster, until something hits you.

Leave a 3D world, an online multiplayer game and a long story with an inventory for later. Each of them grows faster than the chat can keep fixing it.

Step 2. First a description of the game, then the code

Before you ask for code, ask the chat for a 1-page description of the game. Give it your assumptions: the genre, the controls on a computer and on a phone, when the game ends, the language of the in-game text and the graphics style. Whatever you leave out, the chat will choose for itself. My prompt started like this:

I want to make a simple browser game, but I can’t code. Help me describe my game idea on one page.

Below it came a list of assumptions and a request for 5 names in English. After about 30 seconds I had a description in 9 parts and 5 names. I typed each name into the itch.io search so as not to pick one that was taken. SlipZone gave no results.

Step 3. Ask for the first version of the game

In the same chat I sent the prompt for the first version. The chat already had the description in front of it, so I didn’t have to repeat it.

The prompt for the first version of SlipZone typed into free ChatGPT
The prompt for the first version in free ChatGPT. Translated from the original Polish

Look at the line “for now only”. The fewer things at once, the better the chance that the first version works. The score, sound and the phone come in later rounds. Phaser 3 is a free library for 2D browser games that AI chats know well.

ChatGPT thought for about a minute and returned the code in one block: 421 lines. You don’t have to read the code. Check only that it starts with <!DOCTYPE html> and ends with </html>. Save it as slipzone-v1.html, or with your own game’s name. In ChatGPT you can save it from the preview: the ▷ icon above the code, and in the preview the “Download code” arrow.

Step 4. Play a full round and describe the bug like a player

The start screen alone proves nothing. Click PLAY and play to the end of the round. In my first version nothing fell from the top, and the 3 squares from the start screen stood in the middle of the play area.

The first version of SlipZone: 3 coloured squares stand in the middle of a dark play area, with the character at the bottom
The first version: the obstacles stand still

You don’t need to know what’s broken in the code. Describing what you see on the screen is enough:

The game starts, but something isn’t working. After I click PLAY, nothing falls from the top. Three coloured squares from the start screen stay in the middle of the screen and don’t move. I can move my character left and right, but there’s nothing to dodge. Fix it and give me the full corrected code.

This description says what I click, what happens and what still works. ChatGPT found the cause by itself and fixed it on the first try. From the first prompt to a game without the bug took 10 minutes.

The bug description sent to ChatGPT and the reply explaining the cause
The bug described in the player's words and the reply with the fix. Translated from the original Polish

Step 5. Add 1 thing at a time

I added the score, effects and sound in separate rounds. Each round had the same rhythm:

  1. At the start, a sentence about what works: “It works! The obstacles fall and there’s a GAME OVER.”
  2. 1 topic per round: the score, effects or sound.
  3. At the end: “Don’t change anything else. Give me the full code.”
  4. A new file with the next number (v3, v4, v5) and a full round of the game.

3 rounds in this rhythm took about 5 minutes, and each one worked the first time.

SlipZone version 4: the score in the corner, stars in the background and the words LEVEL UP
Version 4: the score, stars in the background and LEVEL UP

Step 6. The phone, and getting out of the fix loop

The fourth round was meant to add finger controls and a portrait play area. On the phone it came out well, but on the computer 2 things that had worked before broke. The chat had said it was changing only the touch controls. Each new fix broke something else: after one of them the PLAY button responded only in its top-left quarter.

The rule I take from that round: after 2 failed fixes of the same thing, don’t ask for a third. Go back to the last working version, paste it into the chat and ask for the same change in a simpler way. In my case that was version 5, and the simpler way turned out to be a fixed play area of 450 × 800, scaled to the screen. Version 10 worked on the computer and on the phone, and had 316 fewer lines than the broken version 6.

SlipZone version 10 on a phone screen: the word SLIPZONE and the PLAY button
Version 10 in a phone frame

That’s why you save every version in a separate file. Without v5 there would have been nowhere to go back to.

Step 7. Put up a game page on itch.io

itch.io is a free site for independent games where a browser game starts with one click, on a phone too. The game page form took me 10 minutes: the title, the game file, a 405 × 720 portrait window, a description in English, the genre, tags and the question about AI use. The page starts as a draft that only you can see, and you publish it with one switch. I go through the form field by field, together with game portals, in the article on where to publish a browser game.

How long it took

Stage In my case
A description of the game with the chat 2 min
Choosing a name and checking it on itch.io 3 min
The first version and the bug fix 5 min
3 rounds of new features about 5 min
The phone, including the fix loop 13 min
The game page on itch.io 10 min

Allow more time yourself: you read the replies, save the files and play after every change. A weekend leaves room for fixes and for ideas that come to you while you play.

What next for your game

A game on itch.io is only the start. I cover a release on Android in the article on how to release a game on Android, and the routes to your first money in can you make money from a game made with AI.

Questions and answers

Do I need a paid AI chat account to make a game?

No. SlipZone was made in free ChatGPT, with 11 prompts. Work in short rounds in one chat and save each version of the game in a separate file.

Can a game made with AI go on itch.io?

Yes. The game page form asks whether AI was used for the game and for what: graphics, sound, text, code. SlipZone has code ticked, and its game page shows the note “AI Assisted, Code”.

Will a game from the chat work on a phone?

Yes, if you ask for finger controls and a play area with a fixed size, for example 450 × 800, scaled to the screen. After each change for the phone, play on the computer too, because a fix for one screen can easily break the other.

Terms used in this article

Filip Kostecki

Founder of FKDRIVE and software developer. Builds and maintains web systems and automation.

READ NEXT

Related articles.

COOKIES

Without cookies we are working in the dark

We have no way of telling which parts of this site help somebody and which ought to go. Consent switches on visit statistics, session recordings with form content masked automatically, and measurement of how our advertising performs. We do not trade in your data and we do not sell it to anyone.

You can change this at any time with the “Cookie settings” link in the footer. What exactly we collect →