Skip to main content

Moondog MMO Server

Moondog is a Phase 1 MMO server stack for a Godot client. It combines:

  • a Godot 4.7 headless game server using ENet/UDP
  • an ASP.NET Core web backend and admin panel
  • a PostgreSQL database for accounts, characters, chat, bans, audit logs, and server control commands

What you can do today​

  • Create player accounts and manage characters from the web portal
  • Generate a time-limited JWT play token for the Godot client
  • Connect Godot clients over ENet and move in a shared 3D zone
  • Chat with other players
  • Persist character position across reconnects
  • Administer bans, kicks, broadcasts, server state, and view audit logs

Running it​

cp .env.example .env # then edit secrets
docker compose up -d --build
serviceport
player portal8082
admin panel8081
this documentation8083
game server7777/udp
uptime monitoring3001

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_commands table queue instead of opening a direct socket.

Where to look next​

Getting Startedprerequisites, local development, migrations
Architecturerequest flow, authority model, movement reconciliation
Data Modelentities, indexes, JSON payloads
Web Apps and APIsportal and admin endpoints
Game ServerRPC contract, movement constants, terrain
Example Clientcontrols, settings, correction toggle, probe
Deploymentservices, ports, hosting a second game server, measurement

Project layout​

  • Moondog.Core — shared EF Core entities, DbContext, migrations, JWT helpers, seeding
  • Moondog.Portal — player-facing Razor Pages + JSON account API
  • Moondog.Admin — admin dashboard and server controls
  • Moondog.GameServer — Godot 4.7 C# headless server
  • godot_client/ — example first-person Godot client
  • website/ — this documentation (Docusaurus)
  • docker-compose.yml — Postgres, portal, admin, docs, game server
  • rpc_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.json is the truth for the RPC surface, enforced by scripts/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.