Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kernelshreyak/ai-rpg-text
AI Generated text adventure RPG with fully configurable mechanics
https://github.com/kernelshreyak/ai-rpg-text
dungeons-and-dragons langchain langchain-python rpg rpg-game text-adventure-game
Last synced: 25 days ago
JSON representation
AI Generated text adventure RPG with fully configurable mechanics
- Host: GitHub
- URL: https://github.com/kernelshreyak/ai-rpg-text
- Owner: kernelshreyak
- Created: 2024-07-31T08:43:24.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-08-17T11:38:11.000Z (5 months ago)
- Last Synced: 2024-08-17T12:46:48.269Z (5 months ago)
- Topics: dungeons-and-dragons, langchain, langchain-python, rpg, rpg-game, text-adventure-game
- Language: Python
- Homepage:
- Size: 114 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AI RPG Text Adventure
This project is a text-based RPG adventure game driven by an AI Dungeon Master (DM). The DM generates a solo RPG adventure inspired from Dungeons & Dragons (DnD) rules, but with simplified mechanics. The player interacts with the game by typing commands, and the AI responds by advancing the story.
## Features
- AI-driven Dungeon Master to generate and control the game world. Uses the latest gpt-4o-mini for fast response
- Conversational Memory support to maintain conversation context throughout the game session.
- Simplified DnD mechanics for ease of play.
- Easy to use Web UI created using Streamlit
- Modify initial inventory, starting scenarios etc using prompts
- Configureable prompt templates to modify pre-defined game mechanics using text
- Save to and load game session using JSON## Planned features
- Better object-oriented control of game mechanics
- Support for other LLMs## Installation
1. **Clone the repository:**
```bash
git clone https://github.com/yourusername/ai-rpg-text-adventure.git
cd ai-rpg-text-adventure2. **Create a virtual environment:**
```bash
python -m venv .venv
source .venv/bin/activate
```
3. **Install the dependencies:**
```bash
pip install -r requirements.txt
```
4. **Set up environment variables (for OpenAI or Google Gemini models):**
```bash
export OPENAI_API_KEY=""
export GOOGLE_API_KEY=""
```
## Usage
Run the game by executing the main script via streamlit:```bash
streamlit run ai-rpg-text.py
```![screenshot](./screenshot.png)