Now that we know how to send custom data across a network connection, we can proceed to address one of the hardest issues of programming online games: game object synchronization.
There are two main challenges to this that we need to take on: The number one issue for networked multiplayer games is the communication lag between clients and the server. In many cases this is out of the hands of the developer, but we will find a way to smooth this out so that it is at least less noticeable on the client side.
The second problem is closely related to the lag issue: We just can't send a complete update of all active game objects' states every frame. This means state updates are sent to the client at a much lower rate than the game makes updates to its local state. Again, the trick is about smoothing things out to hide the issue from the player.