Skip to content

Escape from the Forest is an AI-powered text adventure game inspired by a Rick and Morty skit, featuring an old-school terminal appearance and dynamic gameplay.

License

Notifications You must be signed in to change notification settings

ben-tiki/escape-from-the-forest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Escape from the Forest Text Adventure Game

This text-based adventure game is inspired by a short skit from the Rick and Morty show, and uses OpenAI's GPT-4 to handle the game flow and game states. The game has the look and appearance of an old-school computer terminal, and the objective is to escape a dangerous forest filled with creatures such as vampires, hunters, and creatures.

2023-04-03.00-21-01.mp4

Features

  • AI-powered game flow and game states using OpenAI GPT-4 and GPT-3-turbo
  • Old-school computer terminal appearance
  • Text-based adventure inspired by Rick and Morty

Technology Stack

This text adventure game is built using the following technologies:

  • Flask: A lightweight Python web framework used to create the backend server and handle HTTP requests and responses. Visit the Flask website
  • Plain CSS: Used for styling the game's user interface, including the terminal appearance and text formatting.
  • JavaScript: Used for handling user input, terminal interactions, and making asynchronous requests to the Flask server.
  • OpenAI GPT-4 and GPT-3-turbo: AI models used to handle the game flow and game states, providing dynamic and engaging gameplay.

Installation

Make sure to have Python installed on your machine. You can download Python from here.

To run the game locally, follow these steps:

  1. Clone the repository:
git clone https://github.com/ben-tiki/escape-from-the-forest.git
  1. Change to the project directory:
cd escape-from-the-forest
  1. Create a virtual environment:
python -m venv venv
source venv/bin/activate (Linux/macOS)
venv\Scripts\activate (Windows)
  1. Install the required dependencies:
pip install -r requirements.txt
  1. Crate a .env file in the root directory and add your OpenAI API key:
OPENAI_API_KEY=your_openai_api_key
  1. Run the game:
python app.py
  1. Open your web browser and navigate to http://127.0.0.1:5000/ to start playing the game.

How to Play

  • Type help for a list of available commands.
  • Type start to dive into the game.
  • Enter your command and press enter to execute the command.
  • Be cautious and make wise decisions to escape the forest.
  • If you are having performance issues, you can change the GAME_MODEL from gpt-4 to gpt-3-turbo in the config.py file.

Contributing

Feel free to contribute to this project by submitting issues, pull requests, or providing feedback on the game experience.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

Escape from the Forest is an AI-powered text adventure game inspired by a Rick and Morty skit, featuring an old-school terminal appearance and dynamic gameplay.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published