Can AI Make Games?

Tetris game created using ChatGPT

With all the buzz about how much ChatGPT’s coding capabilities have improved with o3-mini, I decided to put it to the test. I had one guiding question: “can it make a full game?” There is a lot of speculation about the potential role of AI in the future of game development, and what follows is my latest attempt at understanding what that future might look like.

Some Context: The Advantage of Reasoning Chatbots

LLMs (Large Language Models) such as ChatGPT 4o have traditionally worked by getting a string of text and “guessing” what comes next, in a sense writing the “answer” to the text given to it. Stephen Wolfram has an excellent post on his blog (now turned into a book) explaining what exactly is going on under the hood with ChatGPT and LLMs in general. As he correctly stated, the word-by-word1 text completion done by LLMs has many major limitations, particularly in doing complex reasoning and giving factually-correct answers. That’s where reasoning AI models such as ChatGPT o3 and Gemini 2.0 Flash Thinking come into play.
In their most basic form, reasoning LLMs use another layer of LLMs to do higher level thinking and to give their answer structure. In other words, an internal LLM first creates a step-by-step tree or chain of thought which hopefully guides the main LLM to get to the correct answer, instead of blindly writing text that might be wrong. It’s clever, and it works. On top of that, they have access to some external tools for calculations and code generation, and that makes them all the more powerful.
Writing code is an area that traditional LLMs have historically been really bad at, because coding requires a very structured approach to get right and generating code character-by-character won’t cut it. Reasoning models have taken big strides toward improving that, and meaningful, useful code generation is the main thing I’m going to be testing here.

  1. Technically it’s token-by-token, but that’s a topic for another time. ↩︎

My Test Method

I asked ChatGPT o3-mini-high to make 10 games using the Python programming language. Some blew my mind, and some didn’t even work. Here’s my definition of a successful case in these tests:

  • ChatGPT should provide working code, with minimal intervention—if any—required from me.
  • I had a maximum of 5 prompts to get the game right.
  • The result should show that ChatGPT “understood” the basic game concept.

I’ll start with the better ones.

Tetris

Tetris game created using ChatGPT

This was my first encounter with o3-mini’s code generation capabilities, and I was absolutely blown away by just how good it was. As you can see in the video, the end result was a pretty polished game, and the really cool thing is that it required ZERO intervention from me to work! Some notes:

  • The whole process took less than 10 minutes.
  • Every single iteration produced working code. The final version was close to 700 lines long.
  • I had some pretty interesting back-and-forth with ChatGPT about what could be improved in the game. It “understood” my feedback really well and implemented the fixes correctly. The animations, particle effects, scoring system, and the sound effects were all added based on my feedback.
  • I got a bit adventurous and asked it to produce the sound effects and the music for the game using code alone, and while the results weren’t groundbreaking, they were still pretty interesting.

Here’s my starting prompt in case you want to experiment with it:

Make a 2D game of Tetris in Python.

Match-3

Match-3 game created using ChatGPT

Another classic genre that doesn’t have complicated logic but is time-consuming to create by human programmers. I was again really impressed with the quality of even the initial version, and it very quickly got to the polished state it is in now. The only feedback I gave it was to add animations, particle effects, and a scoring system.

My initial prompt:

I need you to create a 2D Match-3 game using Python.
The shapes are basic, i.e. circle, rectangle, triangle, etc.
When a group is matched, tiles fall to replace them smoothly with animation.
The grid is 10x10.

You may be thinking that I went too easy on ChatGPT and chose basic game concepts for which you can find tutorials easily on the web, and you’d be right. That’s why I decided to take things a bit further, and for the third test gave it a game idea that’s less commonly seen.

Tower War

Strategy game created using ChatGPT

I asked ChatGPT to create a game based on the basic concept of Tower War by SayGames and Cell Expansion Wars by mobirix. You might be familiar with the overall idea. These kinds of games occupy only a small portion of the strategy games market, so I expected ChatGPT to struggle with the idea. I was wrong. The first response was a working game, and I had nothing to add to it. Amazing!

My prompt for reference:

I need you to create a 2D Python game with the core gameplay similar to Tower War by SayGames or Cell Expansion Wars by mobirix.
The player and the AI each control 1 cell at the beginning. Then they begin sending units to other cells. Once one player has lost control over all its cells, they lose.
Use minimalistic graphics, i.e. circles and rectangles to show the essential elements of the game.

3D Model Viewer

3D model viewer app created using ChatGPT

The AI passed the 2D games tests with flying colors, and I now had to make sure it could generate working code for 3D games as well. As a start, I asked it to create a Python program that renders a 3D object, with the twist being that I wouldn’t be providing any 3D models to it and it had to find some on the internet. The results were impressive, and I even went as far as to ask it to do some anime-style shading on the 3D model, which it did without any problems. One thing to note is that since o3-mini doesn’t have real-time access to the latest information, some of the links it thought led to 3D models were actually broken and I twice had to ask it to find another one.

My first prompt for reference:

Create a python program that loads a 3D model that's freely available on the internet, and renders it.
Choose the 3D model yourself.
The rendered 3D model should be slowly rotating.
The background is white.

Ocean

Ocean demo created using ChatGPT

I wanted to see how ChatGPT handled writing complex graphics code, and so I asked it to render a realistic-looking ocean using code that runs on the GPU. The resulting scene was honestly different from what I had in mind, but upon examining my prompt I learned that the poor program had no way of knowing what I had in mind! As a final touch, I asked it to add a floating wooden box to the scene.

My prompt:

Create a 3D application using Python showing an ocean from an isometric perspective. The ocean should be wavy and be rendered using a realistic shader. There are no outside assets and everything must be done in code.

What Didn’t Work

  • I just couldn’t get ChatGPT to produce a working version of a 3D Tetris game. You could say it still struggles with outside-the-box ideas.
  • Confident I was now dealing with arcane technology bordering on AGI, I asked AI to create an AI to play a verbal game of Twenty Questions with me. The AI had to be able to answer my questions as a human would, and in my vanity I asked ChatGPT to use an LLM that would run on my system. To my surprise, such a thing was actually possible, and it recommended we use ChatGPT-2 locally. In the end, it couldn’t give any semblance of a correct answer, though, and I realized just how far we’ve come since ChatGPT-2 just a few years back.
  • When I asked it to make a 2D game similar to Bridge Race, it never showed any signs that it actually “got” the basic idea behind the game. It knew all the words that would go into describing that game, but was unable to create the actual game. That was illuminating—AI can fool us into thinking it’s a human as far as speaking is concerned, but that power of speech also needs to be translatable into an actionable understanding of the material world if it is to reach its full potential.

Other Tests

  • I asked ChatGPT to write a program that creates game music algorithmically, and though it sounded very confident it could do so using the many techniques and algorithms it used, you couldn’t really call the end result “music”. When I asked it to imitate Mozart the results improved significantly, but I still wouldn’t consider it a success.
  • ChatGPT was easily able to make a painting application featuring a brush and a paint bucket and it worked great.

How We Use AI

At Dropout Games, people of every background use AI to a great extent in their day-to-day work. When it comes to programming, we have found AI excels at providing basic, boiler plate code needed to establish the initial structure of things that would take a lot of time and repetitive work to set up. Also, it helps technical people with limited skill in a particular area to have working code they can tweak easily, instead of having to learn all the basics first. Considering the rate of improvement of AI models, we expect to rely more heavily on AI each passing day. We don’t see AI as a replacement, though we believe it will play an important role in job changes for many people. Rather, we see it as an essential tool we can already no longer imagine our lives without.

Closing Thoughts

Right now, when developing a piece of code using AI, a human is needed to test, observe, and give feedback on the output of AI’s code. If only we could give the AI access to a full development environment, letting it observe the results and correct itself, the changes would be transformative. With the introduction of agents by many AI companies, I believe that’s not a far-fetched idea.

All in all, AI did way better in my tests than I expected, and it’s improving fast. It’s incredibly effective at getting basic ideas right, and the sheer volume of working code it can produce with a single prompt is unbelievable to me. I can’t help but be extremely excited for what is to come in the near future.

As a side note, here’s a fun fact: I didn’t have any software to reliably convert videos to GIFs, so I asked AI to give me a Python script to do that for me. All the GIF videos you see on this page were converted using that script.


Subscribe to Sahand Malaei’s Blog


دیدگاهتان را بنویسید

نشانی ایمیل شما منتشر نخواهد شد. بخش‌های موردنیاز علامت‌گذاری شده‌اند *