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.
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.
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, "are you there?"
And it's replied, "Yes, I am." 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.
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.
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
youre 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.