AI-First Game Development. Part 1. Training the GPT

Mark Rodseth
5 min readFeb 11, 2024
MidJourney: bubble wrap on cosmic background — ar 4:1

Welcome to part one in my series, AI-First Games Development.

This series sets out to answer the following questions:

Can AI help a rusty ex-coder with a passion for games, not a lot of free time with work and family, create a decent computer game? And if so, how much load did the AI take, how has the software engineering process changed since I was in the driver’s seat, and what other aspects of game design and development can AI help out with beyond writing code? And finally, what are the best tools out there to help me with this job?

If you want to catch up or skip ahead, here is a list of all posts in the series.

Part 0: AI First Game Development (Intro)

Part 1: AI-First Game Development. Training the GPT

Part 2: AI-First Game Development. My AI Teacher

Part 3: AI-First Game Development. The Chasm Between Design and AI-Generated Art

Part 4: AI-First Game Development. The Ideas Machine

Part 5: AI-First Game Development. The Engineer Lives

The first step on this journey was to arm myself with the right AI tools. But, before I get into that, it’s important I give you an idea of what game I intend to build.

Who Doesn’t Love Popping Bubble Wrap?

Choosing what kind of game to build was key. I needed a fairly simple idea (I didn’t want to bite off something too big given time limitations) that would be fun to play.

An idea I had a long time ago which re-surfaced from the depths of my memory (from the fetid swamp of ideas that never went anywhere) was a game based around popping bubble wrap. I mean, who doesn’t love popping bubble wrap?

My thinking at the time was if I could re-create that magic feeling in game form, with some fun dynamics, I would be onto a winner. This concept seemed to fit with an idea that was achievable with a reasonably limited amount of effort, could be a fun, casual, time-waster type game, and tickle those synapses with the joy of popping bubbles. Calling the idea as half-baked was generous, but it was enough to go on.

But wasn’t this meant to be AI-first Game development?

A good observation. For this exercise, I could have used ChatGPT to brainstorm ideas and select one from its suggestions, but I defaulted to human-first. This led me to my first insight about AI-First doing.

It’s hard to change your way of working to AI-First, and indulging yourself in the old way of working is comforting and safe.

Tooling Up

This brings me to choosing my AI Weapons. This part wasn’t hard.

I’m a regular (paid for) ChatGPT user and find it an indispensable part of my workflow. OpenAI recently released Create-your-Own-GPT which looked like a perfect fit for my challenge. With the ability to create my own GPT, I could ‘train’ it to be a perfect co-pilot for my project. More about the training process shortly.

My second tool, given this was a software engineering project, was GitHub CoPilot. CoPilot adds GPT/LLM capabilities directly into your IDE (Integrated Development Environment) and has some workflow integrations allowing you to quickly perform tasks such as refactoring, querying, code completion, bug spotting, test writing, documentation, explanation, and more.

Training the GPT

OpenAI’s new create your own GPT capability looked like a perfect fit for this project. I could have used standard ChatGPT, but I would have had to give it context each time I asked it questions, such as: what I was trying to achieve and what technologies and platforms I was using. With a custom GPT I could load in this context to save the effort of having to provide context each time.

Custom GPTs allow you to provide your context and content in two main ways: via the prompt training interface and uploading docs.

Prompt training: Add instructions, context and content in via the prompt interface on the left.
Document Upload: Upload documents as Knowledge

Using this back-end I created my personalized AI assistant which was furnished with all of this context and some documents I uploaded.

Some observations on customizing an OpenAI GPT.

  • Its black-box. There is NO documentation on how OpenAI uses this information you provide. Many forums are speculating about whether fine-tuning or RAG (Retrieval Augmentation Generation) is behind the scenes, or something else, but no one knows.
  • The prompt training interface is most effective for teaching. I found uploading documents as hit and miss, and wasn’t sure when GPT would refer to these, its base model knowledge, or the knowledge I provided via the prompt interface.
  • It’s often infuriating. Often it ignores my instructions. The test panel on the right allows you to check if your changes have been effective, and sometimes it took me multiple attempts to get it to ‘listen’.
  • It’s indispensable. Throughout the project so far, I have used this GPT most of all.

After much back and forth, GameSpark was born. A custom GPT assistant primed to help me create hyper-casual games in Unity with proprietary knowledge including: game inspiration ideas, the lastest sdk docs, multi-modal (to help with asset generation), and my own pinches of prompts that are long forgotten but do make it a more useful tool.

A Journey of a Thousand Prompts

With AI buddy primed, I was ready to get started.

The challenge I had was I had a pretty steep learning curve to get up to speed with the Unity gaming platform, development environment, C# (the preferred coding language in Unity) and modern best practices. I needed to to learn, quickly, and this is where my GPT took on its first role: the teacher.

Read on in Part Two where I talk through how I used GPT to help me learn Unity and get to grips with best practices in building games for IOS and Android platforms. I indulge my engineering itch, and create a few Proof of Concepts testing out some of the key mechanics for my Bubble Pop game. I also wrestle with human-vs-AI first, and have some stark reminders about the challenges of being a software developer.

--

--