TLDR: I wanted to see what coding a game with AI was like.
Hold on, it's pretty nuts.
My Prototype:
Prototstar* Prototype built in Phaser.js using Windsurf IDE/Cascade Agent, powered by Codium and Claude Sonet 3.5 from Anthropic.*
Can I build a game with AI?
Coding with Windsurf
From Concepting to Functional Prototype
Reality Check
Lessons Learned
Classes ended and I turned my attention to some play time. Everyone is considering the why and how of AI. I decided to make a game with it - something playable and fun, a real working prototype.
I wanted to use AI to create gameplay, logic, and code. Not just prompting for haphazard code, but reflecting the ideas I wanted to create and test. I've been making all sorts of game prototypes using Claude's programming ability. It's amazing how 20 minutes of chatting can produce a simple 3D scene.
But to make a game you need something more robust - a project I could edit in an IDE with proper structure and architecture. So I started imagining a top-down space shooter and began a holiday AI-enhanced dev process.
I stumbled on Windsurf, an IDE that elevates AI from a simple code generator to "a true development partner." Through its “Codium” system and “Cascade” agent, it creates an environment where AI actively participates in development, generating code and file structures in real-time within the IDE itself.
In English, it "autocompletes" your code while you prompt it on the side margin. At the way back it’s powered by Claude Sonnet 3.5, which is what I use for text generation and prototypes.
When you find your rhythm with Windsurf, it actually does feel like catching a ride – the AI writes code for individual files, making strategic guesses about what to do next.
For example - I might have said something like :
"Use the arrow keys to create a truck controller. Have the truck be drive-able, with forward arrow accelerating to a maximum speed, and the side arrows rotating the direction."
It would “think” with those little dots going back and forth…
Then, tell me it would build a movement controller, develop a state machine, and then build the physics. And it did it! You could watch it explain what it was working on, and like magic, watch the code being developed and commented. The most fun was when it said things like:
“Ah, I see the problem. Let’s fix it in the file.”
The feel of the game play was sometimes spot-on. Sometimes it was a disaster. It's important to have something in mind or be willing to let it take its own direction. Sometimes it really is like holding on and being pulled along almost out of control.
Unlike traditional tools that require copying and pasting code snippets, this integrated approach takes a more improvisational path with calculated-risk prompt asking. The refinement and continuous communication with an AI that rapidly forgets dependencies is the real challenge.
To imagine Protostar - I gave myself a design period with Miro first. Using Leonardo.ai for images and consulting with Claude often, I developed concepts about space, aliens, and fun.
I spent about 90 minutes crafting a detailed prompt with Claude, which became my design document - outlining everything from entity specifications to movement systems and screen layout.
What happened next was remarkable.
Within hours, I had a working prototype that exceeded expectations. The game featured three planets orbiting a sun, a sophisticated energy management system based on solar values, and even a basic dialogue tree for alien interactions. The speed at which game mechanics came together was mind-blowing. This kind of prototype would typically take weeks to develop.
However, this rapid development created significant technical debt. The AI would sometimes rewrite entire sections of code, potentially breaking existing functionality. Version control became essential - when every prompt could go off the rails, you need the ability to roll back.
I kept a running document with entities, prompts, numbers, and thoughts. For example, the ship's power supply was 1000 one moment, then rewritten to 100 when updating the UI! I would personally write comments in addition to the the code, and would parse through it after changes. The better I knew the code, the more specific I could be about what shouldn't be touched.
Control came through clear communication and well-documented prompts, not endless small fixes. It's about communicating the larger system and giving enough detail for individual components to be functional.
Emboldened by early successes, I attempted to port the project to Rust using the Bevy game engine. What?!? --- This was just irrational mania. Why would I possibly do that, except that with this new found coding ability, I just could.
This was dumb – my complete unfamiliarity with Rust created a learning curve that even AI couldn't smooth out. I was over my skis. This experience highlighted an important truth:
AI is a powerful tool, but it can't replace fundamental programming knowledge and experience.
This experiment revealed several key insights:
AI excels at rapid prototyping, allowing quick transformation of ideas into playable demos
It moves incredibly fast - you need to stay aware and in control
Understanding game development fundamentals still remains crucial - yay!
Version control isn't optional - it's essential with unpredictable AI generations
AI still struggles with system-level architecture and bug detection
While we're not yet at AI fully automating game development, we're entering an era where AI tools can significantly enhance a developer's capabilities. The future might see the emergence of a new kind of game developer – a generalist who can leverage AI to handle multiple aspects simultaneously. ( I wrote about it here. )
The journey of building Protostar has shown that while AI might not be ready to take over game development entirely, it's already transforming how we approach the process. As a prototype to play with AI coding, Protostar served its purpose. But more importantly, it showed me that things once beyond my technical ability are now within reach. I have placed the Github of the code below if you wish to take a look at it!
All of this is going to get weirder for sure! All we can do is hang on.
Nye Warburton is a systems designer who builds generative experiments in the 9th dimension. This essay post was made with the assistance of Perplexity, Llama3, Claude Sonnet, and Stable Diffusion. More info: https://nyewarburton.com
Protostar Prototype Github:
I make mention of the following tools and models in this piece:
Windsurf / Codium
Claude Sonnet 3.5 - Anthropic
Leonardo.ai / Stable Diffusion
Phaser.js / Typescript
Rust
Bevy Game Engine
Miro
Obsidian
Nye Warburton