PXL_20221218_182816201-2.jpg

Links

<aside> đź’ˇ Play the game: https://iguannalin.github.io/ai-loves-horror/about.html

</aside>

<aside> đź’ˇ Watch the Winter Show project livestream: https://youtu.be/34E2f-hg3ag?t=4057

</aside>

Photo dump

About

I’ve always loved the simplicity of text-based adventure games because it creates this space where all of the magic of story-telling can happen inside the player’s mind. Text-based adventure games are also known as interactive fiction, because it feels as if the player is writing the story alongside the author.

In traditional text-based games, the interactive fiction aspect is just an illusion because how much control the player has over the story is limited to choices preset by the author, and well thought-out beforehand.

When OpenAI announced the release of its API for public use, I thought it would be fun to use it to play around with an idea I had—what if AI generated a horror text-based adventure story where no-one knows how it will start or how it will end?

Implementation

Using the API, I send OpenAI’s GPT-3 the prompt: write a text-based horror adventure prompt, with 2-3 choices numbered.

And it sends me back the prompt with 2-3 lines of the story, and 2-3 choices that are numbered 1 to 3. I parse the text for the choices and allow players to select the choice, which is then added to the text and all sent back to GPT-3 for it to repeat the process.

For the show I decided on a nostalgic setting as an homage the text-based adventure game’s popularity in the 1990s, and a fun juxtaposition to contrast the old with the new.

Stories GPT-3 wrote

Here are some stories saved by real players on the day of the winter show.

Type 1, 2, or 3 on the keyboard to continue the story.

You are walking down a dark, abandoned street in the middle of the night. Suddenly, you hear a noise coming from a nearby alley. You turn to investigate and see a shadowy figure standing in the darkness.

1. Run away from the alley
2. Walk cautiously towards the figure and confront them
3. Call for help

 Call for help
You take out your phone and dial 911, but the line is dead. You turn to make a run for it, but the figure has already vanished. Suddenly, you feel a chill coming from the alley. You must make a choice. 

1. Enter the alley and investigate 
2. Run away as fast as you can 
3. Call for help again

 Call for help again
You take out your phone and try to call 911 again, but the line is still dead. You turn to make a run for it, but something is blocking your path. You look back and see a dark figure standing in the alley, staring straight at you. You must make a choice. 

1. Run away as fast as you can 
2. Fight the figure 
3. Call for help one more time

 Run away as fast as you can 
You take off in the opposite direction and don't look back. You hear something chasing you, but you don't stop running until you reach the safety of your home. You make it just in time and the figure is gone. You never find out what it was, but you still feel a chill whenever you pass by that alley.
Type 1, 2, or 3 on the keyboard to continue the story.

You find yourself alone in a dark, dreary forest. The only sound is the occasional tweet of a bird or the rustling of leaves in the wind. You can't remember how you got here, but you know you must find a way out.

1. Head east, towards the distant glow of a light in the distance.
2. Follow a narrow path to the south, which appears to be heading in the direction of a small clearing.
3. Try to find your way through the dense foliage to the north.

 Try to find your way through the dense foliage to the north.

As you make your way through the thick foliage, you notice the trees getting more and more twisted and gnarled. Suddenly, you hear a low rumbling sound coming from the ground beneath your feet. You freeze in fear and look around, but you see nothing. 

Suddenly, a loud roar echoes from the trees, and a large figure leaps out from the shadows. It's a huge, black bear! It stands between you and the safety of the path. What do you do?

1. Try to run past the bear and make it to the path.
2. Try to distract the bear by throwing something in another direction.
3. Stand your ground and confront the bear.

 Stand your ground and confront the bear.

You take a deep breath and steel your nerves. You stand tall and face the bear, meeting its gaze. The bear snarls and takes a step closer. You stay still, not wanting to provoke it any further. 

Suddenly, the bear stops and lets out a soft growl. It turns and slowly walks away, leaving you alone in the forest. You let out a sigh of relief and continue on your way. 

As you make your way through the trees, you come to a clearing. In the center of the clearing is a small cabin. You can't believe your luck! What do you do now?

1. Go inside the cabin and explore.
2. Look around outside the cabin for clues to your whereabouts.
3. Hide and wait until morning.

 Look around outside the cabin for clues to your whereabouts.

You cautiously walk around the cabin, examining the windows and doors for any clues. Suddenly, you hear a loud creaking noise coming from inside the cabin. You stop and listen, and the noise stops. You take a few steps back and peer in through a window.

Inside, you see a figure sitting in a chair. It's an old, grizzled man with a long, white beard. He appears to be muttering something to himself. You realize that he must be the owner of the cabin. Do you:

1. Knock on the door and introduce yourself.
2. Slip away quietly and continue exploring the forest.
3. Try to find another entrance to the cabin and sneak inside.

 Knock on the door and introduce yourself.

You take a deep breath and knock on the door. The old man looks up, his eyes wide with surprise. He motions for you to come in, and you cautiously enter the cabin. 

The old man introduces himself as Grandpa Joe, and he tells you that he's been living in the forest for many years. He offers to help you find your way out of the forest, but you must be careful. There are many strange and dangerous creatures lurking in the shadows. Do you:

1. Accept his help and follow him into the forest.
2. Refuse his help and continue exploring on your own.
3. Ask Grandpa Joe more questions about the forest.

 Accept his help and follow him into the forest.

You thank Grandpa Joe for his help and follow him out of the cabin. He leads you through the forest, pointing out various landmarks and telling stories of the creatures that live here. After what feels like hours, you finally make it to the edge of the forest. You can see the lights of a town in the distance. You thank Grandpa Joe again, and he bids you farewell.

You've made it out of the forest! What do you do now?

1. Make your way to the town and seek help.
2. Continue exploring the forest in search of answers.
3. Head back to the cabin and thank Grandpa Joe one last time.

 Make your way to the town and seek help.

You take one last look at the forest and head towards the town. You knock on the door of the first house you come to, and the door is opened by a friendly old woman. She invites you in and offers to help you find your way home.

You thank the old woman and she leads you to a nearby inn. You get a room and rest for the night. In the morning, you set off for home with a newfound sense of courage and determination. You made it out of the forest!
Use the 1, 2, or 3 keys on the keyboard to select a choice when they appear.

You wake up in a dark, musty room with no windows. You can't remember how you got here. You stumble around in the darkness, feeling the walls for a door. Suddenly, you hear a voice.

1. Follow the voice
2. Ignore the voice
3. Run in the opposite direction

 Follow the voice

You cautiously follow the voice, and soon you arrive at a door. You reach for the handle, and the door creaks open. You step inside, and the door slams shut behind you. You hear a cackling laughter that echoes throughout the room. You see a figure in the corner, shrouded in darkness.

1. Approach the figure
2. Run away
3. Try to find another way out of the room

 Try to find another way out of the room

You turn away from the figure and start to search for another way out of the room. As you search, you start to feel something brush against your arm. You turn around to see a giant spider scurrying away. You quickly back away, and you see a secret doorway in the wall.

1. Go through the secret doorway
2. Try to find another way out
3. Stay in the room and confront the figure

 Stay in the room and confront the figure

You take a deep breath and turn to confront the figure. You see a figure dressed in a long, black robe, its face hidden in the shadows. The figure speaks in a deep, raspy voice. "You should have left when you had the chance." You can feel the air around you grow cold and a chill run down your spine.

1. Ask the figure who they are
2. Run away
3. Stand your ground and demand answers

 Ask the figure who they are

You take a deep breath and ask the figure who they are. They step out of the shadows, revealing an old, wrinkled face. "I am the keeper of these halls," they say. "You should not have come here. Now, you must face the consequences." The figure raises their hands, and a ghostly wind starts to swirl around you.

1. Fight the figure
2. Try to run away
3. Apologize and beg for mercy

 Apologize and beg for mercy

You apologize and beg for mercy. The figure stops and looks at you with a stern expression. "Very well," they say. "I will spare you this time. But if you ever return, you will not be so lucky." With that, the figure disappears into the shadows and the door swings open. You quickly rush out of the room and make your way back home.
Use the 1, 2, or 3 keys on the keyboard to select a choice when they appear.

You are walking through a dark and foggy forest, on your way to visit an old friend. Suddenly, you hear a loud crash and a deep growl coming from ahead of you. 

1. Investigate the noise and find out what it was
2. Turn back and find another way to your friend’s house
3. Keep walking and ignore the noise

 Keep walking and ignore the noise

You decide to ignore the noise and keep walking. As you walk, you start to feel a presence behind you, as if someone is watching you. You start to run, but the feeling doesn't go away. Suddenly, you stumble and fall, and you hear a loud roar. You look up to see a giant creature standing over you. 

1. Try to fight the creature
2. Run away
3. Freeze and hope it doesn't notice you

 Run away

You turn and run as fast as you can, the creature is close behind you. You can hear it's loud, angry roar as it chases you. You eventually make it out of the forest and find yourself in a large open field. You keep running, and you eventually find a cave. 

1. Enter the cave
2. Keep running
3. Hide in the tall grass until the creature passes by

Enter the cave

You enter the cave and find that it's surprisingly warm and cozy inside. You curl up in a corner and wait for the creature to pass. After a few hours, you hear the creature's roar gradually get quieter and quieter until it disappears altogether. You stay in the cave until morning, and then you finally make it to your friend's house.

 Keep running

You keep running until you eventually make it to a small village. You ask the villagers if they have seen the creature, and they tell you it is a mythical beast known as the "Black Beast". They tell you that you must find a way to defeat the beast in order to be safe. You find an old man who tells you that you must find a magical sword that can defeat the beast. You set out to find the sword and eventually make it to your friend's house.

Takeaways