First, minimize the processing that they have to do on their end. You move your mouse, this moves the character’s arm. You press the button to fire. The gun fires a bullet. The bullet travels to another player. The game calculates whether it’s a hit and applies the damage to the other character.
The server doesn’t care about any of the graphics side, so leave that to your computer to handle. All the server needs to know is the location of the players (three numbers) and the direction and speed of the projectile (two numbers). It then performs a rather simple mathematical calculation and sends the results back.
Most of the resource intensive stuff are graphics which they just let you handle on your own? You can’t handle those graphics? Sucks to be you.
Second, on the server side, they have enough servers that are fast enough to handle all of the incoming information that they do actually receive, process it fast enough, and send it back to the player.
Third, they don’t actually care whether you get a response in a timely manner. The type of network connection they use is basically “fire and forget”. Your computer sends the information to the servers, but it doesn’t wait for a response. This is why network lag is perceived by players suddenly jumping around or freezing in place, because your client continues to process your actions, rendering the graphical part, but isn’t receiving any info about anyone else to render theirs. For minor lag issues, you never notice and the game just continues to proceed as if nothing is wrong.
Latest Answers