A modern MUD engine - headless game engine for real-time, text-based multiplayer worlds
Project description
Daemons Engine
A Python framework for building text-based multiplayer RPGs with real-time WebSocket communication.
Pre-Release Beta API subject to change. Not recommended for production use. Latest Roadmap Release: Phase 16 - Cybersecurity upgrades, including input validation and production mode
Quickstart
Prerequisites
- Python 3.11 or higher
- pip (Python package manager)
Step 1: Create Project Directory
mkdir my-game
cd my-game
Step 2: Create Virtual Environment
# Windows
python -m venv .venv
.\.venv\Scripts\Activate
# macOS/Linux
python3 -m venv .venv
source .venv/bin/activate
Step 3: Install Daemons Engine
pip install daemons-engine
Step 4: Initialize Your Game
daemons init <new_game>
This creates:
world_data/YAML content (rooms, NPCs, items)config.pyServer configurationmain.pyApplication entry pointalembic.iniDatabase migration configalembic/Migration scripts
Step 5: Set Up Database
cd <new_game>
daemons db upgrade
Step 6: Run the Server
From /<new_game>...
# Development (auto-reload on code changes)
daemons run --reload
# Production (requires JWT secret key)
daemons run --production
The --production flag enables security hardening:
- Requires
JWT_SECRET_KEYenvironment variable - Enforces JWT issuer/audience validation
- Runs without auto-reload
If JWT_SECRET_KEY is not set, you'll be prompted to generate one.
You should see:
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO: Application startup complete.
Step 7: Connect a Client
Option A: Reference Client
pip install flet
daemons client
Option B: Build Your Own
Connect via WebSocket to ws://127.0.0.1:8000/ws/game/auth.
Test Credentials:
- Username:
testplayer1/ Password:testpass1 - Username:
testplayer2/ Password:testpass2
Create Game Content
All content is defined in YAML files under world_data/.
Example Room (world_data/rooms/tavern.yaml)
id: tavern_main
name: "The Rusty Tankard"
description: |
A cozy tavern with a crackling fireplace.
room_type: indoor
area_id: starter_town
exits:
north: town_square
Example NPC (world_data/npcs/barkeeper.yaml)
id: npc_barkeeper
name: "Greta the Barkeeper"
description: "A stout woman with a warm smile."
level: 5
behaviors:
- merchant
spawn_room: tavern_main
Project Structure
my-game/
world_data/ # Your game content
rooms/ # Room definitions
items/ # Items and equipment
npcs/ # NPC templates
quests/ # Quest definitions
dialogues/ # NPC dialogue trees
alembic/ # Database migrations
config.py # Server configuration
main.py # Application entry point
dungeon.db # SQLite database
Quick Reference
| Task | Command |
|---|---|
| Initialize project | daemons init |
| Run migrations | daemons db upgrade |
| Start server (dev) | daemons run --reload |
| Start server (prod) | daemons run --production |
| Run client | daemons client |
| URL | Description |
|---|---|
| http://127.0.0.1:8000/docs | Swagger API docs |
| http://127.0.0.1:8000/redoc | ReDoc API docs |
Documentation
Coming soon
License
MIT License see LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file daemons_engine-0.1.17.tar.gz.
File metadata
- Download URL: daemons_engine-0.1.17.tar.gz
- Upload date:
- Size: 624.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
72e0521e9475847ca4558401ea31349940c589bc63b16123e7493bbbbf23a320
|
|
| MD5 |
ac8434d32ce03d05bf5ca274d23da7e6
|
|
| BLAKE2b-256 |
2fa7650c0d4e2601b7176818d26b40ebbfe5044550337777c1d7e833ee82c19e
|
File details
Details for the file daemons_engine-0.1.17-py3-none-any.whl.
File metadata
- Download URL: daemons_engine-0.1.17-py3-none-any.whl
- Upload date:
- Size: 705.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e086f10172c95edf2f5a07f5e5cead92467c86ddd5474fd5466468f912014d06
|
|
| MD5 |
3d752c4abd90ffd4295fc64605d6ae7a
|
|
| BLAKE2b-256 |
c05392f4af30ba85e09b8f6a6312706437f57b83a698372ab7e7a48493ddbc1c
|