DOTSNET - High Performance Unity ECS Networking from the creator of
Mirror!
(
Demo) (
Docs) (
Forum) (
Discord) (
Roadmap)
Requires ECS knowledge & exactly Unity 2020.3 LTS, Burst 1.6.0, Entities 0.17.0, Unity.Physics 0.6.0, HybridRenderer 0.11.0,!“In the information age, the barriers just aren't there. The barriers are self imposed. If you want to set off and go develop some grand new thing, you don't need millions of dollars of capitalization. You need enough pizza and Diet Coke to stick in your refrigerator, a cheap PC to work on, and the dedication to go through with it. We slept on floors. We waded across rivers.†― John D. Carmack, Masters of Doom
IntroductionDOTSNET brings easy to use, WoW/EvE scale AAA Networking to Unity.
Embracing Unity's new
Data Oriented Technology Stack, DOTSNET can handle both millions of entities & thousands of connections, with unmatched stability & ease of use.
It's fun to work with, it's
orders of magnitude faster than any other Unity networking solution, and comes with over 90% test coverage by default.
Low Level Transports:DOTSNET supports multiple low level Transports for message sending:
*
kcp: fast & reliable UDP
*
Telepathy: battle Tested TCP made for Mirror
Lightweight & ModularDOTSNET was developed with simplicity in mind. Every single line of code was crafted very carefully, and all the systems are modular & replaceable. Implement your own Interest Management, Message Handling, Broadcasting, Transport etc. easily.
StabilityPreviously, one of the biggest pain points of networking solutions were undetected bugs and instability. DOTSNET has over 200 unit tests and more than 90% coverage, which reduces the probability of bugs to the very minimum. It's the most well tested networking library for Unity, only followed by Mirror's 50% test coverage. Additionally, open bugs are always given the highest priority.
Each DOTSNET version has 0 open bugs at time of release. I use this for my own project, it needs to work.
Client & Server in UnityDOTSNET requires no third party tools. You can develop your full game in Unity, the server & client can share large amounts of code, with only critical parts being excluded from the client with the "#if UNITY_SERVER" macro. This allows for a huge productivity boost, and makes updating game files a one step process.
Memory Separated Host ModeUnity's MonoBehaviour world only has one Scene/Hierarchy without any memory separation, which made host mode very difficult. With DOTSNET, the server and the client are 100% separated in the ServerWorld & ClientWorld. This works so well that DOTSNET requires no extra code for host mode support. Whether you run only the server, only the client, or both - it makes no difference. In DOTSNET host mode, the client simply connects to the server and all communication goes over the network.
BitpackingDOTSNET comes with built-in
Bitpacking to optimally compress networked data down to the bit level. It's fast and extremely easy to use. For example, a player's level can be compressed into only 6 bits via
WriteUInt(level, 1, 60), assuming a range from 1..60. Bitpacking automatically calculates the needed bits for the given range and efficiently packs the value into them.
100% Full Server AuthorityBefore working on MMO networking, I spent several years reverse engineering popular MMORPGs to understand their mechanics and develop exploits. As result, DOTSNET is 100% server authoritative and validates any client input very carefully in order to prevent cheating. Any security bug will be fixed within 48 hours.
Concurrency by DefaultUtilizing Unity's
Job System, DOTSNET makes it extremely easy to write multi-threaded networking code, and performance scales directly with the amount of CPU cores!
Headless Linux ModeThe server can run on any platform, even on Ubuntu Linux systems in headless mode without any rendering, for maximum performance.
Interest ManagementDOTSNET was designed with large scale MMOs in mind. Instead of sending the full world state to every connection, players only receive updates for nearby entities. The Interest Management system is fully replaceable, so you can modify it to also receive updates from guild members, sentry towers, parties, rooms and more. Additionally, you can implement any type of algorithm like Spatial Hashing, Sweeps, Brute Force, etc.
Allocation FreeDOTSNET itself requires no allocations in the hot-path. Everything runs extremely fast, without any Garbage Collection freezes.
Message PackingDifferent Transports allow different message sizes. To minimize Socket calls, DOTSNET automatically packs multiple messages into bigger chunks while respecting the Transport's MaxMessageSize. In other words: whatever Transport you use, DOTSNET will perform!
Extensive DocumentationDOTSNET comes with an extensive, frequently updated, easy to read Google Docs documentation. If you are used to Unity's MonoBehaviour world, then many of the concepts will be new to you, which is why everything is explained as simple as possible.
Managing ExpectationsWhile DOTSNET is extremely stable thanks to the over 90% test coverage, it's important to remember that Unity's ECS technology is cutting edge and in preview. Things will break, your old projects will require a complete rewrite, and it doesn't have anywhere near the tooling that the MonoBehaviour world has.
Take your time, experiment, get excited by this new technology and watch DOTSNET grow nicely along side Unity's DOTS/ECS framework. DOTS/ECS might only be in preview, but it is the future and it's a lot better than MonoBehaviour.
---
This asset uses libuv under MIT License; kcp under MIT License; NetUV under MIT License; LiteNetLib under MIT License; Telepathy under MIT License. See Third-Party Notice.txt file in package for details.