RPC or OnRepNotify on death?

Hey! I’m trying to replicate some visuals and sounds for chars on death. If I play with a lot of bots as a Client I witnessed that those changes when made with OnRepNotify are created with a noticable delay of almost a second. I changed everything to reliable RPC Multicasts which now is executed immediatly but I’m worried about how that may impact the performance. What is best practice? And why are OnRepNotifies delayed?
Thanks!

Visuals effects that don’t persist and sound should be called by RPC’s but don’t make them reliable as it has more overhead and if used to much can lead to bottlenecks and eventually disconnect.

1 Like

Let’s say I’m making the old char invisible and spawning a ragdoll, then I probably would want it to be reliable right?

I only use Multicast RPC’s for inconsequential changes and therefore have no problem making them unrealiable (fun fact unreliable RPC’s are actually incredible reliable unless if you’re already trying to replicate too many things at once).

You mention that your OnRepNotify takes a noticeable amount of time before getting called which indicates that you already have a bottleneck of replication going on or the actor NetUpdateFrequensy is lower than the default 100 (actual rate on everage < 5ms. )

In the perfect world we would want everything to be 100% reliable but that is not why the Reliable RPC is even a thing. It exists because it needs to know which RPC’s to drop and which it has to keep trying to send when the network is overloaded so it can recover gracefully. If you make everything Reliable then it can’t catch up and then the Reliable RPC’s actually become the unrealiable onces. And if that is not enough then it starts disconnecting Clients to get out of the well of despair.

1 Like