Unity RPC calls slow

Started by
1 comment, last by Butabee 11 years, 2 months ago
Has anyone used unity RPC's? They seem exceptionally slow. AFAIK they are the only way to send messages besides an outside library. I suppose everything should be monitored with network views instead?
Advertisement

They usually came fairly fast for me, but I never made a test using two different computers...and I later found out that you should always use NetworkViews for position synchronizing and such.

Supposedly, because RPCs are guaranteed to come in proper order, they'll stop up all other messages until they reach their target. This can cause problems in games with fluid movement, like first/third-person shooters and such, because you're going to be pinging the movement a lot. So you should use NetworkViews in that case, because you usually won't need the "guaranteed delivery" of RPCs.

Here's what "Dave Carlile" on Unity Answers told me when I was asking about RPCs in an FPS game a few months ago:

"...since RPC calls are guaranteed for both delivery and order, if one is missed they all queue up on the client while it waits for the missed one to be resent. This can cause some bad moments of lag. You should really use the NetworkView synchronization for an FPS game."

However, in something like a turn-based game where you aren't constantly calling RPCs, you may be able to use them instead.

How slow are you talking, though? If it's something like 2 seconds, then there may be some other problem, because I remember getting RPCs fairly quickly in my testings (though I was testing with both clients and the server running on the same computer, so maybe that's why).

[twitter]Casey_Hardman[/twitter]

I tried using RPCs for movement so I could control the rate updates are made for things based on proximity but they ended up taking like 5-10 seconds+ for only two players.

This topic is closed to new replies.

Advertisement