In this article, I do not discuss the politics of AI, or whether it is appropriate or ethical for companies like OpenAI to scrape our combined output over the centuries with no compensation for the original creators.
I am simply looking at how the use of them can make the game development process faster and more efficient for an independent developer.
A couple of months ago, I decided to write a simple side-scroller game, using:
one hour a night, and more importantly,
as much support from generative AI as made sense.
It took 25 hours to produce the game, and then another 8 hours to work out how to compile it for Google Play, and deploy it there.
After a four-day wait for the application bundle, the game went live on Google Play ← this is a link to install it.
It’s a free offline game that gathers no data about you (and doesn’t contain any blockchain stuff).
Introduction
I’ve been writing JavaScript code on and off since 1998, and I wrote my first program in 1983 using Sinclair BASIC, so this project wasn’t “vibe coding” by someone with no coding experience.
Here’s the list of what I used:
Cursor AI for my development environment
20$/month, but you can go with free, and it will work about as well. You just have to wait longer.Midjourney to generate game images
$8/month, because I got tired of waiting for images to be generated.Suno for soundtracks
$8/month: this is required to obtain commercial rights to the songs you produce.Google Play Console to publish the app
One-time $25 fee to register as a developer.
I also got a single royalty-free explosion sound from Pixabay. Total cost: $61.
The game is written in Expo React Native, which is a tool for producing React and JavaScript that compile and run natively on Android, iOS, and web, but I only went for Android, because I avoid using Apple products, and web pages are usually not displayed on touch screens, which my game requires.
The AI programming experience
Once you get used to it, programming with AI works well.
Cursor AI’s agent is excellent at producing standard templates rapidly and acts as a summarizer of programming material out there, so it is quicker than trawling through incorrect Stack Overflow answers and irrelevant or incomplete Medium articles.
If you are using a very popular programming language like JavaScript or Python, and if what you are doing is not novel, then the AI produces a lot of useful stuff.
I don’t know how much coverage there is for newer programming languages like Rust or Golang.
Some of the problems I hit were:
Using React Native, Skia, and Reanimated to animate sprites on a phone screen.
The Skia docs say that this is possible, but there were no articles describing how. Cursor repeatedly produced junk, never admitting that it had no idea how to create animated sprites. I ended up performing my own investigation and even wrote an article explaining my solution, so it should eventually get scraped and end up in the AI models.Doing complicated maths for novel purposes.
I came up with a new, efficient collision detection method, which Cursor never understood, and so I had to handle all the mathematics myself. Similarly, the AI failed dismally at scaling sprites to fit various-sized screens.Handling sound.
Cursor wrote code that combined features from different releases of Expo, which naturally didn’t work. To be fair, the rapidly shifting sands of React frameworks mean that this is an ongoing problem, whether you are using AI or not.
Overall, I would estimate that using AI for coding saved me about 50% of my coding time, and for simple tasks like putting a text field in the center of the screen, changing its color, adding extra pages, and moving things around, you can’t beat it. And your code ends up properly formatted and commented, so you don’t have to run a linter.
The sound experience
I play guitar and occasionally write my own songs, and I know how to drive digital audio workstations like LMMS, so I could have composed my own tunes. However, that would have taken days, or even weeks.
With Suno, I churned out eleven tracks in about half an hour. They’re even published as an album on all the streaming services, like Spotify, Apple Music, Deezer, and YouTube Music. I found the arcade game's electronic music to be reasonably catchy and suitable for the simple purpose I needed it for.
Using Suno to try to produce a hit song is probably a waste of time, but for background electronic music, it saves time. Background music doesn’t have to be that great. It just has to have the right pacing for each particular section of the game.
The visual experience
Midjourney was great for producing background images, and the initial structure of the sprites I wanted. Some editing with an image editor was needed to tweak the rocket ship, but again, starting with AI-generated images is much faster than trying to build all the graphics yourself. And of course, it’s a lot cheaper than paying a graphic artist on Fiverr to produce them for you.
Conclusion
The result of my programming exercise is, unsurprisingly, not a triple-A game, but it functions perfectly well. Although the sound and image AIs have surplanted musicians and graphic artists in this case, as I don’t think I would have hired professionals for the job, it is not as though AI has taken their jobs.
Instead, AI enabled me to work on the parts of building a game that I enjoy, without having to spend days or weeks on the aspects that I, although also enjoyable, would have taken so much time that I wouldn’t have bothered.
AI acted as an assistant. I like to think of it as an idiot-savant jack-of-all-trades with unlimited enthusiasm, a perfect memory for all the snippets of code available on the Internet, but severely lacking in innovative skill and insight.
One this is for sure: AI is effective, and so it won’t be going away anytime soon.