The last year has seen an explosion of interest in generative AI tools like ChatGPT and Midjourney. Now, you can simply tell a computer what you want it to create, and it might just be good enough to replace a human. These tools are causing consternation in some corners of the internet, but others have embraced them. One AI enthusiast has used some of the most popular generative AI products to create a game from scratch. It’s called Angry Pumpkins, and while it’s not exactly an original idea, it was created entirely with AI.
For this project, Javi Lopez says he used a combination of ChatGPT (running the latest GPT-4 model), Midjourney, and Dall-e 3. First came the game’s visual assets, which were generated in Dall-e and Midjourney. You can see all the prompts used to get the necessary images—this part is pretty straightforward. Lopez actually references Angry Birds several times throughout the process, and the AI apparently knows how to leverage that example. For example, the AI was told the title screen should be “inspired by the Angry Birds game.”
After getting the visuals sorted out, it was on to coding the actual game. Angry Pumpkins was written in matter.js and p5.js, but Lopez didn’t write any of the 600 lines. Again, he referenced Angry Birds, and the GPT-4 model ran with it. He does note that the AI made mistakes, but he was able to explain what looked wrong and ask the machine to fix it. It took “many iterations,” but his patience paid off.
You can try the final product right now in your computer’s browser (it doesn’t work on mobile). If you’ve ever played Angry Birds, the experience will be familiar. There are unstable piles of debris and assorted monsters on the screen. By flinging your pumpkins, you can knock things over and kill the baddies. There’s only one level, but the same prompts could be used to generate additional boards now that the base code is operational.
The physics of Angry Pumpkins feel a bit simplistic compared to a “real” game coded by humans, but this was created entirely by a machine because a human asked for it. Lopez says it took him 10-12 hours total to complete the project, and he’s just one guy. High-end video games are hugely expensive to create today. New installments in franchises like Call of Duty and Assassin’s Creed can cost hundreds of millions of dollars. Being able to tell a machine to do some of the work could reduce costs—and the number of jobs supported by such a production. For better or worse, that may be the future of game development.