{"id":178,"date":"2006-03-21T10:59:47","date_gmt":"2006-03-21T15:59:47","guid":{"rendered":"http:\/\/www.shamusyoung.com\/twentysidedtale\/?p=178"},"modified":"2008-09-28T07:38:46","modified_gmt":"2008-09-28T12:38:46","slug":"ping-time","status":"publish","type":"post","link":"https:\/\/www.shamusyoung.com\/twentysidedtale\/?p=178","title":{"rendered":"Ping Time"},"content":{"rendered":"<p><b>EDIT (9\/28\/2008): For some reason, the images that go with this article are <em>gone<\/em>.  Gone from the server, gone from my local machine.  I have no idea how that happened.  It will make this kind of hard to follow. Sorry.<\/b><\/p>\n<p>Someone in the comments of <a href=\"?p=175\">this post<\/a> asked about ping time. I sort of took a halfhearted attempt at answering it, but I thought it might be useful if I could explain <em>why<\/em> latency is such a problem for online gaming.  This explanation is going to be very simplified, but should give the non-action gamer an understanding of why people are always ranting and whining about ping times.  Please don&#8217;t nitpick.<\/p>\n<p>Let&#8217;s assume that you and I are playing some Quake-type game.  We both have a ping of 1000, which means  1000 milliseconds, or simply one second.  So, it takes a half-second for stuff to go from me to the server, and another half-second to come back.  Let&#8217;s say I&#8217;m in the room (green) and you (red) come in, running right-to-left<\/p>\n<p><center><img decoding=\"async\" src=\"images\/lag1.gif\"\/><\/center><\/p>\n<p>To keep this simple, let&#8217;s assume I try to blast you with some instant-hit beam weapon so we don&#8217;t have to worry about projectile speed.  I just need to aim directly at you, and I should hit:<\/p>\n<p><center><img decoding=\"async\" src=\"images\/lag2.gif\"\/><\/center><\/p>\n<p>EXCEPT&#8230; That isn&#8217;t where you are.  I&#8217;m lagging by a half-second, so I&#8217;m really seeing where you were a half-second ago.  Here is what &#8220;really&#8221; happened:<\/p>\n<p><center><img decoding=\"async\" src=\"images\/lag3.gif\"\/><\/center><\/p>\n<p>But it gets worse.  When I hit the fire button, the message takes another half-second to get to the server and tell the server I fired.  By that time you are yet another half-second along.<\/p>\n<p><center><img decoding=\"async\" src=\"images\/lag4.gif\"\/><\/center><\/p>\n<p>This is a nasty problem.  And it gets worse: The message that I fired takes yet another half-second to reach you.  By that time, you are another half-second away.<\/p>\n<p><b>I saw<\/b>: Direct hit.<\/p>\n<p><b>You saw<\/b>: I missed by a second and a half.<\/p>\n<p><b>The server saw <\/b>: I missed by 1 second.<\/p>\n<p>The problem gets worse still if we are fighting with (say) rockets that travel at a visible speed, and you realize that from my standpoint the rockets themselves are lagging by a half-second. If I&#8217;m running down the hallway firing rockets, I don&#8217;t get the message that the rocket has been fired until a second after I pull the trigger.  I know it might be hard to picture, but what I end up seeing is my own rockets passing through me after being launched from where I was a second go.  Doors which are supposed to open when you get near don&#8217;t seem to open right away, and you see yourself slam face-first into a closed door.  A half second later (when you get the message from the server) you appear on the other side of the door, which now appears open.  It&#8217;s a mess.  The world doesn&#8217;t work right if you try to interact with it like this.<\/p>\n<p>What really matters is what the server sees.  The server is in charge, and decides if you explode or not.  So the person with the lower ping sees the world more as it &#8220;really&#8221; is, according to the server. <\/p>\n<p>This isn&#8217;t as much of a problem today as it was back in 1996 or so when on-line deathmatch was just catching on. Connections are, on average, much more reliable and provide for lower ping times.  In addition, most games have various tricks for making the world appear more normal even when coping with a certain degree of lag.  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>EDIT (9\/28\/2008): For some reason, the images that go with this article are gone. Gone from the server, gone from my local machine. I have no idea how that happened. It will make this kind of hard to follow. Sorry. Someone in the comments of this post asked about ping time. I sort of took [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[55],"tags":[],"class_list":["post-178","post","type-post","status-publish","format-standard","hentry","category-game-design"],"_links":{"self":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts\/178","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=178"}],"version-history":[{"count":0,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts\/178\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=178"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=178"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=178"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}