Highly Performant & Scalable Ultima Online Server Emulator
https://www.modernuo.com
c-sharpcsharpcsharp-coredotnetdotnet-coreemulatorgplgplv3mmommo-enginemmorpgmmorpg-serveronlinerpgrunuoserverservuoultimaultima-onlineuo
Tier-1 disasm of a generated-style Serialize showed PGO's guarded devirtualization already inlines every IGenericWriter.Write body (interface vs concrete-typed callsites measured identical), so no API or generator changes are needed. What remained as a real call per primitive write was the Index property setter - too large to inline due to its range-check throw path, plus per-write high-water tracking, an AsSpan bounds check, and a BinaryPrimitives span check. The write path now reserves capacity once (the existing grow-on-Flush check), then does an unaligned store through a ref with a raw index increment - the capacity check proves the store in-bounds, and the index only moves forward between Seeks. The _bytesWritten high-water mark (used only by SeekOrigin.End) folds at Seek/Resize instead of per write, which is equivalent because writes are monotonic between seeks. The Index property keeps its validating semantics for Seek and subclasses. BufferWriter also gains class-level implementations of the hottest IGenericWriter default interface methods (WriteEncodedInt, DateTime, TimeSpan, Point2D/3D, Rectangle2D/3D, Map, Race): a DIM dispatches again on `this` for every nested Write even at a devirtualized callsite, and the class overloads keep the whole write inlined. Strings (arbitrary UTF-16) previously walked every string twice (GetByteCount then GetBytes) because the variable-width length prefix precedes the bytes. Strings of 85 chars or fewer (any content, incl. surrogate pairs - 85 * 3 = 255 bytes max) now encode once into a 256-byte stack scratch, then write the prefix and copy. Byte output is identical. Measured: 34.4 -> 15.7 ns/entity on a generated-style write mix (~20 writes, 58 bytes), 22.5 -> 11.8 ns per short-string write, and the end-to-end freeze benchmark (10M entities / 1.7GB / 24 cores, dense profile) drops from ~99ms to ~74-82ms. Combined with the earlier pipeline commits: ~740ms -> ~78ms. New tests pin byte-level output and position semantics: primitive little-endian layouts, Seek(End) high-water behavior, growth preservation, span writes across growth, encoded-int formats, and string equivalence across the scratch/two-pass boundary with mixed-width UTF-16 content. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|---|---|---|
| .config | ||
| .github | ||
| branding | ||
| dev-docs | ||
| Distribution/Data | ||
| Projects | ||
| .cursorrules | ||
| .editorconfig | ||
| .gitattributes | ||
| .gitignore | ||
| AGENTS.md | ||
| azure-pipelines.yml | ||
| CLAUDE.md | ||
| CODE_OF_CONDUCT.md | ||
| CONTRIBUTING.md | ||
| Directory.Build.props | ||
| FAQ.md | ||
| GEMINI.md | ||
| global.json | ||
| LICENSE | ||
| ModernUO.slnx | ||
| publish.cmd | ||
| publish.ps1 | ||
| publish.sh | ||
| README.md | ||
| rider-settings.zip | ||
| Rules.ruleset | ||
| SPONSORS.md | ||
| stylecop.json | ||
| THIRD-PARTY-NOTICES | ||
| version.json | ||
ModernUO

Ultima Online Server Emulator for the modern era!
Requirements
Supported Operating Systems
Required Frameworks
All Operating Systems
Windows
Development
Supported IDEs
Getting Started
- Install prerequisite requirements
- Clone this repository (or download the latest):
git clone https://github.com/modernuo/ModernUO.git
- Open
ModernUO.slnto start developing
Building/Publishing
Interactive Mode (Recommended for new users)
Run ./publish.cmd (Windows) or ./publish.sh (Linux/macOS) with no arguments to launch the guided build tool. It will:
- Check prerequisites (.NET SDK, native libraries)
- Walk you through configuration and platform selection
- Build and publish the server to the
Distributiondirectory - Show deployment instructions for cross-compiled builds
Command Line
./publish.cmd [release|debug] [os] [arch]
os- Supported operating systemsarchx64- Intel/AMD 64-bitarm64- ARM 64-bit
Linux Prerequisites
Fedora, CentOS, RHEL, AlmaLinux, Rocky, etc
dnf upgrade --refresh -y
# RHEL-family distributions (CentOS Stream, AlmaLinux, Rocky, RHEL) need CRB and EPEL enabled.
# Fedora skips this block.
dnf install -y dnf-plugins-core
dnf config-manager --set-enabled crb
dnf install -y epel-release
# Prerequisites
dnf install -y findutils libicu libdeflate-devel zstd libargon2-devel liburing-devel
Ubuntu, Debian, etc
apt-get update -y
apt-get install -y libicu-dev libdeflate-dev zstd libargon2-dev liburing-dev
OSX Requirements
brew install icu4c libdeflate zstd argon2
Running the Server
- Follow the publish instructions
- The
Distributiondirectory is portable — copy it to your production server for deployment - Run
ModernUO.exeordotnet ModernUO.dllfrom theDistributiondirectory - On first run, the server will prompt you to configure game data file locations
Troubleshooting / FAQ
- See FAQ
Want to sponsor?
Thank you for supporting us! You can find out how by visiting the sponsors page.
Collaborators
Thanks
- RunUO Team & Community
- Voxpire, the ServUO Team & Community
- Karasho, Jaedan and the ClassicUO Community
Development Tools & Plugins provided with ♥ by
Code Signing Policy
Free code signing provided by SignPath.io, certificate by SignPath Foundation.
This program will not transfer any information to other networked systems unless specifically requested by the user or the person installing or operating it
Teams & Roles
Approvers & Committers: Development Team