“Alien Escape Game” built with Websim LLMs

Play on github
Play on WebSim.AI
See the code

Introduction

The idea of designing your own video game without writing traditional code might have sounded like science fiction not too long ago. Yet today, with platforms like WebSim, it's becoming a reality. WebSim is a platform that lets you build fully functional web games simply through prompt programming—describing in natural language what you want to create, and letting the AI handle the heavy lifting.

What makes WebSim particularly fascinating is how it taps into the capabilities of modern large language models (LLMs). For my project, I explored a variety of these cutting-edge models, including Gemini 2.5 Pro, ChatGPT 4.1, Sonnet 3.7, and DeepSeek V3.1. Each model brought a slightly different style and strength to the table, offering unique insights and capabilities as I refined my game. The process is straightforward yet surprisingly deep: you provide prompts, and WebSim generates a complete HTML file, CSS file, a JavaScript file based on your vision. It also intelligently exposes key variables—things like starting speed, spawn rates, and more—giving you an easy way to tweak gameplay without digging through complex code.

At the same time, if you want to dive deeper, you can edit the HTML and JavaScript directly. During development, I even pasted sections of the generated code into ChatGPT for hybrid manual debugging. Watching AI-generated code and human problem-solving work hand in hand was a glimpse into a new kind of creative workflow—part machine, part imagination.

Building Alien Escape

One of the games I built using WebSim is called Alien Escape.

In Alien Escape, you pilot an alien spaceship on a desperate journey toward a black hole. As you climb higher, the environment transitions from grassy landscapes with buildings and clouds to the emptiness of space, where you dodge satellites, alien ships, and massive planets. The goal: reach the black hole and escape.

The experience of building this game was compelling because it didn't require mastering a new framework or a deeply technical setup. Instead, it was about refining my ideas—thinking visually and mechanically—and then using a combination of prompt iterations and manual tweaks to sculpt the final result. The first solid prototype came together in just about three hours, which was astonishing. From there, I spent another 20+ hours tinkering—exploring new features, fine-tuning gameplay mechanics, adding sound and interactive buttons, and building support for both desktop and mobile play—while pushing the boundaries of what WebSim could handle. That meant writing and revising hundreds of prompts, trying out different LLMs, and occasionally stepping in to debug or adjust the generated code manually. Roughly 90% of that time was spent waiting for the LLM to regenerate and compile the updated code—a process that can take several minutes per iteration. Most of the experience was a mix of creative experimentation and patience. Watching WebSim convert abstract concepts into a playable 3D experience was a fascinating window into where AI-assisted creativity is heading.

Limitations of Prompt-Based Development

Despite the power of prompt programming, there are real constraints, especially around scale. One major challenge I ran into was that after around 3,000 lines of code (LOC), many models began to struggle with retaining full context. This is closely tied to the concept of tokens, which are the basic units of language models’ processing, roughly corresponding to words or parts of words. Each model has a finite context window, or working memory, that limits how many tokens it can consider at once. Once you hit that ceiling, the model can no longer “see” all of your previous code and instructions, which leads to inconsistencies, logic errors, or broken integrations between features.

In other words, a model’s “working memory” is directly constrained by its token limit. After that threshold, the model can lose track of key variables, repeat logic unnecessarily, or forget earlier instructions, especially in large, multi-file projects. When that happened in my workflow, I often had to backtrack and revise: deleting sections, rewriting prompts from a different angle, switching to another model, or diving into manual debugging and fine-tuning. Sometimes the best fix was to reduce complexity and scope, just to stay within the token limits of the AI's working memory.

To unlock the next phase of creative tooling, we’ll need models with not just bigger context windows, but better working memory—the ability to track, relate, and reason across sprawling projects and conversations without losing coherence. Until then, hybrid workflows—combining human reasoning with prompt iteration—will remain the best path forward.

Prompt Programming: A Glimpse of What's Next

Tools like WebSim point to a broader shift already underway. We are entering a period where prompt programming—giving instructions in natural language—could become a primary mode of software and content creation. Within the next 5–15 years, it seems increasingly plausible that enormous virtual worlds—cities, planets, even entire ecosystems—could be built simply by describing them aloud.

Rather than coding every detail, creators will orchestrate experiences through dialogue with increasingly capable AI models. What matters most won't be technical fluency in programming languages, but the ability to imagine, to specify, to refine. It’s an open question how quickly this will happen, but the trajectory feels inevitable.

Beyond Virtual Worlds: Speaking Reality into Existence

Looking even further ahead, the implications stretch beyond digital spaces. Advances in 3D printing, robotics, and AI-driven manufacturing hint at a future where physical structures could also be created through prompt-based design. Imagine describing the layout of a home, or an entire neighborhood, and having autonomous systems build it.

In such a world, the old distinction between thought and creation begins to blur. Left-brain precision—the traditional mode of debugging and engineering—could become less central, while right-brain creativity—vision, aesthetics, imagination—takes the lead. Those who can think in bold, detailed, and imaginative ways may be the ones who shape what tomorrow looks likeshape more of the future than those who simply know how to build with existing tools.

It's a fascinating—and humbling—moment to witness. Technologies like WebSim offer just a tiny glimpse of the deeper transformation that's coming.

Appendix: Primary Prompts Used to Create Alien Escape

  • Create a 3D rocket ship game where you fly upward through strange objects toward space, accelerating slowly.

  • Transition from grassy landscapes to space; dodge satellites, alien ships, and planets.

  • Switch to an alien saucer instead of a rocket; allow free 3D flight toward a horizon with objects in the distance.

  • Fix the camera: make the saucer move forward into the screen and give it visual airflow; slow acceleration.

  • Remove the “up” command; fly at a fixed 15-degree angle and dodge with directional controls.

  • Increase the game speed and add dynamic acceleration.

  • Replace abstract objects with planes, parachuting people, and helicopters; transition to satellites, alien saucers, and massive planets.

  • Add a black hole at the end of the journey as a win condition.

  • Lock the forward path, allow movement within a 3D rectangle; add spinning collectible coins with a counter.

  • Refactor codebase into multiple files; fix null object errors and other bugs.

  • Add a green alien in the cockpit; add visual details to airplanes and helicopters.

  • Reduce the size and frequency of objects for performance and clarity.

  • Continue accelerating and switch to satellites/asteroids once in space.

  • Fix coin-spawning bug.

  • Add title text "Alien Escape!"; build a visual environment with houses, clouds, and Cessna-style aircraft.

  • Extend ground visuals as long as they are in view; sparse clouds outside player zone.

  • Transition from grass to space cleanly; stop buildings/clouds at space entry.

  • Add speed display; maintain environmental visuals up to space.

  • Populate buildings along the player path until the end of the grass.

  • Add large, ringed planets every 5K meters; position a black hole at 50,000 meters.

  • Increase size/frequency of space obstacles (planets, starships, Death Stars).

  • Add “Regular” and “Invincible” game mode buttons with zone labels.

  • Show the current zone in the top-right corner.

  • Add instructions like “Avoid the obstacles!” or “You are invincible!” depending on the mode.

  • Zoom the camera in slightly on the saucer.

  • Add Star Wars-style ships outside the playable area.

  • Include ground tanks near cloud zones.

  • Refine controls; make the saucer maneuver more quickly.

  • Add three speed mode options (Slow, Medium, Fast) and corresponding acceleration.

  • Allow users to select speed/mode before starting; highlight selected buttons.

  • Improve mobile support; add D-pad for mobile; touch-responsive flight controls.

  • Adjust mobile button placement; remove extraneous UI text.

  • Change speed button values; add “Custom” option.

  • Lower and align UI text.

  • Add pause and restart buttons; refresh the page on restart.

  • Remove browser alerts; default custom speed to 400 m/s and 20 m/s².

  • Enlarge coins; add subtle wind trails from the saucer.

  • Style trails like short fighter jet contrails.

  • Add laser beam (triggered by spacebar or mobile button); destroy obstacles on hit.

  • Resize visual elements: planes, helicopters, tanks, satellites, asteroids, aliens.

  • Add random alien shapes (triangles, squares, etc.).

  • Ensure the start button remains visible on the “Custom” screen.

  • Style laser as a ball, then enlarge and elongate into a tube.

  • Add mountains before low orbit.

  • Break up the code into index.html and main.js.

  • Expand the vertical movement area; populate obstacles higher up.

  • Increase cloud density and persistence.

  • Remove houses when switching scenes.

  • Extend flyable height; more obstacles at high altitude.

  • Resize the black hole and coins; reduce coin density and confine them to the play area.

  • Make satellites different shapes; diversify space object visuals.

  • Add zone-specific visual effects, like colored trails.

  • Let the player fly into the black hole before ending the game.

  • Add a particle splash effect when collecting coins.

  • Switch the shoot/pause button positions.

  • Make laser speed relative to ship speed.

  • Add laser sound effects and coin “ching” sounds.

  • Implement a boost feature (Shift key / mobile button) with speed multiplier and sound effects.

  • Visual boost, trail change, and sound toggle based on status.

  • Add arcade music for each zone; mute/unmute toggle button.

  • Improve button spacing and sizing for mobile/touch UX.

  • Add control hint text (e.g., "Boost = Shift & Shoot = Space").

  • Smooth acceleration and deceleration between base and boost speeds.

  • Add an in-game timer that tracks completion time.

  • Show game over message; display spacecraft at all times.

  • Play different sounds for boost, explosion, etc.

  • Fix audio bugs (e.g., duplicate function declarations).

  • Adjust the arrow buttons' size and position.

  • Resize UI buttons and rearrange order for a better layout.

  • Final tweaks, manual edits, and test cycles.

I used 487 prompts by then.

Previous
Previous

Stockfish Chatbot with a Mistral LLM

Next
Next

AI Chess Web App V2 with Stockfish