🌙 Moongate v2 Documentation
Welcome to the official documentation for Moongate v2, a modern Ultima Online server emulator built with .NET 10 and NativeAOT compilation.
Moongate v2 is designed for performance, modularity, and extensibility. It leverages modern .NET features to deliver an ultra-fast, customizable UO server experience.
📚 Documentation Sections
Getting Started
New to Moongate v2? Start here:
- Introduction - What is Moongate v2?
- Quick Start - Get up and running in minutes
- Installation - Detailed installation guide
- Configuration - Configure your server
Architecture
Understand the internal workings:
- Architecture Overview - High-level system architecture
- Network System - TCP server and packet handling
- Game Loop - Timestamp-driven game loop scheduling
- Event System - Domain events and message bus
- Session Management - Client session handling
- Source Generators - Compile-time registration and mapping
Scripting
Extend your server with Lua:
- Scripting Overview - Lua scripting introduction
- Script Modules - Create custom script modules
- API Reference - Scripting API documentation
Persistence
Data storage and retrieval:
- Persistence Overview - Snapshot + Journal model
- Data Format - Binary serialization details
- Repositories - Query and data access
Networking
Deep dive into network protocols:
- Packet System - Packet registration and handling
- Protocol Reference - UO protocol implementation
🔗 Quick Links
- GitHub Repository
- API Reference - Full .NET API documentation
- Docker Hub - Pre-built Docker images
- Discord Community - Join our community
📦 Key Features
| Feature | Description |
|---|---|
| .NET 10 | Built on the latest .NET runtime for maximum performance |
| NativeAOT | Ahead-of-Time compilation for faster startup and lower memory |
| Lua Scripting | Extensible gameplay via MoonSharp Lua engine |
| Event-Driven | Clean separation between network parsing and domain logic |
| File Persistence | Lightweight snapshot + journal storage model |
| HTTP Metrics | Built-in Prometheus metrics on :8088/metrics |
| Docker Ready | Official Docker images with NativeAOT binaries |
🚀 Current Status
Moongate v2 is actively in development. Current capabilities include:
- ✅ TCP server with connection lifecycle management
- ✅ Packet framing/parsing for fixed and variable sizes
- ✅ Source-generated packet registration
- ✅ Source-generated packet listener bootstrap registration
- ✅ Source-generated metrics snapshot mapping
- ✅ Inbound message bus for network → game-loop communication
- ✅ Domain event bus with player connect/disconnect events
- ✅ Lua scripting runtime with
.luarcgeneration - ✅ Embedded HTTP server with OpenAPI/Scalar documentation
- ✅ Snapshot + Journal persistence system
- ✅ Interactive console UI with colored logging
- ✅ Command system with source + AccountType authorization
- ✅ Console
Tab/Shift+Tabautocomplete (commands + argument providers) - ✅ Contextual
help <command>output - ✅ Custom DocFX Moongate theme with moon branding and Fira Code
- ✅ Timer wheel metrics integration
📄 License
This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.
Built for Speed. Designed for Community. Powered by Innovation.
Moongate v2 - Where classic meets cutting-edge