Help with Pong game using truesync

Hi, Everyone

i'm new and i'm making a 2d pong game:

I'm using a default TrueSyncConfig.asset, and i use TrueSyncManager.SyncedInstantiate(BallPrefabs, TSVector.zero, TSQuaternion.identity) to create a ball for 2 player, and i use RigidBody2d.AddForce(impulse) to move the ball.

At the Beginning players interact with the ball was fine. But after a while , the ball moves in difference directions on each clients...

At the Begining:
https://drive.google.com/file/d/0B1mMaYXrk4SEMHRVa3Z2ZXJkWmM/view?usp=sharing

After a while:
https://drive.google.com/file/d/0B1mMaYXrk4SEbENua0RidUdJc0k/view?usp=sharing

Can you give me some advice ?
Thank.

Answers

  • Hi @Watermelon, this situation you describe is a desync or "checksum NOK", in this case players connected are not simulating in the same way. You can take a look at our Pong demo to see how it is done and improve from there.
  • Thank you Jefferson. i will try.
Sign In or Register to comment.