You can build a small, playable browser game on a laptop by describing one simple mechanic to an AI assistant, running the code it writes, and then testing and changing one thing at a time. Little prior coding experience is needed.
Gather what you need before starting
Google’s blog has published a video of a well-known actor building a video game on a Googlebook. This guide does not reconstruct that video, and the tools and steps used in it are not covered here. It sets out a general method that should work on most laptops with a current browser.
You need four things:
- A laptop with a current web browser. The game runs in the browser, so no game engine is required.
- Access to an AI assistant that can write code. Any general-purpose assistant should be able to attempt this, although the quality of the results varies.
- A way to create and save a text file. A plain text editor is enough. A word processor is not suitable because it can add formatting that breaks the code.
- An hour or two. A first version may appear quickly, but testing and correcting it usually takes longer.
You do not need to install anything else for a first project. Keep the first game small, because a working simple game teaches more than an unfinished ambitious one.
Define one small game
Write down the game in three or four plain sentences before opening the assistant. State what the player controls, what the player is trying to do, what ends the game and how the score works.
A suitable first idea looks like this: the player moves a square left and right along the bottom of the screen, catches falling circles for points and loses after missing three.
This brief does two jobs. It gives the assistant clear requirements, and it gives you a way to judge whether the result is correct. Leave out levels, stories, online play and saved progress for now. Each one adds code that can fail and makes problems harder to trace.
Ask for a single HTML file
Ask the assistant to put everything in one file. Using HTML, CSS and JavaScript together in a single document means the game can usually be opened directly in a browser, with no separate server or build tools.
A prompt along these lines works as a starting point:
Write a complete browser game in a single HTML file, using the HTML canvas and plain JavaScript with no external libraries. The player moves a square with the left and right arrow keys, catches falling circles for one point each, and loses after missing three. Show the score on screen and let the player restart with the space bar. Use simple shapes, not image files. Add brief comments explaining each section.
Ask for no external libraries and no image files at this stage. Both choices remove common causes of a blank screen, such as missing files or blocked network requests.
Run the file in your browser
Paste the assistant’s full answer into your text editor and save it as index.html. Check that the file has not been saved as index.html.txt, which some systems do by default. Then open it in your browser, usually by double-clicking it or dragging it into a browser window.
If the screen stays blank, open the browser’s developer tools and look at the console. On many systems, Ctrl+Shift+I opens them. Red error messages there are useful: copy the exact text and paste it to the assistant along with a description of what you expected to see.
Test and fix one problem at a time
Play the game and write a short list of what is wrong. Then give the assistant one item from the list, with precise details. “The square can move off the right edge of the screen” gives it something to act on. “It feels broken” does not.
After each change, reload the page and play again. Confirm that the fix worked and that nothing else has stopped working. Assistants sometimes alter or remove working code while changing something else, so keep a copy of each version that works, using names such as game-v1.html and game-v2.html. If a change makes things worse, you can go back to the last good copy instead of trying to untangle it.
Ask the assistant to explain any section you do not understand. You do not need to master the language, but knowing roughly where movement, collisions and scoring are handled makes your requests more accurate.
Adjust the difficulty and add feedback
Once the rules work, tune how the game feels. Ask for the falling speed to rise gradually, and for small changes such as a colour flash when the player scores or a clear message when the game ends. Add one change per round, as you did when fixing faults.
Ask someone else to play it without instructions. Watching where they hesitate shows what the game fails to explain, which is hard to notice in something you built yourself.
Share the finished game
Because the game is a single file, you can simply send it to a friend, who can open it in a browser. To publish it online, services such as GitHub Pages and itch.io can host browser games. Check each service’s current requirements first, and read through your file to make sure it contains nothing private, such as a name, key or password.
Avoid the mistakes people actually make
- Starting too big. Asking for a complete adventure game in one prompt tends to produce long code with faults that are hard to isolate.
- Requesting several changes at once. When something breaks, you cannot tell which change caused it.
- Keeping only one copy. Without saved versions, one bad edit can cost you a working game.
- Paraphrasing error messages. The exact wording helps the assistant far more than a summary.
- Testing on one device only. Game speed can depend on the screen’s refresh rate if movement is tied to frames. Ask the assistant to base movement on elapsed time. Keyboard-only controls will also not work on a phone.
- Copying existing games too closely. Characters, names, artwork and music from other games may be protected, and downloaded assets have their own licence terms. Use your own shapes and sounds, or check the licence before using someone else’s.
- Pasting in private information. Do not share passwords, keys or personal details with an assistant, or leave them in published code.
Recognise when this approach is the wrong choice
A single file written with an assistant suits small experiments, learning and games to share with friends. It is a poor fit for large projects with many levels, complex 3D graphics or online multiplayer, where a dedicated game engine and an organised project structure make the work more manageable.
It is also the wrong choice if you plan to sell the game or handle players’ accounts or payments. Those cases raise questions about security, licensing and maintenance that need proper review by someone who understands the code. If your main aim is to learn programming thoroughly, you will also gain more from a structured course, using an assistant only to explain concepts.
Frequently asked questions
Can I make a video game with AI without knowing how to code?
Yes, for a small game. An AI assistant can write a simple browser game from a plain-language description, and you can test it and report faults without writing code yourself. The results still need checking, because generated code can contain errors. Larger games become difficult to manage without some understanding of how the code is organised.
What is the easiest type of game to build first?
A single-screen arcade game is usually the easiest place to start, such as catching falling objects or dodging obstacles. These games have few rules, one simple control scheme and a clear ending, so faults are easy to spot and describe. Avoid stories, multiple levels and online play until you have finished and tested a simple version.
Why is my HTML game showing a blank screen?
A blank screen usually means a code error, an incomplete paste or a file saved with the wrong extension. Check that the file ends in .html and that you copied the assistant’s entire answer. Then open the browser’s developer console, copy any red error message exactly and give it to the assistant so that it can correct the code.
Do I need a Googlebook to build a game with AI?
No. Google’s blog has shown a game being built on a Googlebook, but the general method in this guide does not depend on a specific laptop. A browser game written in HTML and JavaScript needs a current browser, a text editor and access to an AI assistant. Which features a particular device offers is a separate question to check with its maker.
Sources and further reading
- Google’s blog: the post that prompted this guide. Its reported subject was used, but the details of the video were not reviewed.
- MDN Web Docs: reference material on the HTML canvas, JavaScript and browser timing.
- GitHub Pages and itch.io documentation: guidance on publishing browser-based projects.
- Creative Commons: explanations of the licences often attached to shared artwork and sound.
Surfaced from the google:GB signal “celebrity game-building video”. AI-assisted draft, editorially reviewed.

