AI Game Development: How to Build a Playable Web Game Prototype for Around ¥20 (~US$3)

    What does AI-generated game code deliver at very low cost? This hands-on test used a large language model (LLM) to build a playable dodge-the-obstacles browser game and keep external costs around ¥20 (about US$3). It covers defining that budget, a three-round prompt and iteration process, and why web games are the fastest way to validate a core loop. It also provides a reusable structured prompt template, five minimal validation metrics, a testing checklist covering browsers and game states, and guidance on placeholder assets, compliance, and analytics scope. It explains which genres are hard to validate directly and how to split them into smaller prototypes. Readers will learn how to tell quickly whether a game concept deserves further investment.

    1. Conclusion First: With AI, Validate the Gameplay First

    In low-cost game development, the priority isn’t building a complete product from day one. It’s proving that the core loop works as quickly as possible. Many concepts fail not because the idea is weak, but because art, code, levels, and live-operations resources are committed too early.

    Generative AI changes this equation. It can’t replace senior designers or programmers, but it can significantly shorten the path from idea to playable prototype.

    How can you use AI to validate gameplay cheaply? Put the core loop into a small web game, keep costs around ¥20 (about US$3), and let feedback decide whether to invest more.

    For this test, we chose a dodge-the-obstacles web game: the player moves left and right to avoid falling blocks, and survival time becomes the score. The genre has simple rules, immediate feedback, minimal asset needs, and short sessions. That makes it well suited to checking whether AI-generated code is actually usable.

    2. What We Tested and What “Around ¥20” Covers

    “Around ¥20” is vague unless it’s clearly defined. Here, it counts only new external spending, with two assumptions:

    • Labor is not included.
    • The developer already owns a computer and an internet connection.

    The toolchain combined three things:

    • An LLM to generate the code and copy.
    • Static hosting or object storage to publish the page.
    • A few free or low-cost placeholder assets.
    Cost item Assumption Cost range
    Static hosting or object storage A handful of files (HTML, CSS, JS); low traffic ¥0–5
    Domain A newly registered short domain, billed annually ¥10–40
    AI usage Three prompt rounds generating code, copy, and parameter notes ¥5–20
    Assets and audio Geometric shapes, gradients, and free placeholder sound effects ¥0–10
    Total Lower if you already have a domain, account, or free quota ~¥20–50

    If you already own a domain and have AI quota, costs drop to around ¥20. Buy a new domain for every test and generate lots of high-resolution assets, and you’ll exceed the ¥20 range. So “around ¥20” refers to the external cost of a single prototype, not the total cost of commercial game development.

    3. The Test Process: Prompts, Iteration, and a Playable Result

    Round 1: The prompt was simply “generate a web dodge game; the player moves left and right.” The AI produced character movement, collision detection, and score display. However, it omitted start, game-over, and restart states, so players had to refresh the page after losing. A vague prompt only yields a skeleton that looks right.

    Round 2: The prompt was restructured around six elements: game type, controls, win/lose conditions, state flow, technical constraints, and output format. It specified:

    • A single-page structure with three states: ready, playing, and gameover.
    • Keyboard and touch support.
    • A score based on seconds survived.
    • A list of key parameters.

    The output was close to playable but had two problems: the pause/resume logic was unstable, and buttons shifted position on small screens.

    Round 3: Instead of rewriting everything, we made targeted changes to the state machine and responsive layout. We asked the AI to add restart, pause, and resize functions and specified that the timer must stop on collision.

    The finished prototype completed the full loop: start, play, fail, and restart, with each round lasting roughly 30–60 seconds. Its limits were equally clear. It had no accounts, leaderboards, multiplayer, elaborate art, or audio. It is suitable only for gameplay validation, not as a commercial product.

    4. Why Web Games Are a Good Starting Point

    Developers often ask whether AI can be used to build client games. The answer is yes, but validating costs this way is less efficient. Web games, mini-game platforms, and native clients each have their own trade-offs.

    Format Cost Distribution Validation cycle Best suited to
    Web game Low Shareable links Fast Early gameplay validation
    Mini-game platform Medium Platform ecosystem Fairly fast Initial user testing
    Native client High Installation and review Slow Productization

    The appeal of the web is its lightness: no installation, no complex accounts, and no backend to set up at the start. Once the core loop runs, you can send it to friends, communities, or survey respondents to try.

    5. Structured Prompts: Turning Gameplay into Tasks AI Can Execute

    An effective prompt doesn’t need to be eloquent. It needs to break the game down into clear variables. Here is a reusable template:

    1. 1. Role: You are a game prototype developer.
    2. 2. Type: Dodge-style web mini-game.
    3. 3. Core rule: The player moves a block left and right to avoid falling objects.
    4. 4. Failure condition: Touching a falling object ends the game.
    5. 5. States: ready, playing, gameover.
    6. 6. Technical constraints: Single page, no heavy dependencies, must run.
    7. 7. Output: Complete code, a parameter table, and notes on changes made.

    Vague prompts usually look like “make a fun dodge game, and be creative.” With no constraints, AI tends to pile on complex features, which drives up debugging costs. The optimized prompt is longer, but the output is more stable and problems are easier to track down later.

    6. From “It Runs” to “It’s Playable”: Minimal Validation Metrics

    Running code doesn’t mean the gameplay works. This test used five minimal metrics:

    • First-session completion rate: Can testers understand the goal and finish the game on their first try? Aim for at least 60%.
    • Average session length: If most players quit within 5 seconds, the feedback is insufficient. Aim for at least 30 seconds.
    • Replay count: Players voluntarily restarting signals that the gameplay is engaging. Aim for an average of at least 1.5 restarts.
    • Crash rate: Ten consecutive sessions without freezes, black screens, or unresponsive buttons. Aim for less than 1%.
    • Goal comprehension time: Within 60 seconds, can players explain what they’re supposed to do? Overly complex rules can skew the results.

    These metrics are more reliable than “I think it’s good,” and they make the next round of prompt and parameter tuning easier to guide. If you later productize the game, minimal analytics can log only sessions started, sessions ended, replays, failure types, and load times. Be sure to state the purpose, and don’t collect unrelated personal information.

    7. Testing AI-Generated Code: Browsers and State Machine

    AI-generated code can contain hidden bugs, so testing can’t be skipped. At minimum, set up three types of tests:

    • Browser compatibility matrix: Cover desktop Chrome, Safari, and Edge, Android WebView, and in-app browsers such as those built into social and messaging apps. Also test a 360px-wide phone viewport and a 1080p desktop viewport. Pay special attention to buttons, touch targets, and score display.
    • Automated screenshot regression: Take screenshots of the start screen, gameplay in progress, the game-over screen, and the restarted game. After every prompt or code change, compare them to check for layout shifts and hidden buttons.
    • Key state machine tests: Verify these transitions:

      • ready → playing
      • playing → paused
      • paused → playing
      • playing → gameover
      • gameover → restart

      Pay particular attention to edge cases: rapid clicks on Start, restarting immediately after a failure, and whether the timer keeps running after switching windows.

    If possible, turn these checks into short scripts. Even without an automation platform, you can use fixed devices and a fixed test flow to capture screenshots. That’s more reliable than judging by feel every time.

    8. Assets, Compliance, and Commercial Boundaries

    During prototyping, placeholder assets like geometric shapes, flat color blocks, and gradient backgrounds are enough. They keep asset costs down and keep players focused on the gameplay.

    Before public distribution or commercialization, you’ll need a replacement checklist:

    • Is the player character original?
    • Are the obstacle graphics licensed?
    • Does the audio allow commercial use?
    • Does the copy imitate a well-known IP?
    • Are you collecting user data?

    Don’t collect personal information at the prototype stage. If you add analytics later, follow the principle of collecting only what’s necessary and disclose how the data will be used.

    9. Genres to Avoid Building Directly, and How to Break Them Down

    We don’t recommend having AI generate full versions of certain game types from the start:

    • Large open worlds
    • Complex competitive multiplayer games
    • Long-term economy systems
    • High-precision action games

    That doesn’t mean these games can’t be built. It means they have too many variables to validate easily.

    Take tower defense as an example. It can be split into three modules:

    1. Validate resource acquisition.
    2. Validate pathfinding.
    3. Validate wave pressure.

    Each module can become a small standalone prototype. Once the core loop is proven, gradually merge them.

    10. Summary: The Value of a ¥20 Prototype Is Fast Falsification

    AI-assisted game development isn’t about giving everyone a commercial game overnight. It’s about letting everyone validate ideas cheaply. A ¥20-scale web prototype can’t prove a game’s ultimate commercial potential, but it’s enough to judge whether the core loop is worth investing in further.

    Start with one clear, small gameplay concept:

    • Use a structured prompt to generate a minimal prototype.
    • Use validation metrics instead of subjective impressions.
    • Use a testing checklist to reduce risk.

    Then let the feedback decide whether to move into full engineering.