PRACTICE · FIRST GAME

How to create a game without coding: ChatGPT and Claude for beginners

From a simple idea to a browser game: two paths, ready-to-use prompts and concrete steps for non-programmers.

Mia explores game worlds

You can create your first game even if you have never written code. Describe the rules in ordinary words, ask ChatGPT or Claude to make a browser game, then test it and explain what needs fixing. AI creates the code, but decisions, testing and responsibility for the result are yours.

What you will get: a small 2D game you can open as a file in a browser index.html. You need a computer, browser, text editor and access to ChatGPT or Claude. Service interfaces, capabilities and limits depend on the account and may change.

1. Start with a game you can realistically test

For your first attempt, choose one action and one ending condition. For example: a basket moves left and right, catches stars and scores points; after three misses the game ends. Other simple ideas include a five-question quiz, a card-matching game or a one-level maze.

Do not start with an online RPG, a shop or dozens of levels. One working mechanic teaches more than a large project that will not run. Creating through description and successive revisions is often called vibe coding, and working specifically on games is called gamecoding.

2. Build a prompt for your first game

Choose a mechanic, controls, pace and appearance. The builder runs only in your browser: selections are not sent anywhere. It creates a bounded prototype that is easier to test than a vague “make me a game” request.

No registration or data transmission. Passwords, keys and private information are not added to the prompt.

Your prompt


    

Or copy a ready-made example

This is an editorial template, not a guarantee that the first generation will be error-free.

I am not a programmer. Help me create a simple browser-based 2D game in Ukrainian. Idea: the player moves a basket left and right to catch stars falling from above. Each star earns one point; the game ends after three missed stars. Show the score, short rules, a start button and a “Play again” button. Controls: keyboard arrows and large on-screen buttons for a phone. The game should fit a narrow screen and require no registration. Put everything in one complete index.html file: HTML, CSS and JavaScript inside, without external libraries, images, servers or API keys. Draw simple graphics in code. Explain step by step how to save the file and open it in a browser. Do not ask me to install programs or run commands.

3. How to make a game with ChatGPT

  1. Open ChatGPT, start a new chat and paste the prompt. If the service asks you to sign in, use your account.
  2. Ask for the complete code for one HTML file. If your interface offers a preview, try it: it is a quick check, but does not replace testing the saved file.
  3. If the answer is cut off, ask it to continue or provide the entire file again. Save the result as described below.

You do not have to understand every line. What matters is having the whole file and checking that the game works outside the chat. Editor and preview availability depend on the environment; OpenAI’s help page describes working with code blocks.

4. How to make a game with Claude

  1. Open Claude, start a new conversation and paste the same prompt. When an interactive result — an artifact — appears, try playing directly in the preview.
  2. Ask to change one thing, for example “make the stars slower” or “make the phone buttons larger.” Test again after each change.
  3. Ask for complete standalone HTML code and save it as index.html. Test the artifact and the downloaded file separately: they may run under different conditions.

Anthropic’s Artifacts guide explains interactive results. A separate Claude Code installation or terminal is not required for a first game.

5. How to save the HTML and open the game

  1. Copy only the file’s code — from <!DOCTYPE html> to </html>, without explanatory text or the triple backticks around the code.
  2. Open a plain text editor. On Windows, Notepad works; on Mac, select plain-text format in TextEdit. Paste the code.
  3. Save the file as index.html using UTF-8 encoding. In Notepad, select “All files” so you do not end up with index.html.txt. If in doubt, enable file extensions in your file manager.
  4. Find the file and double-click it to open it in a browser. After edits, save the file and refresh the browser tab.

AI-generated code can contain errors. Do not put passwords or API keys in the game, and do not run commands you do not understand simply because a chat suggested them. A local HTML file is sufficient here.

6. Game not working? Describe the problem precisely

If you see code instead of the game, check the file extension. If the screen is blank, check that you copied all the code, including its beginning and end. If the game opens but does not respond, describe your device, browser and exact steps: what you pressed, what you expected and what happened.

I saved the game as index.html and opened it in a browser. Device: [computer/phone], browser: [name]. I press [action], expect [result], but [problem] happens. Help identify the cause and return the complete corrected HTML file. Keep the other game rules and do not add external libraries.

Save a working copy before a major change. Change one thing at a time: speed, text or controls. If an edit breaks everything, restore the previous copy and explain the problem again.

Minimum checklist before publishing

  • The game starts and its rules are understandable without the creator’s explanation.
  • Scoring, losing and restarting work several times in a row.
  • Controls have been tested on a computer and phone if you promise phone support.
  • The file opens without keys, private data or external paid services.
  • You have rights to use the images, sound and name; do not copy other people’s characters or music without permission.

7. How to share your game and get feedback

A file on your computer does not yet have a public link. To show it to friends online, see the game publishing guide. Our platform has a community games catalogue and a game submission form; check the current requirements before submitting. To enter the contest, also read the Vibe Jam rules.

Show the first version in our Telegram community and ask: “Is it clear how to play? What got in the way?” Then choose one specific improvement. For the next step, see the mini-course on prompts and testing and a short guide to game creation and Vibe Jam.

Frequently asked questions

Can I make a game if I am not a programmer?

Yes. For a simple browser prototype, you can describe the idea in words and ask AI to write the code. You will need to save the file, test the controls and fix errors through the chat.

Can I make a game for free?

You can try the chats’ free features if available in your region and account. Limits, features and terms change, so check the service before starting.

ChatGPT or Claude: which is better for a first game?

Start with whichever you can access. You can ask both for a complete HTML file and refine it through conversation; preview convenience depends on the current interface and plan.

Will AI make a complete mobile game for an app store?

A browser prototype is not yet an app ready for the App Store or Google Play. Store publication requires additional packaging, testing and compliance with the platform’s rules.

Can I make a game on a phone?

You can try creating and previewing a prototype on a phone, but saving an HTML file depends on the device and editor. The first-attempt instructions above assume a computer.

Sources: OpenAI: code blocks, Anthropic: Artifacts, MDN: a browser 2D game example. Instructions and prompts are editorial practice; the behavior of any particular generation is not guaranteed.

A new direction in creating interactive worlds: Genie 4 from Google DeepMind — capabilities, access and limitations for game creators and 3D artists.

Was this helpful? Pass it on

Send it to someone with a similar task.

Share in Telegram ↗

Read via RSS · Weekly newsletter in Ukrainian

Discussion

Share your opinion or ask about the material. Your nickname and comment text will be visible to everyone.

Loading comments...

Telegram chat ↗