Moondog MMO Server
Moondog is a small medieval MMO: a server stack and a first-person Godot client. It combines:
- a Godot 4.7 headless game server using ENet/UDP, authoritative for movement and everything else
- a Godot client with prediction and reconciliation
- an ASP.NET Core player portal and admin panel
- a PostgreSQL database that holds accounts, characters and the whole world
What you can do today
As a player
- Register on the portal, create characters, and follow the First bow guide from empty hands to a bow and arrows
- Walk, sprint, jump and ride a shared, terrain-covered world with a day and night cycle, and chat with other players
- Gather wood, stone, clay, flax and more, training skills and material lore as you go (Gathering and Skills)
- Refine and craft at stations, with tools, failure, and quality carried through a chain of steps (Refining and Crafting)
- Trade with NPCs whose prices and offers depend on your standing with each one, and take quests from them (NPCs and the Economy)
- Hunt wolves, rabbits, geese, horses, slimes and birds with fists, swords and bows; die, drop your pack and come back for it (Combat, Pets and Riding, Creatures and Birds)
- Tame pets, feed and treat them, dress them in gear, ride a horse, and haul a cart behind it
- Trade with other players, use the auction house, and form parties and guilds; own a housing plot; take part in world events
As a GM or admin
- Place nodes, stations, NPCs and spawners in the world from the in-game GM
panel, and teleport with
@tele(GM Tools) - Edit items, recipes, skills, creatures, spawners, quests and NPC conversations in the admin panel, with changes reaching the running game
- Administer bans, kicks, broadcasts and server state, and read audit logs
As a developer
- Measure movement with probes and telemetry captures (Diagnostics)
- Soak-test with a bot that plays for hours, and load-test with many (Testing with Bots)
- Rebuild every model from one Blender script (Models and Animation)
Running it
cp .env.example .env # then edit secrets
docker compose up -d --build
| service | port |
|---|---|
| player portal | 8082 |
| admin panel | 8081 |
| this documentation | 8083 |
| game server | 7777/udp |
| uptime monitoring | 3001 |
The game server sits behind the game compose profile, so it can be built and
run on its own:
docker compose --profile game build game-server
docker compose --profile game up -d game-server
Deploying the game server to another host, running movement measurements, and the production checklist are all in Deployment.
Architecture at a glance
Godot Client --ENet/UDP--> Godot Headless Server
|
| Npgsql
v
PostgreSQL <-- Portal (Razor Pages + API)
Admin (Razor Pages + API)
- The game server is authoritative for movement. Clients predict locally and correct toward the server rather than snapping to it.
- The admin panel controls the game server through a
server_commandstable queue instead of opening a direct socket.
Where to look next
| Getting Started | prerequisites, local development, migrations |
| Architecture | request flow, authority model, movement reconciliation |
| Data Model | entities, indexes, JSON payloads |
| Web Apps and APIs | portal and admin endpoints |
| Game Server | RPC contract, movement constants, terrain |
| Game Client | running the client, controls, diagnostics, models and animation |
| Gameplay | gathering, crafting, NPCs, combat, pets, creatures, karma |
| Building the World | roles, GM tools, the admin panel, content migrations |
| Testing with Bots | the gameplay bot, load bots, screenshots |
| Deployment | services, ports, hosting a second game server, measurement |
| Roadmap and Follow-ups | the build steps, conventions, known follow-ups |
Project layout
Moondog.Core— shared EF Core entities, DbContext, migrations, JWT helpers, seedingMoondog.Portal— player-facing Razor Pages + JSON account APIMoondog.Admin— admin dashboard and server controlsMoondog.GameServer— Godot 4.7 C# headless servergodot_client/— the first-person Godot clienttools/blender/— the script that builds the game's modelsscripts/— checks, probes, bots and admin scriptswebsite/— this documentation (Docusaurus)docker-compose.yml— Postgres, portal, admin, docs, game serverrpc_contract.json— the authoritative RPC and movement-constant contract
Keeping these docs current
These pages describe behaviour that changes as the code does. Two things keep them honest:
rpc_contract.jsonis the truth for the RPC surface, enforced byscripts/check_rpc.py. Run the guard after any signature change and update Game Server to match.- Movement constants, telemetry column names and probe scenarios are documented in the same commit that changes them.