AnttiVainikka / TextAdventure

0 stars 0 forks source link

TextAdventure

LLM-based text adventure game / tech demo.

Installation

You'll need Python 3.11 and Poetry for development.

To install dependencies, run:

poetry install
poetry config virtualenvs.in-project true # For editor support

Then, create .env file from .env.sample that is committed to Git. Fill your API keys to the .env file. NEVER commit the API keys to Git!

Then, to use the created venv from shell, run:

poetry shell

Running

Run the scripts from root directory of this repository. Although Python imports don't care about your working directory, other files are also accessed using relative paths.

$ pwd
/home/you/TextAdventure
$ python src/main.py

Example imagery

Since the application can't be run wihtout an active OpenAI key, we'll provide some image examples of the application. \ The title screen: Title screen A scenario description: Scenario description Choosing a faction to interact with: Faction choices Text generated while adventuring: Example exploring text A combat encounter: Example combat encounter An enemy: Example enemy A protagonist: Example protag Protagonist's inventory: Example inventory