Jump to content

  • Log In with Google      Sign In   
  • Create Account

Unity RPC calls slow


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Butabee   Members   -  Reputation: 238

Like
0Likes
Like

Posted 31 January 2013 - 10:44 PM

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?

Sponsor:

#2 Casey Hardman   Crossbones+   -  Reputation: 2243

Like
1Likes
Like

Posted 01 February 2013 - 02:34 AM

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



#3 Butabee   Members   -  Reputation: 238

Like
0Likes
Like

Posted 01 February 2013 - 03:25 PM

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.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS