Moongate v2 is a modern Ultima Online server built with .NET 10, NativeAOT support, deterministic game-loop processing, Lua scripting, and a chunk/sector-based spatial world model.
I am actively looking for contributors and reviewers.
- Issues: https://github.com/moongate-community/moongatev2/issues
- Discussions: https://github.com/moongate-community/moongatev2/discussions
- Matrix: https://matrix.to/#/#moongate:matrix.org
- .NET SDK 10.0+
- Ultima Online data files (client)
git clone https://github.com/moongate-community/moongatev2.git
cd moongatev2
dotnet run --project src/Moongate.Server -- --root-directory ~/moongate --uo-directory ~/uogit clone https://github.com/moongate-community/moongatev2.git
cd moongatev2
docker build -t moongate:local .
docker run --rm -it \
-p 2593:2593 \
-p 8088:8088 \
-v "$HOME/moongate:/app/moongate" \
-v "$HOME/uo:/app/uo" \
moongate:localServer port: 2593
HTTP/UI API port: 8088
Default credentials: admin / password
Change them immediately from the server console with .password.
Player portal routes:
- Dev UI:
http://localhost:5173/portal/login - Embedded UI:
http://localhost:8088/portal/login - Authenticated profile:
http://localhost:8088/portal/profile
cd ui
npm install
npm run devUI default URL: http://localhost:8088/
- UO TCP server + packet pipeline
- Deterministic single game-loop with separate network inbound/outbound workers
- Source-generated packet/command/listener registration
- Sector/chunk spatial system with lazy warmup and broadcast radius
- Snapshot + journal persistence (MessagePack source-generated, AOT-safe)
- Lua scripting runtime for commands, gumps, item/mobile behavior
- Classic books rendered from
moongate_data/templates/books/*.txt, with support for both read-only content and writable books (0x93header saves,0x66page saves) - HTTP admin API + OpenAPI for tooling/UI
- Web admin UI (
ui/) for item templates and server/admin workflows - Player portal for authenticated account overview, profile editing, and password change (
/portal/login,/portal/profile,/api/portal/me,/api/portal/me/password)
- Spatial model is sector-first (chunk-style), not pure repeated range scans.
- World generation pipeline uses named generators (
IWorldGenerator) and command-triggered runs (example: doors). - Doors support runtime open/close behavior and network updates.
- AOT stability issue in persistence was resolved by moving to MessagePack-CSharp source-generated contracts.
- Mobile domain model was refactored to remove
LevelandExperiencefromUOMobileEntity(they are not part of the base UO mobile model).
- UI Screen 1: login and initial admin entry point.

- UI Screen 2: authenticated dashboard and main navigation.

- UI Screen 3: item templates search with image previews.

- Character Creator at Docks: character creation flow and initial spawn area.

- Door Open/Close Fix: the bug is still there (damn doors).

- Orion Lua Brain: scripted NPC behavior example (
orion.lua) with speech loop (my cat is always hungry and always looking for food).
- Teleport Gump: Lua-driven teleport UI and location workflow.

- Docs home:
docs/index.md - Getting started:
docs/articles/getting-started/ - Architecture:
docs/articles/architecture/ - Scripting:
docs/articles/scripting/ - Persistence:
docs/articles/persistence/ - Networking/protocol:
docs/articles/networking/ - Operations/stress test:
docs/articles/operations/stress-test.md
Published docs: https://moongate-community.github.io/moongatev2/
- Benchmarks project:
benchmarks/Moongate.Benchmarks - Black-box socket stress tool:
tools/Moongate.Stress - Guide:
docs/articles/operations/stress-test.md
Moongate v2 is inspired by the UO emulator ecosystem.
Special thanks:
- POLServer: https://github.com/polserver/polserver
- ModernUO: https://github.com/modernuo/modernuo
Data imported/adapted from ModernUO distribution is used in selected world datasets (decoration, locations, signs).
Contributions are welcome. Please open an issue/discussion first for non-trivial changes.
- Follow
CODE_CONVENTION.md - Keep tests green
- Keep docs aligned with runtime behavior
GPL-3.0. See LICENSE.
