Jump to content
  • Advertisement
Sign in to follow this  
Butabee

Unity RPC calls slow

This topic is 1991 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!