Skip to content

bupticybee/AiDungeonChatGPT

Repository files navigation

Ai Dungeon Game(based on ChatGPT)

Open In Colab Python3.9

Intruduction

Ai dungeon like game, directly uses openai's ChatGPT api as a storytelling model.

I feel that chat gpt's ability to tell stories has directly approached the ai dungeon itself. The advancement of technology is terrifying.

Install && Use

Download this project, and then:

pip3 install -r requirements.txt

to install requirements.

And run the following script

python3 example_story.py

to get it running in cmd.

You can also run it in gui:

python3 app.py

This would start the game in a simple GUI,please make sure you have a python version >= 3.9。

Example Story

In one of the stories I played, I got lost in a cave, and then returned to the village wittily with a scroll.

You are adventuring in the woods, maybe some strange things will pop out from somewhere, you hold the pistol tightly in your hand, hoping that this adventure will find some valuable things, you go deep into the woods.
> You wear camouflage clothes so that it is difficult for the enemy to find yourself
After you take a few steps, you feel something following you behind you. You turn around and see that it is a huge bear. You immediately draw your pistol and prepare to shoot it. But you find that the bear doesn't seem to want to attack you, but seems to be looking for something. You observe it for a while and find that its sight is always fall in a certain direction. You decide to look in that direction and see what exactly it's looking for.
> You watch carefully what the bear is looking for
You followed it for a few minutes, and finally found that it was looking for a densely packed hole. You observe for a while and notice that the opening of the hole seems to be very deep, with many stones and roots in it. You want to go in and have a look, but you are afraid that there may be some dangerous animals inside. You decide to get your pistol ready before going in. You slowly approach the hole, ready to go in.
> You walk into this hole today
You walk slowly into the hole, pistol ready to fire. You carefully observe your surroundings as you walk. You find the cave very dark with little light. You try to illuminate the front with the flashlight in your hand, but the light of the flashlight can hardly see the situation ahead. You start to feel a little worried that you will get lost in this hole. You decide to keep going and see what surprises await.
> You go deeper into the hole while you disguise yourself
You continue walking in the original direction, carefully avoiding the obstacles ahead. You find the cave very quiet, with hardly any sound. You start to worry a little, afraid that you will encounter some dangerous animals. But you're also curious, wondering what's really inside the hole. You decide to take the risk and keep going to see what you find.
> You take the initiative to make some noise and see if there are any signs of animals around
You carefully hold your pistol out front, ready to fire. You carefully observe your surroundings and find nothing suspicious. You start to relax a little bit, thinking that maybe you're not in any danger. But you're also curious to know what's inside the hole. You decide to keep going and see what you find.
> You light the surroundings to see if there are any traces of humans or animals, if not, then it's time to turn back and walk out of the cave You continue walking, the flashlight in your hand illuminates the surrounding environment. You carefully observed the surroundings, but found no traces of humans or animals. You start to worry a little, thinking that you might be going in the wrong direction. You want to turn back and walk out of the cave, but worry that you will get lost. You decide to keep going and see what you find.
> You keep going
You keep walking, the flashlight in your hand illuminating your surroundings. You find yourself walking a long way, but haven't seen the exit yet. You start to worry a little, thinking that you might really be lost. You decide to stop and think hard about what to do. You pull out your phone to see where you are, but it's out of battery and unusable. You feel a little hopeless and don't know what to do.
> You shout for help
You cry out for help, desperately, hoping someone will hear you and get you out. You yell for several minutes, but no one responds. You start to worry that you might actually be trapped in this hole. If you think about leaving after dark, it may be easier to find the exit. You just sit there and wait for dark.
> You follow the flow, the upstream of the flow is the mouth of the cave
You come up with an idea and decide to go upstream along the water flow, because the upstream of the water flow should be the entrance of the cave. You walk slowly, the flashlight in your hand illuminating the road ahead. You find that the water becomes shallower and shallower, and finally almost dries up. You worry that you are going in the wrong direction and may go further. You decide to stop and think hard about what to do.
> You think you are going to starve to death
You sit on the ground feeling helpless and hopeless. Do you think that you will really starve to death in this hole? You think of your family and friends, and they must be worried about you. You feel very lucky to be able to spend time with them. You decide to keep trying, trying to find a way out. You take out the pistol in your hand and prepare for the next challenge.
> It suddenly occurred to you that there is a return rune in your pocket, which can be directly sent back to the village
You suddenly remembered that you had a City Return Rune in your pocket. This rune allows you to teleport back directly to the village without having to walk back. You take out this rune and prepare to use it. You feel very lucky that you finally have a way out. Crush the rune in your palm, ready to send it back to the village. You feel relieved and grateful, grateful for the opportunity for this adventure.
> You teleport back to the village
You successfully used the recall rune and were teleported back to the village. You feel relieved and grateful, grateful for the opportunity for this adventure. You are finally back in a safe place to be with family and friends. You decide to keep a diary of the experience as a memento. You feel very happy and feel stronger. You decide to continue your adventure and find more unknown worlds.

About

AI-Dungeon like Game, directly uses openai's ChatGPT api as a storytelling model.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published