Network latency

Originally posted to Shawn Hargreaves Blog on MSDN, Friday, December 14, 2007

 "The time has come", the Walrus said, "to talk of networking"...

The network game programmer has three mortal enemies:

I shall write about all three, in that order.

Latency is caused by physics. Decades of science fiction notwithstanding, physicists have yet to figure out how to surpass the speed of light. Because of their failure (the fools! I mean really, how hard can this be?), we are unable to send any data faster than 186282 miles per second.

That's still pretty fast, though, right?

I live in Seattle. My colleague Eli used to live in New York. That is 2413 miles away, which is 13 milliseconds at the speed of light.

I used to live in England. From Seattle to England is 4799 miles, which is 26 milliseconds.

In a 60 frames per second game, each frame gets 16 milliseconds. So I already have nearly two frames lag when I play with my friends in England.

But wait! This is not the whole story...

How bad can it get?

How can you try this at home?

What can you do about it?

Blog index   -   Back to my homepage