Beginner Network Rigidbody Questions.


I'm quite new to network programming and Photon, I have my game basically working with Photon Cloud. I have a few basic questions please bare with me.

A basic description of my game is, It's basically cars playing football/soccer, 1v1. Each car is Rigid body and another Rigid body for the ball.

The game is quite physics based I'm having trouble getting the game to feel good especially for the player who isn't the master client.

1 . With the relatively low player count, What would you recommend I set PhotonNetwork.sendRate and PhotonNetwork.sendRateOnSerialize to?

2 . What is the best Observe option for syncing rigid bodies, Unreliable or Reliable Delta Compressed?

3 . Also to sync the rigid bodies I've been using the NetworkRigidbody.cs script I found on the forum here which is working ok. But it has setting m_InterpolationBackTime which I believe is set in milliseconds and is deponent on PhotonNetwork.sendRate and PhotonNetwork.sendRateOnSerialize. What would be correct value for this also?

4 . With each player having a local rigid body for their car, local car control feels the same a single player, but only the master client has a local physics simulation for the ball. This causes problems when the None master client player interacts with the ball. Often it intersects the car and or acts strangely. Would you have any suggestions for fixing this issue?

5 . I often find that when a remote player's position has become out of sync with the real position, it stays out of sync until the remote player moves. This then causes the positions to sync causing a big jump in positions. Is this an expected behaviour, and what is the best work around?

Again, sorry for all the questions. I've been working on this a while and any help with any of the above questions would help massively.



  • Leepo
    1) I assume you are sending the movement updates via OnSerializePhotonView, then only sendRateOnSerialize matters. Maybe start with 15 times a second and see how it goes from there.
    2) Unreliable (will send more, but the messages are not as heavy to process since they can fire&forget)
    3) I'm not exactly sure atm, I believe it has to be a bit higher then the sendrate (default sendrate = 10 --> 100ms, thats why I had set it to 150ms in that script). Since you'll most likely use 15 or 20 sendrate. Interpolationbacktime can be set to, say, 0.08 - 0.1 (80-100ms)
    4) Yeah thats a tough one. For the smoothest local experience and the most accurate representation I would use a lot of lerping and try to find a balance between these two demands..
    5) Isnt this a side effect of using RELIABLE instead of the, recommended, unreliable?