ChatGPT as a "game engine"... Journaling with a chatbot

We’re a bunch of friends who’ve been having a blast creating “Interactive Fiction” for a while. Lately, we’ve decided to mess around with Chat GPT and, gotta say, we’ve come up with some pretty cool stuff. We tried teaching the chatbot to act like a “game engine”… and we were totally blown away by what we managed to achieve.

You play by chatting with GPT. It creates a setting and describes the situation, and you interact as players.

We’ve been testing out a bunch of scenarios these past few days, like a Fantasy setting or tried to mimic ‘Alice is Missing’… but at the end, we did something that has, let’s say, the flavor of “Monsterhearts” and another adventure inspired by the movie “The Thing”.

We’ve come up with our own prompt and now ChatGPT has become a text adventure.
You play by reading the text that the chatbot provides and by writing what your character thinks and does…
ChatGPT’s language model is very powerful; you can describe your actions in a simple way (“examine room”) or in a complex and elaborate way (“Being careful not to draw Helena’s attention, I take a look around the small room to see if I can find anything interesting.”).
Be proactive!

“… On the Human Shadow”:

“Horror Among the Ices”:

I’ve been having a ton of fun these days, and it’s kind of amazing how smooth the gameplay is, with GPT-3, but especially with GPT-4. The story unfolds in a really immersive and engaging way. Sure, there’s still stuff to iron out, I reckon, but as it is, it seems like a great way to pass the time to us.

As a fan of journaling games, I must say that the level of immersion I’ve experienced is far beyond what I anticipated. Over this past year, I’ve played several times with Chat GPT, completed a full game of “The Quiet Year” and had a couple of sessions with a little game called “Ech0”.

I would like to share some screenshots of my gameplay with you, but they are all in Italian and you wouldn’t understand so much.
Anyway, to give you some feedback… At the beginning, GPT was overstepping my Authority, narrating part of the story for me as well… but by refining the prompt we managed to create an excellent flow and almost completely eliminate the bugs and we’ve minimized the narrative inconsistencies.
Playing “The Thing,” I noticed how GPT could, with its descriptions, create an intriguing story with a certain degree of paranoia… but story has taken on a detective and exploratory vibe, and in the end, my team won. Because, yes the game has an end…
But what resonates with me the most is “…on the Human Shadow.” With a natural approach and proactive gameplay, I managed to play some really engaging and complex scenes…
I had the opportunity to converse with profound “NPCs” who offered me interesting choices that were far from trivial.

Ok, I don’t think what we’ve done is a big novelty… and there are still things that can be fixed in the prompt… but given how easy it is for everyone to develop their own setting using our prompt, I’m happy to be able to share this with you.

So… if you want to create a new text adventure with a theme of your choice,… It is very easy!
You’ll find the instructions at the link I’ve provided above… Let me know!

1 Appreciation

That’s very interesting! In my own attempts I didn’t get very far (but I also tend to be fairly uninterested in “solo” roleplaying and similar activities), but I was using GPT-3.

However, I know there is someone who has created a functional “AI GM” online (well, so they claim - I haven’t tried it) which leverages several different or separate AIs which curate each other’s input. I don’t know exactly how it works, but it sounds like a fruitful idea.

Let me see if I can find the link…

Ah! Here it is - if anyone is willing to try it, I’d love to hear about how successful it is. It claims to do proper “solve a mystery” gaming.

Well, nothing prevents you from sharing. The forum is de facto in English, but English is not mandated as the only language for discussion. Quoting from the posting guidelines:

In fact, there is no assumption that English has to be the language of your discussion

Practically, Italian speakers would pretty easily understand your screenshots and everybody else nowadays has a lot of tools at their hand for automatic translation.

1 Appreciation

Alright, here’s a bit of actual play for you.
I don’t want to ramble on too much because if you try playing, you going to have a different experience and it’s probably pointless to dwell on all the various adventures I’ve had and started sketching out these days.
A few days ago, my friend introduced me to a project to create a text-based adventure (Interactive Fiction) using Chat GPT. It was set in a fantasy world, kind of like D&D. Characters were making their way through a dungeon, stuff was happening… but it all felt flat and meaningless and we realized we had to try to develop some mechanics to make the battles interesting, at least.
But there was a lot of potential and as soon as we try another setting, taking inspiration from the movie “The Thing” things started getting more intriguing.

As for me, I’m not really into action in games… what I look for is immersion. I prefers games that prioritize storytelling and character development over action sequences. Consequently, I have chosen to focus on a game similar to “Monsterhearts” which is known for its emphasis on the narrative, relationships and emotional depth…

…and I discovered a whole new world when I fed a promising prompt to the Alpha version of GPT-4! Suddenly, the depth of the text messages took on a much greater dimension, with descriptions that were rich and full of detail.

As seen in the screenshot above, I utilized the special game command “i” which prompts GPT to list all the items that the protagonist is carrying, a throwback to the old IF games. Chat GPT often offers a smartphone or a diary, without it being specified by the initial prompt. These are useful resources to examine because they always open new avenues: an unknown person trying to contact you, a friend inviting you to a beach party… I also started to write messages in which I performed more than one action…
Here in the exemple my protagonist Alex says, “I don’t feel like studying, I look at the photo (an old photo gathering dust on the desk) and ‘i’.
And I was struck by the fact that GPT addresses Alex by saying, “It happens to everyone to feel overwhelmed by study, Alex…” It’s a simple thing, indeed, but something like this hadn’t happened before and for some strange reason, it immediately gave me a sense of immersion in the story.

I was excited, but it didn’t take long to realize that things were not going well…
GPT kept stepping on my toes by overlapping my authority and narrating actions and decisions that were up to me, the player.
Sometimes it was just a matter of flavor, but other times it became too intrusive.
For example, here I respond to Luca’s message… but GPT gets carried away by adding something like “you check yourself in the mirror to make sure everything is okay, then you pack your things in your backpack and go out”… but I hadn’t told to GPT I wanted go out!
Moreover, GPT addresses the player with its last sentence, “Sorry, I anticipated your action. Do you want to get ready to leave or is there something else you’d like to do before meeting Luca?”…
NO, that’s not right at all!

And it gets even worse when I invite Luca for a walk and while we’re talking, GPT abruptly ends the scene, having my character Alex walk away and return to his room…

2 GPT

At this point, I had decided to give up and focus on something else… It was too complicated to explain to GPT what ‘Authority’ and ‘Agency’ are… GPT-3 seemed to have a sense of who Ron Edwards is, but I had no idea how to direct it to use his concepts…
Yet, I explained the problem to my friend who dedicated himself to developing the Prompt, I don’t know in what way… probably with some simple sentence he managed to contain the situation. Anyway, with the next upgrade of the Prompt, the problem no longer presented itself.

And just like magic, what I was doing turned into a real game! Just as real as the various journaling games I’ve tried in recent times…

So… Another adventure… this time it’s a guy named Alex who contacts me, someone. I don’t know him well, but he sent me a message that showed he was worried and his desire to meet…
I set up a meeting at a venue, but when I arrive at the club, he’s not there yet (!!!) Well, this is a good opportunity for my character!
In a proactive manner, I introduce a new NPC… I head towards the stage and ask GPT if I see Dakota in the crowd… and there’s Dakota:
*"You dive into the river of sounds and lights, letting the music sweep you away with its unstoppable current. Each note is a wave crashing against the shore of your thoughts, each beat a call to let go. Your movements follow the rhythm, the dance becomes an ancestral rite that awakens every fiber of your being. *
*Dakota, with hair as black as ebony and a contagious smile that seems to shine even in the half-light, is not yet in sight. But it doesn’t matter, because for now, it’s enough to be carried away by the music, the movement, the energy that envelops you like a second skin. *
Your eyes scan the crowd as you move, searching for that familiar face, the accomplice to your darkest secrets. And then, in the shadow of a corner, you see her: Dakota, leaning casually against the wall, her eyes capturing the light like two precious gems. What do you want to do now?”

POW!

You might have already noticed… I’ve tried playing in various ways, both by giving brief commands of what I want to achieve like “ Take the smartphone… Talk to John…” and by playfully weaving more detailed sentences, which I think is the fun part. I always try to maintain a proactive style, adding fuel to the fire and introducing elements that I’m curious to see developed… I try to be coherent and logical with what’s presented to me and not look for ways to break the game… kind of like playing a normal solo session of a journaling game.

Anyway, another prompt update. Another adventure… here I met Elisa.

GPT 3

Some cool things happened despite my grammatical errors while writing my text…
I don’t know the girl… On her t-shirt is the name of some obscure band. Alright, let’s try to be smooth and improvise an approach.
“I try to read the band’s name on her t-shirt and as I get closer, trying not to seem the usual clumsy and awkward, I say ‘Cool… haven’t listened to them in a while… but they are… um, good!’”
The great thing is that Elisa is sharper than me. She tests me: “The girl raises an eyebrow, an amused smile touches her lips. ‘Really? They’re quite niche. Not everyone knows ‘The Midnight Howlers’. Which song of theirs do you like the most?”’
This is really awesome! I think it is a good bounce.

And another great thing is that I was lucky enough for GPT to mention the name of the band. It is not so obvious, GPT could have said something like [Band Name] as it did in previous versions of the prompt. But what’s also cool is that “The Midnight Howlers” actually exists, they play country. I checked them out on YouTube.
Something similar happened to me in “The Thing,” probably because of how the basic Prompt is written. GPT comes up with the names of characters that actually appear in the movie. It pulled up Dr. Cooper and Fuchs, the biologist… okay, you might say that’s not a big deal… but it’s all very neat and enjoyable while playing.

One last feature I’d like to mention is the Special Game Command “w,” which prompts GPT to describe a plot twist, an unexpected development that aligns with the story’s plot and backstory. This is a neat little function I’ve implemented because in some versions of the prompt, the game felt too static. But this feature turned out to be quite engaging, and we’ve kept it in subsequent versions. Give it a try if you get the chance to my game. It can lead to scenarios like bullies kicking lockers or a cloaked and hooded figure watching you from the crowd, yelling strange words.

3 Appreciations

How does the “w” command work?

(It reminds me a bit of my game “As the Worm Turns…”, which I should probably type up and post here sometime - it has a similar thing, although it has nothing to do with AI.)

The prompt says:

Special game command is “w” that makes you describe a plot twist, an unexpected development.

With the very first versions of our prompt there were times when we got stuck in situations with not many exciting ideas on how to go on.

So I think about Archipelago III and his Fate cards. These cards are for when you want or need some narrative random help or if you think the plot you’re following needs an unexpected twist.

It works quite well:

Immagine

Sometimes the plot twist is less drastic… here, a guy and Elena were taking a stroll, “w” and a sudden storm added a touch of romance to the story of a friend of mine:

While you’re enjoying a nice walk in the park with Elena and her dog Max, it starts drizzling lightly. Elena smiles at you and suggests finding shelter under a tree […] The sudden situation adds a touch of romance to this day…

2023_11_13_08_36_08_ChatGPT_come_Game_Engine_Intelligenza_Artificiale_YouTube

Now we’re trying to find a prompt that yields more consistent results… and we’re experimenting with another special command, a flashback. We’ll see if we come up with any interesting outcomes…

1 Appreciation

Very nice.

So did you write these commands into the Prompt you use to start the “game”? And then ChatGPT remembers them while you “play”?

Certainly!
Currently, GPT retains everything it is told and it says, storing it in what it calls tokens, which are variable-length units of text. It then analyzes these tokens, comparing them to the vast database at its disposal, in order to generate the most probable response based on a probabilistic model. GPT-3.5 has 8,000 of these tokens, while GPT-4 has 100,000.
This feature makes GPT extremely consistent in its interactions and writing.
It wasn’t the case in previous versions. I remember trying GPT-2 years ago, and it was like conversing with an incoherent drunk gonzo who couldn’t even recall what he sed in the previous sentence.

So, with the initial prompt, we feed GPT a set of rules, establish narrative boundaries, and provide the setting and background context for the story. It analyzes, memorizes and applies…
In “The Thing,” we’ve also set victory and defeat conditions and once they are met, the game is over.

If you enjoy journaling games, in its own way, GPT’s intriguing and enjoyable… you should give it a shot!

That’s very interesting! I would imagine it depends a lot on the Prompt itself. Would you share yours?

I’ve messed around a bit of ChatGPT, and it seems to mostly “remember” our conversation, but not consistently so (and sometimes needs to be reminded). But maybe that was some kind of user error for all I know!

You can download my prompt for free at the links above on Itch.io.

It also depends on when you did it… from the beginning of the year until a few months ago, it wasn’t that consistent.

1 Appreciation

After releasing the first version, our focus shifted to fine-tuning the crucial aspects of the prompt. The goal was to ensure a smooth gameplay experience with consistent adherence to essential elements. During this process, we noticed that the initial prompt structure wasn’t efficient, so we decided to give it a complete revamp.

In reshaping the prompt, we meticulously worked on each individual part. Running it through numerous tests, we made sure that the prompt’s behavior remained consistent and accurate, considering the nuances of a probability-driven model.

We streamlined the game turn structure as much as possible, putting a spotlight on the rules and rearranging some commands to lighten up the entire GAME CYCLE, thereby enhancing adherence to the game dynamics.

The real game-changer was actively involving GPT in crafting the story. We aimed for the chatbot to be less of a passive observer waiting for commands and more of an initiative-taker, throwing in new elements on its own. At the moment, it seems like GPT is handling this role correctly.

We conducted a variety of trials, all focused on version 3.5, the freebie that’s accessible to everyone.

We’re still testing things out, so any feedback or questions are welcome. By the way, because people asked for it, we went with a Fantasy setting inspired by that Arnold Schwarzenegger movie, ‘Conan the Barbarian,’ and the fantasy tales written by Robert E. Howard.
It’s got that epic vibe, you know?

1 Appreciation

It’s pretty remarkable that you’ve gone to such lengths to create something that works, and works consistently. Thanks for sharing this! In particular, I have a friend who is a total Howard fan, he might love this. Very cool.

1 Appreciation

Hey,
I wanted to show you this setting we’re working on and testing for a multiplayer game.

Basically, it allows you to control up to four playable characters, making it possible to simulate a multiplayer match.

This new mode brought about some significant changes to the prompt because, for some weird reason, we found it harder to engage with ChatGPT, and it seems less proactive.

So, we had to break down our prompt into three different prompts that need to be loaded before starting the game.

This way, with the first prompt, we’re asking ChatGPT to craft a story based on our plot. Using a second prompt, we instruct the chatbot to independently create a table with all the significant events we’ll encounter during our adventure.
Lastly, with the third prompt, we tell ChatGPT to act as a game master, guiding us through the adventure it described and the table it compiled.

Anyway, our deal is trying to see if we can role-play with ChatGPT. We’re trying to work around its limits. That’s also why we went with LOTR as the setting. ChatGPT knows the plot and characters of the story very well, and we think that’ll help it in generating fiction.

We’re still in the beta testing phase, but it looks promising and quite intriguing.

1 Appreciation

That is, indeed, quite fascinating!

At some point I will need to try this. Is it actually “multiplayer” in some way, or do you just have multiple characters on the go?

The game is multiplayer “on the go”, in the sense that you can control multiple characters at once. We also developed an interface for playing it in real multiplayer, but it’s a bit of a hacky and nerdy solution.

1 Appreciation