• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
Question by Frenchie92 · Jan 13, 2015 at 07:41 AM · networkingrpcsynchronization

Check if RPC was received or acknowledged by the client

I've looked through the questions on RPCs and scanned the documentation but couldn't find an answer to my question.

According to the documentation, RPCs are guaranteed to be delivered and in order. This obviously means that the sender of the RPC must get some kind of acknowledgement message back from the guest/client. Is it possible to check and see if an RPC has been acknowledged?

The purpose is to know all clients have acknowledged the message before proceeding with play, in real-time. As a workaround, right now I'm replying to RPCs with another "Acknowledge" RPC. I don't like this since it doubles the number of RPC calls that must be made.

Comment

People who like this

0 Show 0
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by tobiass · Jan 14, 2015 at 01:25 PM

It is not possible to check if some message was ACKd. However, if there is no ACK for anything sent reliably (like RPCs), then the connection will time out.

The timeout is several seconds, so that's not really of help immediately.

If you send updates regularly, each client could send regularly what the max (lock)step it got so far. Let's say a client got 1, 2, 4, it should include the two in updates. The step 3 will show up in a moment or someone will time out because the client does not get messages anymore.

Comment
Frenchie92

People who like this

1 Show 5 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Frenchie92 · Jan 14, 2015 at 04:20 PM 0
Share

Is it possible to know what the timeout is? If so, you could just keep track of the time since the packet was sent.

avatar image tobiass · Jan 14, 2015 at 04:34 PM 0
Share

I updated my answer. Hope that helps.

avatar image Frenchie92 · Jan 14, 2015 at 04:45 PM 0
Share

Thanks. Looks like I'm stuck sending extra packets regardless of what strategy I use :(

avatar image tobiass · Jan 14, 2015 at 04:49 PM 0
Share

You can send then in-line with the normal steps. You have to send those regularly anyways, no?

avatar image Frenchie92 · Jan 14, 2015 at 04:57 PM 0
Share

You could, but your game would be more susceptible to lag. Let's say you send updates every 200 ms. If you got an update at the 201 ms you'd wait another 199 ms before sending ACK. If there's a communication lag at that moment and the ping jumps to over 200, you now have to stop the game and wait for that ACK. For me, latency is much more crucial than bandwidth so I'd rather double bandwidth than introduce additional delay. For someone else this might be acceptable.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Question about RPCs 1 Answer

May different clients on the network load different scenes? 1 Answer

how to Stream.serialize(stringValue) 2 Answers

Unity Networking synchronize 3DText's 1 Answer

How to pass a variable to a late-joining player without syncvars? / What function gets called on a new player connect? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges