a problem with desynching
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?
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
This should save you some heartache when your game starts freaking out and you can't figure out why.
HTH
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement