Skip to content

Latest commit

 

History

History
104 lines (74 loc) · 2.69 KB

File metadata and controls

104 lines (74 loc) · 2.69 KB

🎲 DungeonMasterAI: AI-Powered Multiplayer RPG

Project Banner

Welcome to DungeonMasterAI, a multiplayer role-playing adventure powered by Artificial Intelligence! 🌟

This project combines the magic of classic tabletop RPGs with the power of advanced large language models (Google Gemini) and AI image generation to create a unique and dynamic narrative experience.

✨ Key Features

  • 🤖 AI Dungeon Master: A narrator powered by Google Gemini that adapts the story in real-time based on your choices.
  • 👥 Real-time Multiplayer: Play with your friends seamlessly using Socket.io.
  • 🎨 Avatar Generation: Create your character and see them come to life instantly with AI-generated portraits.
  • ⚔️ Dynamic Game System: Automated dice rolls, stat management, and combat resolution.
  • 🎭 Immersive Storytelling: Rich, contextual narrations based on D&D lore.

🚀 Quick Start

🛠️ Prerequisites

📥 Installation

  1. Clone the repository:

    git clone https://github.com/your-username/DungeonMasterAI.git
    cd DungeonMasterAI
  2. Configure the Server:

    cd server
    npm install

    Create a .env file in the server folder and add:

    GEMINI_API_KEY=your_api_key_here
    POLLINATIONS_API_KEY=your_api_key_here
    PORT=3001
  3. Configure the Client:

    cd ../client
    npm install

🏃 Running the Project

Start the server and client simultaneously:

Server:

cd server
node server.js

Client:

cd client
npm run dev

The game will be accessible at http://localhost:3000.

🔊 Optional: Local TTS with Kokoro

For high-quality local text-to-speech, you can run the Kokoro TTS server:

  1. Navigate to the audio directory:

    cd server/public/audio
  2. Install Python dependencies:

    pip install -r requirements.txt
  3. Run the TTS server:

    python server.py

    Note: The server runs on port 5000 and provides voice generation for Italian, English, Spanish, and French.

🛠️ Tech Stack

  • Frontend: Next.js 14, Tailwind CSS, Lucide React
  • Backend: Node.js, Express, Socket.io
  • AI: Google Gemini API (Text), Pollinations.ai (Images)

🤝 Contributing

We welcome contributions! Please check CONTRIBUTING.md for more details on how to get started.

📄 License

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


Created with ❤️ for D&D and AI enthusiasts.