Hi, guys.
I beg your pardon, my English is far from perfect, still I need your help.
Currently I’m trying to develop a networked clone of space invaders and i’ve got some troubles with synchronization issues.
Each time player presses or releases a button I send a message that holds a data about ship position and movement direction. For example typical message may contain info like this: [x=28 y=50 direction=northwest].
After receiving such message client assumes that ship is moving from specified position in a specified direction. The client will move a ship until another message arrive.
When another message arrives local ship position is not the same as actual position according to message data. Local ship moved a bit further because of network delay. When I synchronize ship state, I simply move it to position I got from message.
So, when one of the players changes the movement direction, other player sees an ugly “jump” of first player’s ship.
What are my options to make my game look smoother?
Thanks in advance.