Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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
0
Question by Spacecat · May 18, 2012 at 08:48 AM · networkingrpcnetwork.instantiateorder-of-execution

RPCs and instantiations being dropped/appearing out of order

It seems that when a player on a particularly terrible connection connects to my server, the lag/packet loss causes some odd problems both for that player and the server. As far as I can tell, sometimes RPCs to/from that player appear out of order, sometimes even to the point of RPCs for an object arriving before it's been instantiated at all. Some RPCs are dropped entirely.

The only question I can find that seems even remotely related is this one, which seems to be talking about something different (the timing of RPCMode.All to already-connected players).

All of the NetworkViews in my game are either set to Unreliable or have state sync disabled entirely, but as I understand it, this shouldn't affect RPCs, only state sync.

Comment
Add comment
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
0

Answer by Bunny83 · May 18, 2012 at 09:05 AM

RPCs are sent as UDP packets, but Raknet implements it's own reliable layer on top of UDP. The RPC calls are numbered, if an RPC call is missing the receiving side requests it again and hold the newer ones back until all RPCs have arrived in chronological order.

The state synchronisation works similar when you use reliable transfer. Of course when you use unreliable it's possible that an (unreliable) update arrives before the RPC arrives that should create the object. Such interferences depends entirly on the latency.

The point is, you simply can't play a realtime game (e.g. QuakeLive) with a latency of 500+ ms.

final note: The order of RPCs can only be kept for the same peer. If two users send an RPC almost at the same time, it can't be ensured that they are executed in the same order they have been triggered in realtime.

Comment
Add comment · Show 1 · 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 Spacecat · May 19, 2012 at 04:08 AM 0
Share

Of course when you use unreliable it's possible that an (unreliable) update arrives before the RPC arrives that should create the object.

This seems to explain the state sync part. I have been getting some errors there, but those are harmless, aren't they?

if an RPC call is missing the receiving side requests it again and hold the newer ones back until all RPCs have arrived in chronological order.

But this does not seem to match my observations. I'll have to do more testing next time the tester with the terrible connection is around, but so far it would seem that this is not the case.

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.

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Changing a variable in another script over the network 1 Answer

Running only one script across clients and server 0 Answers

Animation over network using rpcs 0 Answers

Assigning Player Numbers 0 Answers

Player info for objects in Multiplayer 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