After having made a turn-based Multiplayer implementation of Minesweeper Flags at my site, I want to go into real-time Multiplayer development.
The turn-based Minesweeper Flags game can be found here: http://www.zomis.net/games/flags
The easiest real-time multiplayer thing that came to my mind was to have two squares travel around the playfield. I've made it working, but it isn't synchronized. When player1's x-position is 110 for Player1, Player1's x-position might be 104 for Player2. Only 6 pixels difference, but in realtime Multiplayer it must be perfect. All players move 10 times per second - a local timer controls this movement.
I'm working in Flash (ActionScript 3.0) and using a PHP script as the server. I've implemented it so that any command that a player executes (change speed or change direction) is first sent to the server, then being sent back to all clients. And then all clients execute the action for the correct player.
So what techniques should I use to make my games synchronized? I don't want to send too much data back and forth all the time, there has to be a better way, right?