Synchronization : online game

Hello.

I’m currently trying to do an online game with real time and I encounter an issue with synchronization between the different players; the game is not the same on all computers.

I would like to have some info on the differents approach that are used to ensure synchronization in online game.

My game is Pong.

Actually, each player run a different simulation on his computer and the input from the other player are sent to him. Because the travel time of the packet between the different computer are not the same, the game become out of sync.

[quote]A solution for the message synchronization problem of the client-server based game system is to wait for a certain period of time (waiting period) until the server processes the messages from clients.
[/quote]
Here is a solution but I want to know if there anything else I can do.

you could always put it into a lock-step.

so basically every client sends a packet whether their moving or not with their keys, and that is sent to the other client, and both clients wait to recieve a packet b4 they do their logic.

I hope that makes sense, if it doesnt, jut google “lock step networking”

Maybe this article will be of use:

There’s a few ideas here too:
http://www.java-gaming.org/index.php/topic,18290.0.html