Moongate.Core 1.0.0

dotnet add package Moongate.Core --version 1.0.0
                    
NuGet\Install-Package Moongate.Core -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Moongate.Core" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Moongate.Core" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Moongate.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Moongate.Core --version 1.0.0
                    
#r "nuget: Moongate.Core, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Moongate.Core@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Moongate.Core&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Moongate.Core&version=1.0.0
                    
Install as a Cake Tool

Moongate v2

<p align="center"> <img src="images/moongate_logo.png" alt="Moongate logo" width="220" /> </p>

<p align="center"> <img src="https://img.shields.io/badge/platform-.NET%2010-blueviolet" alt=".NET 10"> <img src="https://img.shields.io/badge/scripting-Lua-yellow" alt="Lua Scripting"> <img src="https://img.shields.io/badge/license-GPL--3.0-blue" alt="GPL-3.0 License"> </p>

CI Tests Coverage FOSSA Status Docker Image

Moongate v2 is a modern Ultima Online server built with .NET 10, deterministic game-loop processing, Lua scripting, and a chunk/sector-based spatial world model.

FOSSA Status

Looking for Collaborators

I am actively looking for contributors and reviewers.

Release Automation

  • GitHub releases are mirrored to Discord via the GitHub Release Assets workflow.
  • Configure the repository secret DISCORD_CHANGELOG_WEBHOOK_URL to enable changelog posting.
  • Release notes are sourced from CHANGELOG.md and posted to Discord after the GitHub release is created.
  • NuGet packages are published by the NuGet Publish workflow.
  • Configure the repository secret NUGET_KEY to enable publishing to nuget.org.

Quick Start

Requirements

  • .NET SDK 10.0+
  • Ultima Online data files (client)

Run Server (local)

git clone https://github.com/moongate-community/moongate.git
cd moongate
dotnet run --project src/Moongate.Server -- --root-directory ~/moongate --uo-directory ~/uo

Run Server (Docker quick start)

git clone https://github.com/moongate-community/moongate.git
cd moongate
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:local

Server port: 2593
UDP ping port: 12000
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

Run UI (dev)

cd ui
npm install
npm run dev

UI default URL: http://localhost:8088/

What Is In Scope Today

  • 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
  • Registry-driven snapshot buckets + journal persistence over MemoryPackable runtime entities
  • Lua scripting runtime for commands, gumps, item/mobile behavior
  • Startup-loaded C# plugins from the runtime plugins/<plugin-id>/ directory
  • Classic books rendered from moongate_data/templates/books/*.txt, with support for both read-only content and writable books (0x93 header saves, 0x66 page 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)

Project Highlights

  • 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.
  • Persistence uses MemoryPack with registry-driven snapshot buckets and generic journal entries.
  • Mobile domain model was refactored to remove Level and Experience from UOMobileEntity (they are not part of the base UO mobile model).

Screenshots

Web Admin UI

  • UI Screen 1: login and initial admin entry point. UI Screen 1
  • UI Screen 2: authenticated dashboard and main navigation. UI Screen 2
  • UI Screen 3: item templates search with image previews. UI Screen 3

In-Game Features

  • Character Creator at Docks: character creation flow and initial spawn area. Character Creator at Docks
  • Door Open/Close Fix: the bug is still there (damn doors). Door Open/Close Fix
  • Orion Lua Brain: scripted NPC behavior example (orion.lua) with speech loop (my cat is always hungry and always looking for food). Orion Lua Brain
  • Teleport Gump: Lua-driven teleport UI and location workflow. Teleport Gump

Documentation

  • 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/moongate/

Benchmarks and Stress

  • Benchmarks project: benchmarks/Moongate.Benchmarks
  • Cross-map teleport cold-destination benchmark: TeleportMapChangeBenchmark.HandleCrossMapTeleport_ColdDestination
  • Same-map teleport cold-destination benchmark with self refresh: TeleportMapChangeBenchmark.HandleSameMapTeleport_ColdDestination_WithSelfRefresh
    • Dry run on Apple M4 Max / .NET 10:
      • cross-map median 2.850 ms, mean 4.284 ms, first cold outlier 19.939 ms, allocated 1.85 MB
      • same-map median 1.947 ms, mean 2.908 ms, first cold outlier 13.514 ms, allocated 1.22 MB
  • Intelligent NPC dialogue scheduling benchmark: NpcDialogueSchedulingBenchmark
    • Dry run on Apple M4 Max / .NET 10:
      • queue listener median 2.729 us, mean 183.0 us, first cold outlier 2.133 ms, allocated 592 B
      • schedule and complete median 1.170 ms, mean 1.258 ms, first cold outlier 2.169 ms, allocated 1552 B
      • reject duplicate in-flight median 1.270 ms, mean 1.073 ms, first cold outlier 2.696 ms, allocated 1288 B
  • Black-box socket stress tool: tools/Moongate.Stress
  • Guide: docs/articles/operations/stress-test.md
  • Packet handler performance guide: docs/articles/networking/packet-handler-performance.md

Acknowledgements

Moongate v2 is inspired by the UO emulator ecosystem.

Special thanks:

Data imported/adapted from ModernUO distribution is used in selected world datasets (decoration, locations, signs).

Star History

Star History Chart FOSSA Status

Contributing

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

License

GPL-3.0. See LICENSE.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on Moongate.Core:

Package Downloads
Moongate.Abstractions

Core abstractions and contracts used across Moongate services.

Moongate.Network

Networking primitives, transport services, and session lifecycle components for Moongate.

Moongate.UO.Data

Ultima Online domain data types, entities, and protocol-facing value objects used by Moongate.

Moongate.Network.Packets

Ultima Online packet contracts, packet registry, and protocol packet implementations for Moongate.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 34 3/20/2026