Jump to content
  • Advertisement
Sign in to follow this  
RuneSword2

synchronization

This topic is 4874 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Now I'm trying to add network to my game. For now I've got a point to point UDP conection (The game is a Vs shooter). I've got this events: Move Forward, Move Backward, Left, Right, Shoot and Object Touch. And i've got 2 threads, the main thread computes the local data, the bullets trajectory and send the data every 50 ms. The second thread receive the data and computes the new position of the character add the bullets to the list or remove the objects when the opponent cath it. The problem with this model is when the ping is so long the local character is set to his position inmediatly but the remote has some idle time, In some cases the bullet hits the oponent on one side but not on the other. A posible solution is to update the local data only when you got the remote data but in this case i must compute first one event list (local or remote) and then the other, then the events could succed in different order that really made. Is there any other solution for this or should I change all the protocol?

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!