Highly Performant & Scalable Ultima Online Server Emulator https://www.modernuo.com
Find a file
Kamron Batman e1e30998ba
fix: Adds ReadType/Write(Type) and improves type referencing (#1172)
## Changes
* Improves type hashing by introducing xxHash3 (64bit)
* Removes individual `tdb` files in favor of a single `SerializedTypes.db` file. This file is only used to identify a type that is being deserialized, which doesn't exist.
* Adds duplicate type alias detection
* Adds `AssemblyHandler.FindTypeByHash`

View changed files whitespaces: https://github.com/modernuo/ModernUO/pull/1172/files?diff=split&w=1

## SerializedTypes.db
The serialized types file is used to get back the original name of a type in case it no longer exists in code. This can easily be necessary if a class is renamed in code and no `TypeAlias` is provided.

### Format
byte[4] - version
byte[4] - count
--array--
byte[8] - xxHash
byte[1] - flag, 0 - null, 1 - not null
byte[n] - Full class name in UTF8

### Example
<img width="472" alt="SerializedTypes_Example" src="https://user-images.githubusercontent.com/3953314/195255429-31d24293-6bd1-419e-811b-07874dd0f78d.png">

## Benchmarks
Serialized 500 Type fields. The 8192bytes comes from the _ConcurrentQueue_ that would later be used for SerializedTypes.
Note that the queue is never cleared, so it's size grew considerably.
```cs
|               Method |     Mean |    Error |   StdDev | Allocated |
|--------------------- |---------:|---------:|---------:|----------:|
|      BenchmarkXXHash | 18.44 us | 0.278 us | 0.260 us |    8192 B |
| BenchmarkTypeStrings | 25.09 us | 0.292 us | 0.259 us |         - |
```

TODO:
* Add support in the Serialization Generator for `ReadType()` and `Write(Type)`
* Remove `SetTypeRef` from Serialization Generator
2022-10-11 22:17:22 -07:00
.config feat: Bumps serialization generator (v2.3) to add diagnostics (#1163) 2022-09-06 00:18:15 -07:00
.github fix: Cleans up core code (#1187) 2022-10-10 21:47:08 -07:00
Distribution/Data fix: Adds expansion specific mobile status version (#1145) 2022-08-22 21:04:59 -07:00
docs docs: Documentation update (#941) 2022-04-04 13:39:16 -07:00
Projects fix: Adds ReadType/Write(Type) and improves type referencing (#1172) 2022-10-11 22:17:22 -07:00
.editorconfig Adds ModernUO docs skeleton (#243) 2020-09-13 15:21:28 -07:00
.gitattributes fix(git): Updates git attributes (#477) 2021-02-06 21:15:29 -08:00
.gitignore fix: Fixes disallowed features enum serialization (#1093) 2022-06-27 18:30:31 -07:00
azure-pipelines.yml fix: Cleans up core code (#1187) 2022-10-10 21:47:08 -07:00
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md 2020-05-05 08:51:39 -07:00
CONTRIBUTING.md chore: Updates discord links (#394) 2021-01-07 01:04:05 -08:00
Directory.Build.props fix: Cleans up core code (#1187) 2022-10-10 21:47:08 -07:00
FAQ.md chore: Updates whats changed (#1082) 2022-06-19 19:55:55 -07:00
global.json fix: Fixes compiling with .NET 7 SDK (#1176) 2022-09-28 21:17:30 -07:00
LICENSE Fixes more line ending issues (#267) 2020-09-27 13:54:56 -07:00
mkdocs.yml docs: Documentation update (#941) 2022-04-04 13:39:16 -07:00
ModernUO.sln chore: Removes benchmarks. (#985) 2022-03-31 10:37:33 -07:00
publish.cmd fix: Fixes detecting linux distro during build (#997) 2022-04-14 17:39:57 -07:00
publish.sh Release Version 0.6.1 (#205) 2020-08-30 23:15:47 -07:00
README.md docs: Adds contributors section to readme 2022-09-30 14:49:28 -07:00
rider-settings.zip Cleanup/Housekeeping (#242) 2020-09-12 15:31:21 -07:00
Rules.ruleset Cleanup & Fixes for .NET 5 (#309) 2020-11-15 10:03:50 -08:00
RUNUO_TO_MODERNUO.md chore: Adds changed mechanics (#1117) 2022-07-14 21:13:03 -07:00
SPONSORS.md fix: Updates sponsors links 2022-03-23 00:08:01 -07:00
stylecop.json Updates formatting rules (#199) 2020-08-25 18:00:51 -07:00
THIRD-PARTY-NOTICES chore: Updates 3rd party notices (#1042) 2022-06-01 09:42:11 -07:00
version.json fix: Adds ReadType/Write(Type) and improves type referencing (#1172) 2022-10-11 22:17:22 -07:00

ModernUO Discord Subreddit subscribers Twitter Follow Gitter

Ultima Online Server Emulator for the modern era!

GitHub license GitHub stars GitHub issues
GitHub build AzurePipelines build

Requirements

Supported Operating Systems

Windows 10/11/2016/2019/2022 MacOS 10.15/11/12 Debian 10/11 Ubuntu 16/18/20 LTS Linux Mint 17/18/19/20 CentOS 7/8 Fedora 32/33/34/35/36 RedHat 7/8

Running the server

.NET

Development

git .NET

Supported IDEs

    Jetbrains Rider 2022.2.2                           Visual Studio 2022
Rider 2022.2.2+             Visual Studio 2022+

Note: VS Code is not currently supported.

Getting Started

  • Install prerequisite requirements
  • Clone this repository (or download the latest):
    • git clone https://github.com/modernuo/ModernUO.git
  • Open ModernUO.sln to start developing

Building/Publishing

  • Run ./publish.cmd [release|debug (default: release)] [os]
    • os - Supported operating systems
      • win - Windows 10/11/2016/2019/2022
      • osx - MacOS 10.15/11.0+/12.0+ (Catalina, Big Sur, Monterey)
      • ubuntu.16.04, ubuntu.18.04 ubuntu.20.04 - Ubuntu LTS
      • linuxmint.17, linuxmint.18, linuxmint.19 - Linux Mint
      • debian.10, debian.11 - Debian
      • centos.7, centos.8 - CentOS
      • fedora.32, fedora.33, fedora.34, fedora.35, fedora.36 - Fedora
      • rhel.7, rhel.8 - Redhat
      • linux - Other linux distros
      • If blank, the operating system running the build is used. Linux Mint 20 is not supported directly yet, so build explicitly against ubuntu.20.04 instead.

Running the Server

  • Follow the publish instructions
  • Run ModernUO.exe or dotnet ModernUO.dll from the Distribution directory on the server

Note: If you are running a version of linux that isn't listed above, then you may have to install the following using a package manager:

  • libargon2-dev, libz-dev, and zstd

Troubleshooting / FAQ

Want to sponsor?

Thank you for supporting us! You can find out how by visiting the sponsors page.

Collaborators

Kamron Batman Mark1145

Thanks

  • RunUO Team & Community
  • Voxpire, the ServUO Team & Community
  • Karasho, Jaedan and the ClassicUO Community



Development Tools & Plugins provided with ♥ by
JetBrains Material Theme