Hands-On Test: Making a Browser Game with AI for the Price of a Bubble Tea

    This hands-on account covers building a simple 2D survival browser game with AI-generated code. It explains how the author tested the limits of AI game generation, how structured prompts and staged development worked in practice, and what the author concludes about who can build games and which parts still need experienced developers.

    A Skeptic’s Starting Point

    The author played Flash games in their early days and did not expect much from today’s browser games. That changed after playing an extraction-style first-person shooter that ran in the browser. It had realistic lighting and detailed materials, and the developer reportedly generated everything with AI. The developer wrote one short prompt, let an AI model run for a few hours, and got a finished game. Models, sound effects, and textures were all generated from scratch. The total cost was several thousand RMB.

    This raised two questions. What is left for a game producer to do? Can someone without programming experience turn a game idea into a playable product?

    To answer these questions, the author decided to build a game and document the process.

    Why Start With a Web Game

    Traditional game development relies on mature engines and toolchains: scene editors, physics systems, rendering pipelines, asset management, and large teams working over years. This system works, but it is a steep barrier for individual creators.

    Web games have a reputation as a small, niche category with limited visual power. For testing an idea, however, they have several advantages:

    1. No installation. Once a game is generated, it is a link. Friends can open it and play right away, so feedback arrives quickly.
    2. Light technical overhead. Modern browsers support Canvas and WebGL well enough for 2D games and lightweight 3D scenes. There is no need to handle platform-specific compatibility issues.
    3. Cheap iteration. Change the logic, refresh the page, and see the result. This suits quick trial and error.

    For individual developers, the main benefit is that they can focus on creativity and gameplay instead of getting stuck on engineering details. They can find out quickly whether an idea works.

    Mapping What AI Can Do

    Before building anything, the author played several popular AI-generated browser games to gauge the current level of quality.

    One was a multiplayer shooter based on a classic shooter map. Containers, pipes, and firefight zones had been recreated in the browser, and the game captured the rhythm of a gunfight. Another was a fan-made action game. Its visuals were rough, but movement, dodging, and combinations of light and heavy attacks worked reasonably well.

    The author drew two conclusions:

    First, AI can match a reference closely when the gameplay and reference are clear. Basic scene setup, interaction logic, player controls, and core mechanics are handled well. The more specific the description, the better the output.

    Second, complexity has a ceiling. Advanced moves beyond the reference, detailed combat systems, and deep numerical balancing are still hard for AI to complete on its own. AI works well by combining known patterns correctly. It does not yet create entirely new experiences.

    The author’s years of game experience also suggest that good games depend more on being fun than being complicated. A strong story can carry a game, and a story needs only dialogue and text. Satisfying combat can come from visual effects and immediate feedback. Both fall within what AI can handle.

    The Practice: From Prompt to Playable Build

    Based on these conclusions, the author chose a lightweight 2D survival game. The core loop is simple. The player collects resources on a map, avoids enemies, and tries to survive as long as possible.

    1. Structured prompts. The first attempt used a single-sentence prompt, and the generated game logic was messy. The second version used a structured description, which made a clear difference:

    1. Please generate a single-file web game with the following requirements:
    2. - Tech stack: HTML5 Canvas + vanilla JavaScript, in one HTML file
    3. - Gameplay: Arrow keys move the character. Collect resource points on the map. Slow enemy units chase the player.
    4. - Stats: Player health is 100. Every 10 resources collected upgrades movement speed once.
    5. - Feedback: Play a sound effect and show particle effects when a resource is picked up.
    6. - UI: Show health and resource count in the top-left corner. Show a restart button after the player dies.

    2. Staged generation. Do not expect AI to generate everything at once. The author first asked for a minimal version that runs, then added requirements one round at a time, such as “add a resource respawn timer” or “make enemies stunned briefly after being hit.” Changing one thing per round made problems easier to isolate.

    3. Assets. AI can generate code, but images and sound are better produced separately with multimodal tools. Another option is to use geometric shapes and flat colors. A minimalist style reduces cost and produces a consistent visual language more easily.

    4. Deployment and testing. A single-file game can be placed on any static hosting service. The full build took one evening. The total cost was under 20 RMB, and all of it was AI API usage.

    Reflections

    After this experiment, the author concluded that AI does not change how games get made as much as it changes who decides which games get made.

    Previously, a game idea had to pass through proposal, prototype, and review stages before anyone could test it. Now an individual can find out in one evening whether an idea is fun. The cost of trial and error has dropped from months of staff time to roughly the price of a bubble tea, which should increase the supply of new ideas.

    Current AI, however, suits prototypes and small projects. Level pacing, narrative depth, and long-term live operations still require professional developers. A sensible division of labor is for AI to turn ideas into playable builds quickly, while people judge whether the game is fun and decide what to change next.

    The author’s advice for anyone who wants to try is simple: skip learning an engine first. Build the simplest gameplay idea you have. Completing one full cycle will teach you more about AI’s limits than reading ten analysis articles.