LLM Code Generation in Practice: Tests and Lessons from Newly Released Models

    Two browser-based coding tests—a classic desktop interface and a real-time strategy game—explore how newly released large language models handle visual design, interaction logic, and complex requirements. The results highlight the value of structured prompts, targeted iteration, repeated evaluation, and reliable engineering workflows when turning AI-generated prototypes into usable software.

    1. Why Live Web Previews Deserve Attention

    Several large language model products have recently introduced features resembling an online AI development workspace. Users describe their requirements in a chat interface, and the model generates runnable web code that renders in an adjacent sandbox, ready for immediate interaction. This marks a shift from text-only answers toward a workflow that combines conversation, code generation, and execution.

    For developers, the main benefit is rapid prototyping. Within tens of seconds, you can see whether an idea’s appearance and interactions match your expectations, without setting up a project scaffold yourself.

    That convenience also creates a demanding test of model capability. Generating an interactive web application requires visual design, event handling, animation, and state management to work together. A convincing screenshot alone is not enough.

    2. Test One: Recreating a Classic Desktop Interface

    My first test asked the model to generate a browser-based desktop environment. Windows had to support mouse dragging and overlapping placement, along with a classic 3D window-switching animation: multiple windows appear as rotating, three-dimensional cards, allowing users to select one to activate.

    The task tested four areas:

    1. Mouse event handling: Combining mousedown, mousemove, and mouseup correctly requires tracking drag state, translating coordinates, and enforcing viewport boundaries.
    2. Stacking order: Clicking a window should bring it to the front through z-index management, which tests the consistency of the application’s state handling.
    3. 3D visual effects: The switcher requires coordinated use of CSS transforms such as perspective, rotateY, and translateZ, together with appropriate animation easing.
    4. Visual fidelity: Window title bars and buttons should reproduce a translucent, frosted-glass appearance.

    The results were revealing. An anonymous version deployed earlier through a public channel produced noticeably better results with the same prompt. Its window buttons were well formed, its glass effect looked natural, and the overall interface more closely matched the intended style.

    After the official version launched on the product’s website, responses became noticeably slower, possibly because of high concurrent usage. The visual quality of the generated interface was also less consistent than in the anonymous version.

    I then tried two rounds of prompt refinement:

    • Replace vague language such as “a glass effect” with actionable instructions—for example, “use an rgba translucent white overlay and backdrop-filter: blur on the title bar.”
    • Specify interaction acceptance criteria, such as “windows must remain within the viewport while dragging” and “clicking a window brings it to the front.”

    These revisions improved the output, but the results still did not consistently match the anonymous version’s first attempt.

    The lesson is that the same model may behave differently across deployment environments, load conditions, and sampling configurations. A single test is not enough for a definitive judgment. Repeated sampling and evaluation based on median results provide a more reliable approach.

    3. Test Two: Building a Browser-Based Real-Time Strategy Game

    My second test was a recurring final challenge: generate a browser-based turn-based strategy game, then apply several modifications.

    This type of task involves a game loop, unit state machines, pathfinding, and coordinated UI updates. It is a useful test of both the model’s reasoning and its ability to organize code.

    The prompt contained four progressively demanding requirements.

    Requirement 1: Convert the Game to Real-Time Strategy

    The model needed to understand that an RTS is not simply a turn-based game with the “next turn” button removed. Both sides must progress concurrently on the same timeline, with time advancing fairly for each side.

    The generated implementation correctly used timer-based real-time logic, indicating that the model understood the underlying concept.

    Requirement 2: Add AI-Assisted Technology Research

    The original game did not include an AI assistant that automatically researched technologies. The model had to interpret this as a new, optional assistance feature: when enabled, the system should automatically carry out research whenever sufficient resources were available.

    The generated code implemented this feature.

    Requirement 3: Enable Automatic Target Acquisition

    All units needed to automatically find the nearest enemy unit or city. This involved target selection and path planning.

    The model completed this requirement on the first attempt.

    Requirement 4: Improve Interaction Details

    The final set of requirements included:

    • A speed slider adjustable from 1× to 10×.
    • A board made of regular hexagonal cells, requiring the relevant hex-grid coordinate calculations.
    • Arrow-key controls for shifting the view.
    • Icons for major elements, using emoji or system characters.

    These finer-grained requirements were also implemented correctly.

    This task is not a capability unique to one model. Leading models can generally complete it, although some produce more polished interfaces than others.

    That is the value of a complex test: it helps reveal not just whether a model can complete a task, but how well it completes it and how often it succeeds on the first attempt.

    4. Three Practical Lessons from the Tests

    1. Structure Prompts in Layers

    Divide requirements into three layers: core mechanics, additional features, and visual details.

    Each layer should be independently testable. This makes it easier to identify whether a model’s weakness lies in understanding the main behavior, integrating features, or refining the presentation.

    2. Use Iteration to Address First-Pass Weaknesses

    When the initial result falls short, switching models is not always the best next step. First, translate the unsatisfactory parts into concrete, actionable technical instructions and add them to the prompt.

    The desktop test illustrates this approach: specifying a translucent rgba overlay and backdrop-filter: blur gave the model clearer guidance than asking for “glass-like” styling.

    3. Plan for Production Engineering

    A generated prototype is not the end of the development process. Moving it into production typically requires a containerized runtime environment, version control, and object storage for static assets.

    Established cloud development and deployment services can help connect these pieces into a complete engineering workflow.

    5. Conclusion

    Live web previews lower the cost of validating ideas, but the tests also suggest that output consistency can vary with deployment conditions and load. Those observations should be treated as reasons for broader testing, not as proof of a single underlying cause.

    Model evaluation should therefore rely on repeated, multidimensional tests rather than one interaction.

    Ultimately, productive AI-assisted development depends on three things working together: clear requirements, structured prompts, and reliable engineering support. Live previews make experimentation faster; these practices help turn that experimentation into usable software.