Update ball position

Hi,

We are trying to create a multiplayer game which uses balls. Our game have a lot of fast collisions.
We are trying to synchronise ball's positions. It works but the balls seem to "jump" from a position to another.

Here is the ball setup :

- Rigidbody (collision detection : continuous dynamic)
- Photon View (unreliable, and observes a script which uses OnPhotonSerializeView(). )

What is the best way to synchronise the ball position and to get smooth movements ?

Please help.

Thanks in advance,

mic93

Comments

  • Hi,

    What way to sync did you already try?
    PUN plugin goes with DemoSynchronization demo which contains 4 variants of sync problem solution.
  • hey,

    i tried the 4 variants of sync :
    i used photon's scripts from the exemple (cubeInter,cuberExtra..)
    transform,Lerp and extra give a bad result. the ball jump and it 's not smooth at all !
    Inter is much better than the other, the ball slide on the floor. there is less "jump". the ball change the direction without colliding the collider..

    Ma game cannot be played with several players if collision and movement are not almost perfect !
  • hey,

    i tried the 4 variants of sync :
    i used photon's scripts from the exemple (cubeInter,cuberExtra..)
    transform,Lerp and extra give a bad result. the ball jump and it 's not smooth at all !
    Inter is much better than the other, the ball slide on the floor. there is less "jump". the ball change the direction without colliding the collider..

    Ma game cannot be played with several players if collision and movement are not almost perfect synchronisation !

    Please some helps ! iam open to try some scripts or ideas :)
  • I hope you synchronize positions not only with regular updates and interpolations but also on collisions and other events which change ball velocity abruptly.
    But of course for "perfect synchronization" with "lot of fast collisions" that may be still not enough.
    Try to move all logic to master client and use others clients only for sending user input to master and visualization. Then you are sure that all 'key' events are in sync and you need only move balls on clients by same physics (linearly or with gravity) as on master until next event arrives.
    Drawback of approach is more lag for non-master clients and more load on master. Also it may suffer from deviations in delays between clients.