What kind of game is it?
You'll have to structure your game so it can handle not being in sync. Each entity will probably need a local state, last known "real" state and extrapolated current real state. When the local and the real state differs, you begin moving towards the extrapolated real state. You may not need to care about how an entity wound up in a specific place, all you need to care about is finding a way to get to that position within the game rules.
[edit]
Disclaimer: I have never written a game using this kind of synchronization. I'm writing an RTS with input command synchronization which comes with a completely different set of challenges. The above is just from the top of my head.
Thanks for your response.
I'm writing a 2D sidescroller multiplayer shooter game. To simplify things, like a Super Mario but with multiplayer and weapons.
I read your tips and I have some doubts: the first one is about extrapolation. Isn't it a bit "dangerous"? We're getting data from the "future", so I don't think it will be accurate enough. The second one is about data storing: what about the previous known snapshots from the server? Do they matter? Or only the last one?