<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>, 
        <a href="index4.php"><font color="#7C420E">4</font></a>, 5, <a href="index6.php"><font color="#7C420E">6</font></a><a href="index6.php"><font color="#7C420E"></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"><b>ISPs. 
                </b> </font></p>
              <p align="left"></p>
              <p align="left"><font face="Arial, Helvetica, sans-serif">Often 
                the bane of a game players life. Some ISPs get all upset about 
                the idea of people playing games using their precious bandwidth 
                that they actually use Packet Sniffers. These are programs that 
                scan the packets going through the network looking for Quake game 
                packets, and when they find them, they kill them dead. What a 
                bunch of spoilsports. I'd be interested to know exactly how they 
                know these packets are Quake packets, since packets can contain 
                anything, but apparently there are programs like this out there.</font></p>
              <p align="left"></p>
              <p align="left"><font face="Arial, Helvetica, sans-serif">Of course 
                the other big bit of bad news about ISPs is their server load. 
                The way that modem banks work is that all the modems tie into 
                one large pipe that goes into the main host machine that then 
                forwards these packets to the Net itself. Now, the lower the spec 
                machine that is used for the hosting, and the larger the bank 
                of modems attached to it, the longer the response time is on both 
                packets going in and out of the machine. Fairly obviously the 
                main pipe is only so wide, with the upshot that once it's full, 
                your modem waits. Of course this doesn't just apply to the ISP 
                machine, this can apply to any of the routers on the way and also 
                the destination machine too - we've all seen those download problems 
                on machines that have something popular on them. This means that 
                you may be connected to a 56k modem, but you're only getting 28.8 
                performance out of it, due to limitations beyond your control. 
                And this sucks. Some ISPs are worse than others, with cheap crap 
                modems that drop the connection and stuff like that. I won't mention 
                AOL here. Again, all you can do is just shop around.</font></p>
              <p align="left"></p>
              <p align="left"><font face="Arial, Helvetica, sans-serif"><b>Network 
                coding in the game. </b></font></p>
              <p align="left"></p>
              <p align="left"><font face="Arial, Helvetica, sans-serif">This is 
                pretty much all we as developers can do to accommodate the intricacies 
                of the Internet, but there is a surprising amount that can be 
                done. Reading all of the other points kind of makes you wonder 
                how online real time gaming can ever be done at all, but it has 
                to be said, the net works more than it doesn't. We'll discuss 
                some of the cool things that can be done programming wise in a 
                second, but first, we'll look at some of the no-nos. </font></p>
              <p align="left"><font face="Arial, Helvetica, sans-serif">First 
                up is the use of TCP/IP as your main protocol. I've already explained 
                why this can be (and usually is) bad news. It is often used during 
                game setup to ensure all players have the correct starting data, 
                before we start the game data flowing.</font></p>
              <p align="left"></p>
              <p align="left"><font face="Arial, Helvetica, sans-serif">Secondly, 
                packet bloating. You have to be careful only to transmit that 
                data that is required; otherwise you are just sending data for 
                the sake of it. The larger the packet you give to the UDP system, 
                the more you are asking the network to handle. This has a big 
                impact in client/server setups when your packet gets to the server, 
                since YOU are only transmitting one packet, but the SERVER is 
                receiving many such packets. This also impacts modem bandwidth. 
                If you are running a 28.8 and getting a pretty good sustained 
                throughput, you need to be sure that you are not allowing the 
                packets to exceed what it's possible to push through the modem. 
                Too big = packets getting shunted into a buffer while the modem 
                struggles with what it's got to send, and eventually the buffer 
                overflows and you end up at a crawl, assuming the game hasn't 
                already puked.</font></p>
              <p align="left"></p>
              <p align="left"><font face="Arial, Helvetica, sans-serif">Third, 
                packet frequency. Are you expecting packets to be sent faster 
                than the communications infrastructure can really handle? You 
                may be running at 60 frames per second, but you can bet that the 
                Internet will have trouble sustaining that kind of packet rate.</font></p>
              <p align="left"></p>
              <p align="left"><font face="Arial, Helvetica, sans-serif">Fourth 
                is handling packets that are out of order (assuming you are using 
                UDP) and dropped packets entirely. This is more involved and requires 
                you to be cleverer than you might think. However, if you don't 
                handle it right, you end up with missing events, missing entities, 
                missing effects, and sometimes, completely FUBAR'd games.</font></p>
              <p align="left"></p>
              <p align="left"><font face="Arial, Helvetica, sans-serif">Lastly, 
                there is the aspect of online client cheating to consider. With 
                the CPL and other frag fests offering cash to winners, this is 
                more important than it used to be.</font></p>
              <p align="left"></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="index4.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="index6.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>
