Sign in to follow this  

Unity RPC calls slow

Recommended Posts

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).

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this