Table 2. How to Overcome Latency
Decouple the communications from your game:
Place blocking communications calls in a separate thread or use asynchronous communications calls.
Never await incoming data from another player before allowing game play to continue.
Use predicting, interpolating, and reconciling later to improve game play.
When using prediction, transmit not just position information, but also velocity and acceleration.
Latch or queue user input (for example, keystrokes) until the next time communications data is to be sent. If you use the more traditional method of checking the keyboard at regular intervals during the game loop and perform this checking only at moments before sending data to the network, you will be prone to missing user input.
Hide latencies in other game elements:
Schedule events in the future if you want them to happen simultaneously for all users.
Require multiple shots to kill someone, and minimize the number of all-or-nothing, deterministic, latency-sensitive events.
Make rockets take a long time in the air (and reconcile the outcome while the rocket is flying).
Require time to move from one location to another (don't allow any instantaneous teleporters).
Make players, ships, and other objects move in ways that facilitate prediction. For example, build inertia into the way entities in your game move.
Use your imagination to incorporate latency within the context of your game concept.