A multiplayer web-based game inspired by the classic "Scotland Yard" board game, featuring real-time chat functionality using Flask-SocketIO.
X-Hunter is a strategic multiplayer game where:
- Mr. X tries to evade capture while moving through the city
- Seekers work together to track and catch Mr. X
- Real-time chat allows for coordination and strategy discussion
- WebSocket technology provides instant updates and communication
- Docker and Docker Compose installed on your system
git clone <repository-url>
cd X-Hunter
docker-compose up -d- Open your browser and navigate to
http://localhost:1432 - You'll be automatically redirected to the Setup Page
- Create your administrator account:
- Choose a username (min. 3 characters)
- Set a secure password (min. 6 characters)
- Confirm your password
- Click "Admin-Account erstellen"
- After setup, you'll be redirected to the login page
- Login with your admin credentials
- Add additional users (optional) via the user management
- Start a new game and enjoy!
X-Hunter/
├── app.py # Main Flask application
├── requirements.txt # Python dependencies
├── Dockerfile # Docker container configuration
├── docker-compose.yml # Docker Compose setup
├── templates/ # HTML templates
│ ├── setup.html # First-time setup page
│ ├── login.html # User login
│ ├── start.html # Game lobby
│ ├── map.html # Main game interface
│ └── manage_users.html# User management
├── static/
│ └── style.css # Application styles
└── data/ # Persistent data (created automatically)
└── users.json # User database
# Install dependencies
pip install -r requirements.txt
# Run the application
python app.pyThe application will be available at http://localhost:1432
SECRET_KEY: Flask secret key (defaults to a development key)FLASK_ENV: Environment mode (development/production)
- Real-time movement tracking with WebSocket updates
- Chat system for player coordination
- Admin controls for game management
- User management with role-based permissions
- Persistent data storage in JSON format
- Start and stop games
- Manage user accounts
- Configure game settings (decoys, invisibility)
- Monitor active players
- Real-time position updates
- Team chat functionality
- Special abilities (invisibility, decoys)
- Game state synchronization
- x-hunter-app: Main application container
- Port: 1432 (host:container)
- Data persistence:
./datavolume mounted to/app/data - Health check: Automated container monitoring
./data:/app/data: Persistent storage for user data and game state
MRX_DISCONNECT_GRACE_PERIOD_SECONDS: Mr. X disconnect timeoutDEFAULT_DECOYS: Number of decoy locationsDEFAULT_INVISIBILITY_USES: Invisibility ability usesDEFAULT_INVISIBILITY_DURATION_SECONDS: Invisibility duration
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is open source and available under the MIT License.
Port already in use:
# Check what's using port 1432
netstat -tulpn | grep :1432
# Or use a different port in docker-compose.ymlContainer won't start:
# Check logs
docker-compose logs x-hunter-app
# Rebuild container
docker-compose build --no-cacheSetup page not appearing:
- Ensure the
data/directory is writable - Check browser console for JavaScript errors
- Verify no existing
users.jsonfile
Data persistence issues:
- Ensure the
./datadirectory exists on the host - Check Docker volume permissions
- Verify container has write access
- Check the application logs:
docker-compose logs -f - Review browser developer console for errors
- Ensure all dependencies are properly installed
# Pull latest changes
git pull
# Rebuild and restart
docker-compose build --no-cache
docker-compose up -d# Backup the data directory
cp -r data/ data_backup/# Stop containers
docker-compose down
# Remove data directory (WARNING: deletes all users)
rm -rf data/
# Restart with fresh setup
docker-compose up -dEnjoy the game! 🎮