Optimizing Remote Events

I want to optimize remote events any ideas

1 Like

can you be more specific? what do you mean by optimizing remote events.

Making them send less data to the server / client like maybe encoding them

so you mean you want to encode/decode data

found a link for decoding and encoding base64
found a link for decoding and encoding binary

as @MightyDantheman said, you might want to encode/decode in binary.

You’re gonna have to give way more information like @Jonathan112233332211 said. It depends heavily on the use case. Things to consider would be frequency and load.

Frequency should be as low as possible, but if it can’t be, obviously a smaller load would be preferred.

As far as load goes, that entirely depends on the content of the load. The only thing you could really do to truly compress data is to send binary in the form of characters. But I’m not sure if that would really increase any performance noticeably.

While that’s good for other uses, I believe using binary would be more ideal for this situation. For example, a block position in a chunk in Minecraft can be given with just 2 characters/bytes. A byte has 256 possible combinations. One byte can be used for the Y axis (0-255). Now for the X and Z axis, you can split the byte in half. A byte is 8 bits (0’s or 1’s). If 8 bits has 256 possible combinations (calculated by 2^8), 4 bits has 16 (calculated by 2^4). This means that the first 4 bits could be the X axis and the remaining 4 bits could be the Z axis. This means that instead of sending some full position with a bunch of characters, you only need to send 2. This is primarily used for saving data, but is also good for network packets.

1 Like

I changed my post to include binary to!

1 Like