D
D
DOTSNET
Search…
Compression
DOTSNET is extremely fast. It’s so fast, that we are currently bandwidth limited. The more we optimize bandwidth, the more Entities we can sync over the network.
DOTSNET has a Compression class with a few helper functions likeDe/CompressQuaternion. Those can be used in NetworkMessage Serialize/Deserialize functions to compress data.
For example, writing a quaternion rotation usually takes 16 bytes:
1
public bool Serialize(ref BitWriter writer) =>
2
writer.WriteQuaternion(rotation);
Copied!
But most of the time we can compress it down to 4 bytes:
1
public bool Serialize(ref SegmentWriter writer) =>
2
writer.WriteQuaternionSmallestThree(rotation);
Copied!
If you run into bandwidth issues, you will understand why we go through the hassle of compression.
Last modified 5mo ago
Copy link