Introducing UnreliableRemoteEvents

The official lua documentation has all the information on it but as it so happens roblox just also released the buffer type which is a more intuitive way to read/write binary data.

As for compression, at the very least it gets rid of the overhead of various data types since you would be doing the work of serializing the data for the engine knowing better how your data structure looks like so you wouldn’t need to waste bytes to define what the next X bytes should be read as and allows you to use less bytes if you don’t need the precision of the Double-precision floating-point format or know that the variables you are serializing is an integer within a certain value range.

  • A number sent directly via a remote event would use up 9 bytes since it would be sent as a FP64 with 1 byte of overhead which defines the remaining 8 bytes as a FP64
  • A number serialized as a double would use up 8 bytes as you would get rid of the overhead in exchange for a small amount of overhead from the string itself
  • A number serialized as a FP32 (which is what Vector3s use for example) would use up 4 bytes
  • A number serialized as a unsigned short integer would only accept integers in the range from 0 to 2^16-1 and would only use up 2 bytes
  • A number serialized as a signed byte would only accept integers in the range from -128 to 127 and only use up 1 byte
3 Likes