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.
- 🤖 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.
- Node.js (v18+)
- A Google Gemini API Key
-
Clone the repository:
git clone https://github.com/your-username/DungeonMasterAI.git cd DungeonMasterAI -
Configure the Server:
cd server npm installCreate a
.envfile in theserverfolder and add:GEMINI_API_KEY=your_api_key_here POLLINATIONS_API_KEY=your_api_key_here PORT=3001
-
Configure the Client:
cd ../client npm install
Start the server and client simultaneously:
Server:
cd server
node server.jsClient:
cd client
npm run devThe game will be accessible at http://localhost:3000.
For high-quality local text-to-speech, you can run the Kokoro TTS server:
-
Navigate to the audio directory:
cd server/public/audio -
Install Python dependencies:
pip install -r requirements.txt
-
Run the TTS server:
python server.py
Note: The server runs on port 5000 and provides voice generation for Italian, English, Spanish, and French.
- Frontend: Next.js 14, Tailwind CSS, Lucide React
- Backend: Node.js, Express, Socket.io
- AI: Google Gemini API (Text), Pollinations.ai (Images)
We welcome contributions! Please check CONTRIBUTING.md for more details on how to get started.
This project is licensed under the MIT License. See the LICENSE file for details.
Created with ❤️ for D&D and AI enthusiasts.
