Large Language Model-Driven Interactive Web Game Generation: A Practical Guide

    This article explores how large language models (LLMs) are moving beyond code completion to accomplish broader tasks through code as a medium, using single-page HTML fighting games as a practical capability probe. It explains why fighting-style web games expose model weaknesses in semantic understanding, structural coherence, and visual consistency; how to set up reproducible evaluation prompts and break observation into dimensions such as character modeling, visuals and feedback, logic and novelty, and deployability; and how to turn one-shot generation into maintainable engineering artifacts. Readers will learn concrete prompting and acceptance-criteria strategies, how to interpret architecture and "autonomous planning" claims behaviorally rather than through marketing terms, and how to move from vibe-style generation to deliverable, maintainable code.

    In software engineering practice, large language models are shifting from “completing functions and tweaking a few lines of script” toward “accomplishing broader tasks through code as a medium.” Interactive web mini-games offer a good observation window: they simultaneously demand narrative and art constraints, state machines and collision logic, input handling and visual presentation, and they usually need to be delivered self-contained in a single HTML page. This article is not about any specific vendor or model. Instead, it abstracts this class of task into a general capability question: how to write reproducible evaluation prompts, how to interpret visual and modeling quality, and how to upgrade one-shot generation into a maintainable engineering artifact.

    Why Use a Fighting-Style Web Game as a Capability Probe

    Fighting mini-games are not “friendly” to models. Characters need recognizable shapes and stances; skills must differ from one another rather than just changing colors; and the game needs health bars, cooldowns, hitboxes, win/loss conditions, and either simple AI or two-player combat. These constraints expose three kinds of weaknesses. First, insufficient semantic understanding: interpreting “full-bodied characters and novel moves” as piling on effects or duplicating the same animation set. Second, insufficient structural capability: HTML, CSS, Canvas or DOM animation, keyboard events, and the game loop end up disconnected from each other. Third, insufficient aesthetics and consistency: characters with broken proportions, missing hit feedback, and skill names that don’t match their actual effects.

    For developers, the value of this kind of probe is that the prompt is short, the result is runnable, and failure modes are visible to the naked eye. It reflects “general-purpose programming” better than grinding algorithm problems alone—using code to complete the full chain of creativity, interaction, and presentation. Industry discussions often treat code as infrastructure for a wider range of tasks: composing music, camera work, macro scenes, engineering modeling, and so on are all essentially compiling unstructured intent into executable artifacts. Web fighting games are simply one of the lower-barrier, easy-to-compare cases.

    Reproducible Evaluation Setup and Observation Dimensions

    It helps to fix a main prompt, for example: generate a single-page HTML fighting mini-game, keep moves from being overly complex, make character shapes complete and recognizable, and make skills distinct from one another while showing novelty. For a fair comparison, disallow manual post-editing—allow only a single direct output, or explicitly record the number of interventions. You can add a constraint such as: “Characters must be distinguishable humanoids or clearly defined species; copying two skins from the same template is forbidden.” This reduces failures like “two nearly identical figures.”

    When observing, break the evaluation into dimensions rather than judging only “does it look good”:

    • Character and modeling: head-to-body proportions, whether limbs are closed, whether the stance is stable, and whether the left and right characters are distinguishable. With direct output and no external textures, vector or simple geometric assembly is the norm, so evaluation should be relative to a “zero-resource constraint” rather than benchmarked against a commercial art pipeline.
    • Visuals and feedback: background layering, health bars, skill effects, hit flashes or screen shake. Rich detail with a broken character is still a structural failure; a passable character with dry interaction is a gameplay failure.
    • Logic and novelty: whether skills differ only in damage numbers; whether there is at least one form of difference such as dashes, defensive counters, displacement, or arena interaction. A move with a fancy name but the same rectangular hitbox in the code should be recorded as a semantic-implementation mismatch.
    • Deployability: whether it is a single file, whether it depends on resources that were not provided, and whether it opens directly in common browsers. At the prototype stage, “it runs” takes priority over architectural elegance.

    Typical Problems in Direct Output and Improvement Strategies

    Common problems in practice include: characters degrading into stick-figure animals or symmetric copies; skill cooldowns out of sync with animation durations; keyboard conflicts; and no win/loss resolution. In response, prompts should turn “full-bodied” into checkable clauses (independent silhouette, at least three distinguishable features, no simple mirroring by flipping the same path). For skills, you can require each character to output a skill table—name, hitbox type, displacement, hitstun, effect description—and then require the code to correspond one-to-one with the table.

    If the first generation produces a broken character, don’t just blame the model; write the failure mode into the next round of constraints, for example forbidding the same set of path data and enforcing different color schemes and attack-box sizes. This is prompt engineering and acceptance criteria, not a mysterious “inspiration.”

    From an engineering perspective, a one-shot HTML output often mixes resources, logic, and styling together. For production, split it into: constants and balance values, the input layer, physics/collision, and the rendering layer. Even for a demo, it helps to extract magic numbers into a configuration object so you can tune damage and cooldowns without touching the animation. Object storage can host the static page, container platforms can provide short-lived previews, and logging and monitoring can track freezes and errors—these are all general cloud capability categories that don’t depend on any proprietary product name.

    How to Understand Architecture and “Autonomous Planning”

    Public technical narratives often emphasize that new flagship models do longer internal planning and decompose tasks before generation. For application builders, what matters is not architecture marketing terms but behavior: can the model first list character设定 and skill differences before writing code; when it discovers mid-way that two animation sets are structurally identical, will it rewrite rather than patch; and can it go from zero through “gameplay—values—visuals—runnable page” with little manual stitching.

    The so-called loop or iterative Transformer structure, in a research context, generally refers to introducing repeatable computation blocks within the sequence, trading limited depth for more reasoning steps. The business implication is that on complex multi-file or strongly constrained tasks, planning quality may improve, but latency and cost will also rise. Model selection should depend on the task: for fast midnight trial-and-error, a low-latency tier works; for building an interactive micro-scene or parametric model from scratch, you need planning stability and long-context consistency more. Do not treat undisclosed parameter counts, benchmark scores, or “matching some scale” as established facts in a proposal.

    From Vibe-Style Generation to Maintainable Delivery

    Many teams can already spin up pages with natural language, yet projects are “more or less the same”: single-file, lacking resource management, and hard to collaborate on. Three principles are recommended. First, make acceptance criteria into a checklist—write character recognizability, non-duplicate skills, and keyboard playability as automated or semi-automated checks. Second, engineer immediately after generation—add comments, split modules, and remove dead code. Third, treat the model as a compiler front end: humans own gameplay and values, while the model handles boilerplate and the first-pass presentation.

    The same applies to the full creative workflow (concept, pacing, dynamics, rendering): each stage should produce intermediate artifacts (copy, timelines, state diagrams, scene descriptions) that are then generated separately, rather than relying on a single prompt to do everything. Engineering-modeling tasks in particular need to emphasize constraints—dimensions, assembly relationships, export formats—otherwise the result is “drawable but unusable.”

    Summary

    Generating a fighting-style web game from a short prompt tests constraint understanding, multimodal-style visual consistency (even when the output is code drawing vectors), and the ability to compile gameplay into a runnable front end. When comparing, fix the prompt, separate modeling/visuals/logic/deployability, and use constraints to eliminate templated characters. For developers, the payoff is faster playable prototypes; for teams, it is embedding code generation into the creative and delivery process rather than leaving it as a one-off page in a chat log. Rigorous evaluation and a split-into-parts delivery approach offer more reusable value than chasing a particular version number.