<html>

<head>
<title>loonygames presents: Game Networking 101</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
a { text-decoration: none; }
a:hover { color:000000;  text-decoration: underline; }


</style>
</head>

<body bgcolor="#FFF4D0" link="#3333FF" vlink="#000000" alink="#000000">
<center>
</center>
<table width="100%" border="0" bgcolor="#3596B3" height="58">
  <tr> 
    <td height="69" width="29%" align="left" valign="top"> 
      <div align="left"> <font face="Arial, Helvetica, sans-serif" color="#FFFFFF"><b><i><img src="../../images/logo_new.jpg" width="182" height="63" border="0" usemap="#logoa"> 
        </i></b></font></div>
    </td>
    <td height="69" width="29%" align="center" valign="top"> <center>
<script type="text/javascript"><!--
google_ad_client = "ca-pub-2373963192914918";
/* 468x60 */
google_ad_slot = "3417104156";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</center>
    </td>
  </tr>
</table>
<table width="100%" border="0" bgcolor="#3596B3" height="29">
  <tr> 
    <td height="20" width="25%" align="center" valign="middle" bgcolor="#86531A"> 
      <a href="../../../about.1"><font face="Arial, Helvetica, sans-serif" color="#FFFFFF"><b><font size="2">about</font></b></font></a></td>
    <td height="20" width="25%" align="center" valign="middle" bgcolor="#86531A"> 
      <a href="../../../feedback.1"><font face="Arial, Helvetica, sans-serif" color="#FFFFFF" size="2"><b>feedback</b></font></a></td>
    <td height="20" width="25%" align="center" valign="middle" bgcolor="#86531A"> 
      <a href="../../../archives/index.html"><font face="Arial, Helvetica, sans-serif" color="#FFFFFF" size="2"><b>archives</b></font></a></td>
    <td height="20" width="25%" align="center" valign="middle" bgcolor="#86531A"> 
      <b><a href="../../../submissions/index.html"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif" size="2">submissions</font></a></b></td>
  </tr>
</table>
<div align="center"> <br>
</div>
<table width="100%" border="0">
  <tr> 
    <td width="72%"> 
      <h5><b><font face="Arial, Helvetica, sans-serif">//<a href="../../../index.html"><font color="#7C420E">loonygames</font></a>://<a href="../index.html"><font color="#7C420E">issue 
        2.10</font></a>://<a href="index.html"><font color="#7C420E">Game Networking 
        101</font></a>://<a href="index.php"><font color="#7C420E">1</font></a>, 
        <a href="index2.php"><font color="#7C420E">2</font></a>, <a href="index4.php"><font color="#7C420E">3</font></a>, 
        4, <a href="index5.php"><font color="#7C420E">5</font></a>, <a href="index6.php"><font color="#7C420E">6</font></a>, 
        <a href="index7.php"><font color="#7C420E">7</font></a>, <a href="index8.php"><font color="#7C420E">8</font></a></font></b></h5>
    </td>
    <td align="right" valign="middle" width="28%"> 
      <div align="right"> 
        <h5><a href="../../cgi/printme.pl?url=%252F2.10%252Ffeat%252F"><img src="../../images/icons/print01.gif" width="27" height="27" align="baseline" border="0" alt="switch to printer-friendly version"></a></h5>
      </div>
    </td>
  </tr>
</table>
<br>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td align="center" valign="top" width="25%"> 
      <table border="0" width="99%" bgcolor="#D7B582" align="center" bordercolor="#E0E0E0">
        <tr> 
          <td align="LEFT" valign="TOP" width="100%"> <font color="#000000" face="Arial, Helvetica, sans-serif" size="2"> 
             </font> <p><webdog><font face="Arial, Helvetica, sans-serif" size="2" color="#0022A8"><b><font color="#693A0C">What's 
           new today:</font></b></font> 
          
<p><b><font face="Arial, Helvetica, sans-serif" size="2"><a href="../../../index.html" target=""><b><font color="#00025E">New!!!</font></b></a><br></b>
  The archives have been cleaned up, dead links fixed, and the printable versions restored! Also, don't miss the new comments on the main page!</font></p>

 
<p><b><font face="Arial, Helvetica, sans-serif" size="2"><a href="../../2.15/feat/index.html" target=""><b><font color="#00025E">Livin' 
  With The Sims</font></b></a><br></b>
  theAntiELVIS explores the wild and wacky world that is Will Wright's <b>The Sims</b>, 
  asking the inevitable quesiton, &quot;is <b>The Sims</b> the first step toward a virtual 
  life where everyone is Swedish?&quot;</font></p>
<p><font color="#000000" face="Arial, Helvetica, sans-serif" size="2"><a href="../../2.15/pixel/index.html" target=""><b><font color="#00025E">Pixel 
  Obscura </font></b></a></font><font face="Arial, Helvetica, sans-serif" size="2"><br>
  Josh Vasquez on <b>Omikron: The Nomad Soul</b>.</font></p>
<p><font color="#000000" face="Arial, Helvetica, sans-serif" size="2"><a href="../../rl/index.html" target=""><b><font color="#00025E">Real 
  Life </font></b></a></font><font face="Arial, Helvetica, sans-serif" size="2"><br>
  Check out our newest comic strip, <b>Real Life</b>! Updated daily!</font></p>
<p><font color="#000000" face="Arial, Helvetica, sans-serif" size="2"><a href="../../uf.1" target=""><b><font color="#00025E">User 
  Friendly</font></b></a></font><font face="Arial, Helvetica, sans-serif" size="2"><br>
  Updated daily!</font></p>
<p></webdog> </p>
 
            <p></p>
            <p> </p>
            <p></p>
             
            </td>
        </tr>
      </table>
      <br>
      <table width="100%" border="0" bgcolor="#D7B582">
        <tr bgcolor="#D7B582"> 
          <td> 
            <div align="center"> 
              <p align="left"><font size="-1"><font face="Arial, Helvetica, sans-serif" size="2" color="#0022A8"><b><font color="#00025E">Random 
                Feature:</font></b></font> </font> </p>
              <p><p align="CENTER"><img src="../../images/thumbs/pixel.jpg" width="92" height="117" align="MIDDLE" border="0"></p><p><font face="Arial, Helvetica, sans-serif" size="-1"><a href="../../2.15/pixel/index.html">Pixel Obscura</a>: Josh Vasquez's regular look at the convergence of film and videogames.</font></p>
<i><font face="Arial, Helvetica, sans-serif" size="-2"> 
                </font> </i></p>
            </div>
          </td>
        </tr>
      </table>
      <br>
      <table width="99%" border="0" bgcolor="#D7B582">
        <tr> 
          <td> 
            <div align="center"> 
              <form method="get" action="http://www.google.com/custom" name="">
                <font face="Arial, Helvetica, sans-serif" size="-1"><b><font color="#339900">Search 
                the Archives!</font></b></font> 
               
                 <INPUT TYPE=text name=q size=12 maxlength=255 value="">
 <INPUT type=submit name=sa VALUE="Google Search">
 <INPUT type=hidden name=cof 
VALUE="LW:216;L:http:/home/loonygames/loony.timedoctor.org/content/images/logo1.jpg;LH:55;AH:center;S:http://www.loonygames.com;AWFID:13a298c7abe84fd0;">
<input type=hidden name=domains value="loonygames.com"> 
<input type=hidden name=sitesearch value="loonygames.com">               
</div>
              </form>

              <p align="left"><i> </i></p>
            </div>
          </td>
        </tr>
      </table>
    </td>
    <td width="75%" align="center" valign="top"> 
      <table width="90%" border="0" cellpadding="0" align="center">
        <tr> 
          <td width="50%" valign="top"> 
            <div align="center"> 
              <table width="98%" border="0">
                <tr> 
                  <td width="55%"> 
                    <div align="left"> 
                      <p><b><font face="Arial, Helvetica, sans-serif" color="#0000FF"><i><font color="#904C10" size="3">Game 
                        Networking 101</font></i></font></b><br>
                      
                      <div align="right"> <font face="Arial, Helvetica, sans-serif" size="-1">By 
                        <a href="mailto:jsimpson@ravensoft.com">Jake Simpson</a></font></div>
                    </div>
                  </td>
                  <td width="45%" align="right" valign="top"> 
                    <h5 align="right"><b><font face="Arial, Helvetica, sans-serif" color="#00025E">Vol. 
                      2, Issue 10 <br>
                      January 31, 2000&nbsp; </font></b></h5>
                  </td>
                </tr>
              </table>
              <loonystart> 
              
              <p align="right">&nbsp;</p>
              <p align="left"> <font face="Arial, Helvetica, sans-serif">So lets 
                clarify. TCP/IP and UDP/IP are two layers of systems. The IP bit 
                is the part that figures out the transmission of packets of data 
                to and from the Internet. UDP or TCP hands it a big fat old packet 
                of data, and the IP part splits it up into sub packets, puts an 
                envelope around it, and figures out the IP address of it's destination, 
                and how it should get to where it's going, then sends it out to 
                your ISP or how ever you are connected to the Net. It's effectively 
                the bit where you write down what you want to send on a postcard, 
                stamp it, write the address on it, and stuff it in a mail box.</font></p>
              <p align="left"></p>
              <p align="left"><font face="Arial, Helvetica, sans-serif">UDP and 
                TCP are higher layers that accept the packet of data from you, 
                the coder or you, the game and decide what to do with it. The 
                difference between UDP and TCP is that TCP guarantees delivery 
                of the packets, in order, and UDP doesn't. UDP is effectively 
                an access way to talk directly to IP, whereas TCP is an interface 
                between you and IP. Complicated, but you should get the drift. 
                It's like having a secretary between you and your mail. With UDP 
                you would type up your letters yourself, put them in an envelope 
                etc. With TCP you would just dictate the letter, give it to her 
                and let her do all the work and follow up to be sure the letter 
                arrived.</font></p>
              <p align="left"></p>
              <p align="left"><font face="Arial, Helvetica, sans-serif">You can 
                see TCP/IP in action right this second if you want. If you're 
                in windows, open up an MS-DOS prompt and type PING 205.229.73.43 
                and press return. What you've just done is sent a message to the 
                machine that runs this website and said, &quot;are you there?&quot; 
                And it's replied, &quot;Yes, I am.&quot; The values you see there 
                is the time taken for the packets of info to make the round trip 
                - from you to them and back again. This is called Ping time, or 
                Latency. Latency is one of those weird phrases that mean different 
                things to different people. We here at Raven treat it as an average. 
                Ping is the round trip for one packet; latency is the average 
                round trips over the last 30 or so packets. As a rule of thumb, 
                those hosts that you are trying to get to that have the least 
                amount of routers to go through are the ones that will have the 
                lowest ping. Usually these are the closest to you in physical 
                location, but not always. If you want to see the route you have 
                to go through to get to a particular host, type tracert 205.229.73.43 
                at the MS-DOS prompt. This returns all the routers your packet 
                hit on the way to the host.</font></p>
              <p align="left"></p>
              <p align="left"><font face="Arial, Helvetica, sans-serif">However, 
                all this wonderful work-done-for-you comes at a cost. In order 
                to be sure that packets that are sent via the Internet get there 
                ok, TCP expects an Acknowledgement (an ACK in net parlance) to 
                be sent back from the destination for every packet it sends. If 
                it doesn't get an ACK within a certain time, then it holds up 
                sending any new packets, resends the one that was lost, and will 
                continue to do so until the destination responds. We've all seen 
                this in action when you've gone to a web page, and halfway through 
                the download it stops for bit and then restarts. Chances are (assuming 
                its not an ISP problem) a packet has been lost somewhere, and 
                TCP is demanding it gets resent before any more come down the 
                pipe.</font></p>
              <p align="left"></p>
              <p align="left"><font face="Arial, Helvetica, sans-serif">The problem 
                with all this is the delay between the sender realizing something 
                is amiss, and the packet actually getting through. This can get 
                into the seconds sometimes, which is not that much of a worry 
                if you are just downloading a file or a web page, but if it's 
                a game packet of which there are at least 10 every second, then 
                you&#146;re in real trouble, especially since it's holding up 
                everything else. This is actually such a problem that almost no 
                games use TCP/IP as their main Internet protocol of choice, unless 
                it's it not a real time action game. Most games use UDP - they 
                can't guarantee order or delivery, but it sure is fast. We'll 
                talk about how they handle this later.</font></p>
              <p align="left"></p>
              <p align="left"></p>
              <p align="left"></p>
              <p align="left"></p>
              <p align="left"><font face="Arial, Helvetica, sans-serif"><br></loonystart> 
                </font> </p>
            </DIV>
            <div align="center">
                <p align="left"><font face="Arial, Helvetica, sans-serif"> </font><font face="Arial, Helvetica, sans-serif"> 
                  </font></p>
              </div>
              
            <table width="100%" border="0">
              <tr> 
                <td width="50%"><font face="Arial, Helvetica, sans-serif"><a href="index3.php"><font color="#7C420E"><b><font size="+1">&lt;&lt;Prev</font></b></font> 
                  </a></font></td>
                <td width="50%"> 
                  <div align="center"> 
                    <p align="left"></p>
                    <p align="left"></p>
                  </div>
                  <p align="right"><font face="Arial, Helvetica, sans-serif"><a href="index5.php"><font color="#7C420E"><b><font size="+1">Next 
                    &gt;&gt;</font></b></font> </a></font> 
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<br>
<table width="100%" border="0" bgcolor="#3596B3" height="29">
  <tr> 
    <td height="20" width="25%" align="center" valign="middle" bgcolor="#86531A"> 
      <a href="../../../about.1"><font face="Arial, Helvetica, sans-serif" color="#FFFFFF" size="2"><b>about</b></font></a></td>
    <td height="20" width="25%" align="center" valign="middle" bgcolor="#86531A"> 
      <a href="../../../feedback.1"><font face="Arial, Helvetica, sans-serif" color="#FFFFFF" size="2"><b>feedback</b></font></a></td>
    <td height="20" width="25%" align="center" valign="middle" bgcolor="#86531A"> 
      <a href="../../../archives/index.html"><font face="Arial, Helvetica, sans-serif" color="#FFFFFF" size="2"><b>archives</b></font></a></td>
    <td height="20" width="25%" align="center" valign="middle" bgcolor="#86531A"> 
      <b><a href="../../../submissions/index.html"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif" size="2">submissions</font></a></b></td>
  </tr>
</table>
<table width="100%" border="0" bgcolor="#3596B3" height="29">
  <tr> 
    <td height="20" width="35%"><a href="../../../index.html"><font face="Arial, Helvetica, sans-serif" color="#FFFFFF"><b><i>loonygames</i></b></font></a></td>
    <td height="20" width="65%"> 
      <div align="right"><font face="Arial, Helvetica, sans-serif" color="#FFFFFF">  </font></div>
    </td>
  </tr>
</table>
<p><i><font face="Arial, Helvetica, sans-serif" size="-2">Credits: Illustration 
  &copy; 2000 Costas (<a href="http://www.freespeech.org/darkpathimages/dpathmain.htm">Darkpath 
  Images</a>) and Andy, This article is &copy; 2000 Jake Simpson. All other content 
  is &copy; 2000 loonyboi productions. Unauthorized reproduction is prohibited. 
  So don't do it, or we'll give you really, really, bad lag.</font></i></p>
 <map name="logoa">
  <area shape="rect" coords="52,47,112,59" href="http://www.bluesnews.com">
  <area shape="rect" coords="3,3,179,46" href="../../../index.html">
</map>
</body>
</html>
