Introducing UnreliableRemoteEvents

can someone explain to me what’s the difference between basic remote event and this “unreliable” one? I didn’t actually understand tho.

2 Likes

Base remote events are guaranteed to be received by a client, unreliable remote events are not (yet are faster due to this)

3 Likes

i agree, i will most likely get remotes confused, just got to get in the habit of organizing! Fun.
(also im new to the devforum!)

2 Likes

Someone already linked a blog that explains it pretty well.

3 Likes

The unreliable remote events have no ordering dependencies, and so can be processed when they arrive but if other events have arrived earlier, they will likely be processed first (they are treated with equal priority).

3 Likes

Hello, thanks for the feedback! This is something we are considering, but have no concrete plans for at this time.

6 Likes

Good job, very cool thing for dev’s :facepunch:

2 Likes

no way!
i can finally fix my remote events to be reliable!

2 Likes

Say there are multiple entities on the map that send unreliable remote events. Is it worth consolidating all unreliable remote events that would’ve fired in one frame into one packet (all the way up to the 900 byte limit, even, splitting as needed), or is it better to send many granular packets?

The former seems better because it reduces the total amount of network data (specifically headers) sent, but maybe someone else knows a good reason not to do this?

I also think that if one of these large packets get dropped, then a lot of things at once will look like they just dropped a packet.

2 Likes

It will depend on your use case. For the example, if you have data that groups well together and is sent at a high frequency multiple times for per frame this can make sense. As noted you will be able to better compact the data and can send it more efficiently.

If you were thinking of trying to wait some number of frames to batch the data to try to send the data more efficiently, this approach may not be ideal - for example one approach to combat packet loss is to always have fresh data arriving, and waiting to send increases the amount of time between updates, which can make the loss be more noticeable.

Finally, Roblox will to try to combine events under the hood to make sure that things are replicated more efficiently. A good way to reason about this is try to think about your use cases and optimize accordingly. Heavy systems that require lots of events that combine well make sense to group. Otherwise most other events can be sent normally, and then you can lean on them to do the right thing.

4 Likes

Wow, this is extremely powerful and helpful. It has improved my footstep sound system to near perfection. Before, there would usually be delays and footsteps getting so desynced to the point were it sounded like the player was limping (lol), but now, I literally don’t notice any delay! Good stuff here.



4 Likes

Also, I have a system that detects when you are looking at a part in a local script, which spams a remoteEvent when isLooking = true. It will stop sending when a serversided boolean gets set to true. Should I switch to Unreliable remotes for this case? It sounds like a good idea.

2 Likes

please
i love the features but
the names sound like they were written by a beginner programmer

“EditableImage”
“UnreliableRemoteEvent”

my suggestions:

“DynamicImage”
“ReplicationEvent”

3 Likes

I don’t see the problem lol.

EditableImage - The image is editable. Does exactly what it says on the tin.
UnreliableRemoteEvent - Same as a RemoteEvent, but you can’t rely on it actually firing and it is unordered (therefore unreliable describes it perfectly).

“DynamicImage” is just EditableImage with a different word.
For “ReplicationEvent” it’s less clear that they share their basic behavior with a RemoteEvent.

13 Likes

consider giving it a better name? i thought this was some april fools joke (even if it is december)

3 Likes

Question: I have a setup where some instances replicate state through attributes. For example, a lantern that has a boolean attribute on whether or not it is on. When I tell the client that the lantern is off, I just set the attribute to false, and then the client will handle whatever visuals, sfx, etc.

Do attributes replicate unreliably?
If not, will there be an option to do so?

Just wondering if ill need to change my structure to use the unreliability for vfx/sfx replication or not.

1 Like

Unreliable remote events are best used for streams of data where older information is overwritten anyway, like replicating where a player is looking in the context of say, a first person shooter.

Unreliably sending important, infrequently updated data is bound to cause problems. In the case of the lantern, I’d figure that you only inform the client whenever the on/off state changes. If this information is sent via an unreliable remote event and the packet is dropped, the client will never know that the lantern’s on state changed from on to off or vice versa, causing inconsistencies between clients.

Attributes are usually updated infrequently and often play a pretty important role. Because of this, having unreliable attributes would make no sense.

1 Like

ah ok. thanks for the explanation.

2 Likes

This was actually the original Instance name before launch!

2 Likes

It does exactly what it says on the name. Not sure what the problem is.

3 Likes