I made a fantasy vampire game with GPTs and no experience

Akhlas Hussain
4 min readNov 11, 2023

--

We all love games, but no one whould have thought making games would also become easier through GPTs , I created a GPT and gave it the entire codebase of pygame, and made a game with it, gameplay is at the end , here’s how it went :

1. The Starting of the Setup

Initial Prompt

I gave the GPT an initial prompt which was to come up with a outline and a text based game with choices for the player. After this I asked to start preparing a plan on how to start with the folder structure and the files.

Folder Structure

Not only I got a good structure, it also made a template directory and gave me a zip file to download and setup. That was smart !

Downloadable zip

2. The Main Files

Got a list of the files that are essential but since I needed to make something quick, I moved with the most essentital ones like the title screen , menu screen , and then the game starts.

Asked it to generate the main file first to initialize and start pygame, it did it and also generated a background with DALLE3.

After this I asked it to add the starting game title text and blinking start game, it regenerated the main file and the result was good, needed to go back and forth sometimes to get it to center.

Background of title screen

Dalle3 Images get only generated in 1:1 aspect ratio, needed to stretch it. Multiple aspect ratio functionality would be nice in the future.

It has good memory recall, some places it wasn’t able to remember the code it generated before like it was not able to remember the context (dark gloomy background) when generating the assets.

Image generation failed context

3. The Dialog Box

For the dialog box dalle3 was only able to generate square images, also it needed to have width more than the height so I had to use another generation tool for leonardo.ai to generate it and it looked good enough in the screen.

Dialog box

Before this I asked GPT to set the location of the dialog box by giving it an image with a red circle on it and it gave me good code, needed to do so height adjustments and it worked like a charm.

4. The First and Last Chapter

I wanted the game to have story routes like more text games so I asked for it and GPT delivered it , it had initial routes and then I asked it in loops to next routes into another and generate dialogs with assets.

I wanted to end it quick so I told GPT to make a route like this :

  • The player enters the castle through front door. (Choice)
  • The player then goes to the staircase (Choice)
  • The player notices a lady looking at the moon
  • The lady notices him and asks about tresspassing
  • The player dosen’t answer (Choice)
  • The lady grows fangs and then attacks the player.
  • Gameover

With some do overs and going back and forth I was able to make this in some hours , with the help of amazing GPTs . I think this is really a revolutionary tech and will change everyone’s lives.

Here’s a link to the twitter post where I have uploaded the gameplay too :

Here’s the link to PyGameMaster which I created and used for this game :

Follow me on twitter to get more content like this : @akhlas_hussain

--

--

Akhlas Hussain

FullStack Dev , I write tech, productivity, self-improvement etc. Connect with me : https://twitter.com/akhlas_hussain