ENet Reliable RPC vs TCP

So, I read here ENet: Features and Architecture that ENetMultiplayerPeer has a “reliable” rpc option by using @rpc("authority", "call_remote", "reliable") for example. But it’s built on top of the UDP layer.

My questions is:

  • what happened if the packet drops, which will happen
  • what’s the overhead between using “reliable” and “unreliable” in ENetMultiplayerPeer?

ENet will resend the packet for you, similar to TCP. However, it still uses UDP behind the scenes. ENet never opens a TCP connection at any time, regardless of how many reliable packets you send through ENet.

If the connection is particularly prone to packet loss, ENet may reattempt sending the same reliable/ordered packet more than once.

It’s hard to estimate the overhead, but you should minimize the use of reliable packets whenever possible. Ordered packets (which are always reliable by design) have an even greater overhead than reliable packets (which aren’t guaranteed to be received in order).

So, enet unreliable_ordered is reliable?

It appears ENet can indeed send unreliable ordered packets, while Godot’s high-level multiplayer in 3.x could only send reliable ordered packets (but not unreliable ordered packets). Disregard what I said above.

1 Like