Sign in to follow this  
jchmack

a problem with desynching

Recommended Posts

my game keeps getting desynched after a few minutes of play... The players aren't in the same positions on different computers. My model is pretty basic. When a character changes the direction he is moving i send a packet with an x,y,z and the new direction. When the other player recieves this i teleport him (i know there is all types of things wrong with this but im just starting off) to this position and then set the new direction. Shouldn't this make it where my my game doesn't desynch? I mean once the packet arrives it sets the new position. I understand that it may be a litte behind but im going to timestamp once i can get them pretty synched up. Any ideas?

Share this post


Link to post
Share on other sites
timestamping is good for stopping the really wierd and wodnerfull effects of lag. Each computer just needs to send messages to each other to discover their ping, and then work out the time of the start of the session. (The network game) From there you use the time since the start of the session as a timestamp to timestamp events.

This should save you some heartache when your game starts freaking out and you can't figure out why.

HTH

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this