AI Game Development: How I Built a Playable Browser Game for About 20 Yuan
This article explores how generative AI is reshaping the cost structure of game development, based on a hands-on test that produced a playable browser game for roughly 20 yuan. It explains why the web is the shortest path for validating a game idea, what AI can and cannot deliver, and how the total cost breaks down across assets, code, validation, and trial and error. You will find a reusable workflow covering one-sentence gameplay definitions, prompt templates, layered prototyping, consistent asset styling, manual tuning of game feel, and link-based validation, along with engineering tips and common pitfalls.
1. Starting With an “Absurd” Test
An engineer used a short prompt to let an AI coding tool generate continuously for about eight hours, producing a realistic shooter that runs directly in the browser. The models, sound effects, and textures were all generated from scratch, at a total cost of around 550 USD. What made this result unsettling to practitioners was not the visuals, but the fact that it rewrote the cost structure of making a game: the most expensive part used to be labor and time, while now the most expensive part is creativity and validation opportunities.
This turns the question into two more practical ones: can an ordinary person turn an idea into something playable, and if so, where are the limits? This article answers both through a hands-on test that brought the cost down to roughly 20 yuan.
The conclusion first: AI can currently achieve surface resemblance, but not true substance. When the gameplay and reference are clearly defined, AI can produce scene assets, interaction logic, character movement, and basic mechanics fairly completely. But the things that truly determine whether a game is fun—pacing, feedback, difficulty curves, and narrative believability—still need to be designed by a person.
2. Why Start With the Web
When people think about game development, the first things that come to mind are professional engines, professional teams, and long schedules. Web games are only a niche branch of the overall ecosystem, but they are extremely friendly to developers:
- Zero installation: generating a link is enough to distribute it, and playtest feedback comes in hours.
- A unified runtime: the browser is the runtime, so there is no multi-platform adaptation complexity to handle.
- Small footprint: resource loading and iteration costs are low, making it suitable for gameplay validation.
- A natural fit with AI generation: the output is a textual structural description plus resource files, which is easy for models to read and modify.
For the goal of “validating whether an idea holds up,” the web is the shortest path. What you need is not a finished product, but a prototype that lets someone judge it after playing for thirty seconds.
3. What AI Web Mini-Games Can and Cannot Do
I tried several popular categories of AI-generated mini-games, including a browser shooter modeled on a classic shooter map and a fan mini-game based on an action RPG.
What AI can do is consistent:
- Scene reproduction: iconic elements such as containers, pipes, and firefight zones can be reproduced accurately.
- Basic actions: input and state switching for movement, dodging, and light and heavy attacks are basically usable.
- A complete interaction loop: picking up items, firing, hit detection, and health changes form a full cycle.
What AI cannot do is also consistent:
- Complex moves and combos cannot be reproduced; action depth stays at “present” rather than “feeling right.”
- Visuals are rough, with materials and lighting lacking a unified art direction.
- Difficulty and pacing are not designed, so tension collapses quickly after the first thirty seconds of satisfaction.
This yields a rule of thumb: AI is good at filling in the “describable and enumerable” parts, and bad at handling the parts that “require feel and trade-offs.”
4. The Cost Structure Behind the 20-Yuan Figure
The total cost can be split into four parts, and AI mainly compresses the first two:
- Asset cost: textures, sound effects, and models produced by generative capabilities have a marginal cost close to zero.
- Code cost: an AI coding tool generates the page structure, game loop, and state management.
- Validation cost: mainly your own time.
- Trial-and-error cost: because distribution costs nothing, you can validate multiple ideas in parallel.
The 20-yuan-level spending essentially comes from a small amount of asset generation and compute usage, while the art outsourcing and labor hours that dominate the traditional structure are structurally removed. One point needs emphasis: low cost does not mean “AI is free,” but that spending shifts from fixed labor costs to variable usage costs, and you decide where it goes.
5. A Reusable Practical Path
5.1 Write a One-Sentence Gameplay First, Then the Prompt
Prompt quality depends on how clearly the gameplay is defined. A usable template has four parts:
Genre: top-down shooterCore loop: enter room -> defeat guards -> collect resources -> extractControls: WASD to move, mouse to aim, left click to fire, Shift to dodgeConstraints: runs as a single file, no external assets, geometry-based visuals
5.2 Have the Model Produce a Runnable Skeleton First, Then Add Layers
Asking for “a AAA blockbuster” in one shot is bound to fail. The right order is: first get a white-box prototype that moves, then add collision and detection, then add feedback (light effects, screen shake, sound effects), and finally add content volume. Require every layer to be runnable to avoid accumulating errors.
5.3 Constrain Assets With a Unified Style Description
The most common failure in asset generation is style drift. The approach is to attach the same style description to every generation request, and fix the color palette, resolution, and perspective, so that textures and sound effects belong to the same world.
5.4 Leave “Game Feel” to the Human
Feedback design cannot be outsourced. You need to manually tune three sets of parameters: hit stop, screen shake intensity, and sound effect timing. These three determine whether combat feels satisfying, and they are the last gap between AI and a good game.
5.5 Use Link Distribution for Gray-Scale Validation
Send the prototype link to a few players and observe only two things: whether they understood the goal within thirty seconds, and whether they are willing to play another round. Do not collect questionnaires; only look at behavior.
6. Engineering Advice and Common Pitfalls
- Make state management explicit: centralize character state, enemy state, and scene state to avoid scattered global variables generated by the model polluting each other.
- Set performance budgets upfront: define unit counts and effect limits; on the browser side, the biggest fear is uncontrolled particles and real-time shadows.
- Control asset size: a small footprint is an advantage of web games, and exceeding it loses players at the loading stage.
- Version snapshots: keep a snapshot each time a runnable layer is completed, for easy rollback.
- Security and compliance: when using generated assets, confirm the licensing source and avoid directly replicating protected characters and scene identifiers.
If you later want to scale a prototype up, you can build on general cloud capabilities: use object storage to distribute static assets, a content delivery network to reduce latency, a container platform to host online services, and logging and monitoring with alerting to locate production issues. These are common industry categories, and you can introduce them gradually based on scale and cost.
7. Conclusion
AI has turned the fixed costs of game development into variable costs, making “validating an idea” cheap for the first time. But it has not replaced the producer; it has only pushed the producer’s work one step forward: you no longer need to solve all the technical problems before you are qualified to test your idea; you now need to first think clearly about what makes a game fun.
What 20 yuan buys is not a game, but a fast right to say no. Those who can endure enough low-cost rejections are more likely to build the thing that is truly fun.
