A modern, web-based multiplayer text adventure (MUD) built with Python and WebSockets. Explore a persistent fantasy world, battle creatures, complete quests, and interact with other players in real-time.
- ๐ Web-Based: Play directly in your browser - no installation required
- ๐ฅ Multiplayer: Real-time interaction with other players
- โ๏ธ Combat System: Turn-based combat with maneuvers and special abilities
- ๐ฆ Inventory System: Collect, use, and manage items
- ๐บ๏ธ Exploration: Navigate through interconnected rooms and areas
- ๐ฌ Real-time Chat: Communicate with players in the same room
- ๐ Character Progression: Deep leveling system with skills, attributes, and tiers
- ๐ญ Character Creation: Choose race, planet, starsign, and starting abilities
- ๐ช Shop System: Buy, sell, and repair items with NPCs
- โฐ Time System: Dynamic world time affecting NPCs and shops
- ๐ฅ Firebase Integration: Secure authentication and cloud data storage
- ๐ Community Contributions: Easy-to-contribute JSON-based content system
- Python 3.8 or higher
- Firebase project (for authentication and data storage)
firebase-service-account.jsonfile (see Firebase Setup)
-
Clone the repository:
git clone https://github.com/yourusername/tyrantofthedarkskies.git cd tyrantofthedarkskies -
Create virtual environment:
python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Set up Firebase:
- Follow the Firebase Setup Guide
- Place your
firebase-service-account.jsonin the project root - Set environment variable:
export FIREBASE_WEB_API_KEY=your_key_here
-
Start the server:
python3 mud_server.py
-
Connect:
- Open
web_client.htmlin your browser - Enter WebSocket URL:
ws://localhost:5557 - Click "Connect" and start playing!
- Open
For detailed setup instructions, see QUICK_START.md.
- Choose Your Race: Affects starting attributes and cultural traits
- Choose Your Planet: Grants cosmic bonuses and a starting maneuver
- Choose Your Starsign: Provides fate-based abilities
- Select Starting Maneuvers: Pick from race, planet, and one additional maneuver
- Begin Your Adventure: Start in New Cove and explore the world!
lookorl- Look around the current roommove <direction>orgo <direction>- Move north/south/east/weststats- View your character sheetskills- View all your skillsinventoryori- Check your inventoryattack <target>- Attack a hostile creaturetalk <npc> <keyword>- Talk to NPCshelp- Show all available commands
See the in-game help command for a complete list.
tyrantofthedarkskies/
โโโ mud_server.py # Main server file (5,108 lines - see STRUCTURE.md for refactoring plan)
โโโ player.py # Player class
โโโ combat_system.py # Combat mechanics
โโโ time_system.py # World time system
โโโ character_creation.py # Character creation flow
โโโ quest_system.py # Quest management
โโโ web_client.html # Web-based client
โ
โโโ utils/ # Utility modules
โ โโโ formatter.py # Text formatting utilities
โ โโโ logger.py # Security logging
โ
โโโ firebase/ # Firebase integration
โ โโโ auth.py # Authentication
โ โโโ data_layer.py # Data persistence
โ โโโ client.py # Firebase client
โ
โโโ contributions/ # Community-contributed content
โ โโโ rooms/ # Room definitions
โ โโโ npcs/ # NPC definitions
โ โโโ items/ # Item definitions (weapons/armor/objects)
โ โโโ races/ # Race definitions
โ โโโ planets/ # Planet definitions
โ โโโ starsigns/ # Starsign definitions
โ โโโ maneuvers/ # Maneuver definitions
โ โโโ weapons/ # Weapon templates
โ โโโ weapon_modifiers/ # Weapon modifiers
โ
โโโ docs/ # Game design documentation
โโโ scripts/ # Utility scripts (migration, data splitting)
โโโ mud_data/ # Runtime data (gitignored)
Note: See STRUCTURE.md for detailed analysis and refactoring recommendations.
MUD_WEBSOCKET_PORT- WebSocket server port (default: 5557)MUD_BIND_ADDRESS- Bind address (default: localhost, use 0.0.0.0 for public)FIREBASE_WEB_API_KEY- Firebase Web API key (required)
- Create a Firebase project at Firebase Console
- Enable Authentication (Email/Password)
- Create a service account and download
firebase-service-account.json - Get your Web API Key from Project Settings
- See FIREBASE_AUTH_SETUP.md for detailed instructions
- Fly.io (Recommended): Free tier with WebSocket support
- Render: Free tier (spins down after inactivity)
- Railway: Free tier with $5 credit/month
See FREE_DEPLOYMENT.md for zero-cost deployment options.
- Railway: $5/month for always-on
- Render: $7/month for always-on
- VPS: $5-12/month (DigitalOcean, Linode, etc.)
See DEPLOYMENT_GUIDE.md for detailed deployment instructions.
We welcome contributions! The game uses a JSON-based contribution system:
- Add Content: Create JSON files in
contributions/subdirectories - Follow Format: See README.md files in each contribution folder
- Submit PR: Open a pull request with your additions
- Auto-Sync: Contributions are automatically synced to Firebase when merged! ๐
- Rooms: Add new areas to explore
- NPCs: Create new characters and creatures
- Items: Design weapons, armor, and objects
- Maneuvers: Add new combat abilities
- Races/Planets/Starsigns: Expand character options
See CONTRIBUTING.md for detailed guidelines.
- Quick Start Guide - Get up and running quickly
- WebSocket Setup - Web client configuration
- Firebase Setup - Authentication setup
- Deployment Guide - Deploy to production
- Free Deployment - Zero-cost hosting options
- Contributions Sync - Automatic Firebase sync setup
- Game Design Docs - Core game mechanics and systems
# Run server in development mode
python3 mud_server.py- Game logic:
mud_server.py - Player class:
player.py - Combat system:
combat_system.py - Time system:
time_system.py - Quest system:
quest_system.py
Use the built-in room editor:
python3 room_editor.py interactiveOr use in-game admin commands (if you're an admin).
This project is open source. See LICENSE file for details.
- Built with Python and WebSockets
- Uses Firebase for authentication and data storage
- Inspired by classic MUDs and text adventures
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Mobile-responsive web client
- More quests and storylines
- Additional races and planets
- Guild system
- Trading system
- Player housing
Ready to play? Follow the Quick Start Guide and begin your adventure!