/GameMasterAI

An open-source AI Dungeon Master system

Primary LanguageVueMIT LicenseMIT

GameMaster.AI

GameMaster.AI is a web-based application designed to deliver a single-player tabletop role-playing game (TTRPG) experience, guided by an AI Dungeon Master. Utilizing cutting-edge AI language models such as GPT-3.5-turbo and GPT-4, this platform offers a seamless integration of an AI Dungeon Master with an AI notetaker to craft an immersive narrative for games like Dungeons & Dragons.

The project originated from Cole Porter (Deck of DM Things on YouTube) and was supported by a dedicated Patreon community. When the project grew beyond the scope manageable by Cole, the decision was made to open-source GameMaster.AI and discontinue the Patreon.

Table of Contents

Prerequisites

Required software and libraries are listed in the project’s package.json file found in the root directory.

Setting up External Dependencies

.env File

For proper functioning of the application, you must set up the following environment variables:

MongoDB Atlas

  • Purpose: Storing game save data and user accounts.
  • Setup:
    1. Sign up or log in to MongoDB Atlas.
    2. Create a new cluster and follow the setup guide.
    3. Retrieve your connection string by navigating to the 'Connect' section of your cluster.
    4. In your .env file, add MONGODB_URI=your_connection_string.

OpenAI API

  • Purpose: Interacting with AI models for generating and managing game content.
  • Setup:
    1. Sign up for an account at OpenAI.
    2. Generate an API key in the API section.
    3. In your .env file, add OPENAI_API_KEY=your_api_key.

SESSION_SECRET and JWT_SECRET

These are cryptographic keys used for securing sessions and token-based authentication respectively. Despite local deployment, it's crucial to use unique and random strings to prevent potential security breaches.

Installation

  1. Ensure that you have npm installed on your machine. If not, download and install npm.
  2. In the project's root directory, execute npm install to install dependencies.

Usage

To start GameMasterAI:

  1. Open a terminal and navigate to the project's root directory.
  2. Run npm start to launch both frontend and backend servers.
  3. Open your web browser and enter the local URL provided by the output in the terminal.

You will be greeted with a user interface displaying the GameMasterAI logo and options to start a new game or load an existing one. First time users should follow the new game route to setup and then play.

Contributing

Your contributions are welcome! Whether it's bug reporting, code improvement, feature proposal, or project maintenance, your help is invaluable.

Development Process

We embrace Github Flow. All changes are made through pull requests.

Making Contributions

To contribute, follow these steps:

  1. Fork the repository and create your branch from main.
  2. Write clear, commented, and testable code.
  3. Update documentation to reflect any changes.
  4. Ensure your code adheres to the coding style guide.
  5. Submit a pull request with a comprehensive description of changes.

License

Contributions are licensed under the MIT License. Ensure you understand the license implications before contributing.

Reporting Bugs

Report bugs and issues on the Discrord: https://discord.gg/GdsmyUX69N

Effective bug reports should include:

  • A summary and background
  • Reproduction steps with specific examples
  • The expected outcome
  • What actually occurred
  • Additional notes or hypotheses

Coding Style

  • Use 4 spaces for indentation.
  • Run npm run lint before committing to ensure consistent code style.

License

This project is made available under the MIT License.

Credits

Special thanks to our Patreon supporters who helped kickstart this project. (Full list of supporters at the document's end)

Parts of this project were developed with assistance from GPT-4 by OpenAI.

Contact

Email: deckofdmthings@gmail.com

Original Patreon Supporters

Original Patreon supporters: lalilunanu Jonny Martinez Michelle Hedden Aaron Aldaco MadWhim Lerust Rodrigo Raya WhiteBulL Viktor Grén Matthew W Rodgers Jim Harten Mephisto Strange Foundry Fabrications Julius Lahdenoja Humble Arrogance Greg Germano Ethan Babauta Panzrom Chad Bastian Benjamin Catt Julienlemab Roblox Aviox Snowdric bill mother LetterQ Matthew Akin czechpls Monsi7 Jay Kudo Shift_ yuri 2 Randy Prather Midnight Black Wolf AWS Mahn Jones Jonatan K Jason Findley Chase Jason Keegan Dragonistic DarnChaCha Gab Ash Syquan Perrett Jakub Čech Jake Austin Caudill Vincent Chalnot Lasse ArcaneOverride Jason Apgar Dave Hunt Eli Blake Timothy Castillo saphix gaming Geoffrey Ashe Gecepe Tango Mango Allen Hueffmeier Dizzel BrotherHanan Julien Kovacs theeddy 329 Beefy Beef Tucker Radgens Scientist Tomzi White Cloud Bgjjj Gggh Matt Lewis Chris Turnbull Sven Nicholas Shappell Zac Evelien JohnJ Stig DominoTwo Addie Rickard Nilsson Grekqo Presten Stewart Mason J. Michael King Marius Rognstad David Williams DeFour Brandon Mabry Levi Carpman FletcherCutting Remi Løvik Vlad Dumitru Astyria Brandon Laszynskyj Mark Shuttleworth KLM Ironspider 1 James Lyons Jonathan LANIER Andrew Hamilton Edy Josh Phillips Maks Andrew Wagner Jeremy Seaton Garrett Dan Smith Joshua McVay Lars Hoffmann Gael Lendoiro Pedro_26 mikel sleep Robert Davidsson Julien Gaillard Rubychoco Avery Goodname J N Revolve02 Samuel Hargraves Knism