Bouncer
02-09-00, 10:30 AM
Okay,
This is going to almost be an article. (LOL)
Two things have to happen for good online gaming. One, "Latency" needs to be minimised. Two, "Packet Fragmentation" needs to be minimised. In short, properly sized packets need to be sent.
Easy nuff, right?
Muuuuuuuuahahahaha...ahem. Dream on, young Jedi. http://www.speedguide.net/ubb/wink.gif
Let's talk about the three main issues to online gaming. Latency, Fragmentation, and Retransmits.
Latency:
"Latency", is the time it takes for a packet to get from you to someplace else. The lower the number, the lesser the time, the better. We'll come back to this.
Fragmentation:
Packet "Fragmentation", is what occurs when a packet is too large to be processed. It's broken down into smaller packets that CAN be processed. This, takes time. Remember how we don't want to lose time to anything? PF wastes a lot of it.
Retransmits:
Sometimes, when fragmenting a packet, or for other reasons, errors occur. When this happens the system drops the packet. Poof. Gone. So NOW, the system asks for another one, and sends that request. This is called a "Retransmit". Your system bundles up the info and sends it back. This takes lots of time. This technically known as a: "bad thing"(tm).
What to do?!
We need to start thinking about properly sizing packets.
Properly sizing packets, means optimising YOUR system for what you're dealing with on the OTHER end. If you have DSL, and the other end is 56k, then you need to set YOUR in-game comm rate at 56k.
Otherwise, you will be sending packets that are too large for the server at the other end (the one running the game) and you will get packet fragmentation. The 56k line simply CANNOT deal with your DSL/cable sized packets, so it fragments them. If it drops one during this, it then ALSO asks for a retransmit. Your system responds and sends the info.
The system says:
"crap, ANOTHER oversized packet from that doofus with the cable/dsl!"
And fragments it so that it can deal with it. It then processes the packet and informs you that his bullet arrived first and you are now a statistic. So there. This is why fragmentation/retransmits are the Darth Maul of gaming. badBadBAD!!!
Combined, these both increase latency, sometimes dramatically. Latency though, can be most noticed in games when it comes and goes. This can usually be seen in Ping Spikes. "Ping Spikes", are where you're playing a game and suddenly it takes a LONG time to get info back, or frames start stuttering. That's almost always because something is temporarily causing packet fragmentation or loss, and the latency is fluctuating wildly. If you were to graph this through continuous Pinging, it would look like a series of spikes, almost like a heartbeat monitor in a hospital, thus, Ping Spikes. If it gets bad enough, in a desperate attempt to get caught up, the system will just drop a group of packets, and WHOOSH..that guys you were fighting will warp right by you, and oh, btw, you're now dead.
Starting to get confused and or annoyed?
Let's back up a second and imagine how this works from a different perspective. A good way to visualize all this is by thinking of the postal system. No, not "going postal", the postal system. :Þ
Let's imagine that a 56k packet is the size of a letter. Now obviously, that letter is easier for the postman (network) to carry than a 640k packet, which is roughly 12 times larger. A BIG box.
On the other side, is a mail slot (game server on a 56k connection). The letter can be slid right through the mail slot, but the box is too big has to be torn down into itty-bitty chunks. If a letter is lost, it's less stuff that has to be resent. If the box is lost, you have to get all that data together again. Which takes more time.
Now, obviously, the box is a more economical way to move data, because you can move a bunch of it at once. BUT, the letter is less likely to be lost, more likely to not have to be altered at the other end to be processed (fit through the mail slot), and if it IS lost, it's easier to gather up the info and resend it.
As a consequence, because what we want is the fastest UPDATING AND RETURN of data, not necessarily the fastest raw download, it starts to become more desireable to move data in smaller, more compatible sizes.
There is a another factor that I've not really mentioned yet. Well, two, actually. "Default Gateways", and "Static Routes". We're moving into the realm of tweaking now, so experimentation will be necessary.
Default Gateway
The "Default Gateway" is the route that you by default use to access the internet. Easy enough right? Well..no. See, there's two sides to this. On the one side, your default gateway is the router you first connect to. On the other, it's the router that connects out to the internet. These are frequently two different devices.
As a result, finding a fast default gateway can make things faster and decrease latency. The reason for this is that you will still physically go out your directly connected router. After that point though, if you set a different default gateway THAN that router, the packets will be forwarded to THAT default gateway to reach the internet. Like so:
Before change:
You >>> first hop router >>> whatever is available to get out to internet (might be a T1)
You >>> first hop router >>> specific gateway to internet (might be a T3!)
You see the advantage I'm sure.
Now, obviously the key is to find out what gateways are available to you. Look for mapping programs, or trace programs. Run a series of traces, and see what addresses one or two hops away tend to pop up a lot. Those are gateways. If you can remove even one hop out of your path, you can reasonably expect the latency to go down by anywhere from 10-50ms.
Static Routes.
A "Static Route" is simply a set path to a destination.
Windows, has the ability to let you add a Static Route, so that packets to a particular destination will ALWAYS go out a particular gateway. This can help a bit because if you are in, say, Virginia, you will be able to tell windows that you always want packets destined for your friend in Texas to go out the gateway in Atlanta, as opposed to the gateway in New York.
This is done with the "route add"
command through a dos prompt. You can type in:
route add /?
For more information on how to do this.
Remember that these routes WILL NOT survive a reboot, so if you do something wrong, and the network stops running, reboot and it will be gone. Mind you, should you want to permanently add a route, there are ways to do that as well, though it a bit more involved.
I should point out that, even now, most new games were designed to be played over lans or dialup internet access. High speed internet connections aren't the primary system they were optimised for. As a consequence, some games (Falcon 4 comes to mind) are particularly poor at rates above 33.6kbps!
In Falcons case it has more to do with coding issues and the way the game engine updates things, particularly in campaign mode. But the point is, the more data you (and other players) send to the server, the more time it takes to send, be processed, and be returned.
For me, I'm currently playing the heck outta Half-Life /CS. And I've noticed that I seem to do better (not always, but frequently) when I have my rate set to that of a dial up connection as opposed to a cable modem. This seems to be especially true in larger games (up to 20 players) where there's a large amount of updating being done. I've actually seen how changing my rate took me from a very choppy (really unplayable) game to a smooth game.
In the end, you will have to find the combination that works the best for you and your connection, but it is important to remember that sometimes, less, is more.
Regards,
-Bouncer-
------------------
"Yeah Baby, YEAH!!!"
[This message has been edited by Bouncer (edited 02-11-2000).]
This is going to almost be an article. (LOL)
Two things have to happen for good online gaming. One, "Latency" needs to be minimised. Two, "Packet Fragmentation" needs to be minimised. In short, properly sized packets need to be sent.
Easy nuff, right?
Muuuuuuuuahahahaha...ahem. Dream on, young Jedi. http://www.speedguide.net/ubb/wink.gif
Let's talk about the three main issues to online gaming. Latency, Fragmentation, and Retransmits.
Latency:
"Latency", is the time it takes for a packet to get from you to someplace else. The lower the number, the lesser the time, the better. We'll come back to this.
Fragmentation:
Packet "Fragmentation", is what occurs when a packet is too large to be processed. It's broken down into smaller packets that CAN be processed. This, takes time. Remember how we don't want to lose time to anything? PF wastes a lot of it.
Retransmits:
Sometimes, when fragmenting a packet, or for other reasons, errors occur. When this happens the system drops the packet. Poof. Gone. So NOW, the system asks for another one, and sends that request. This is called a "Retransmit". Your system bundles up the info and sends it back. This takes lots of time. This technically known as a: "bad thing"(tm).
What to do?!
We need to start thinking about properly sizing packets.
Properly sizing packets, means optimising YOUR system for what you're dealing with on the OTHER end. If you have DSL, and the other end is 56k, then you need to set YOUR in-game comm rate at 56k.
Otherwise, you will be sending packets that are too large for the server at the other end (the one running the game) and you will get packet fragmentation. The 56k line simply CANNOT deal with your DSL/cable sized packets, so it fragments them. If it drops one during this, it then ALSO asks for a retransmit. Your system responds and sends the info.
The system says:
"crap, ANOTHER oversized packet from that doofus with the cable/dsl!"
And fragments it so that it can deal with it. It then processes the packet and informs you that his bullet arrived first and you are now a statistic. So there. This is why fragmentation/retransmits are the Darth Maul of gaming. badBadBAD!!!
Combined, these both increase latency, sometimes dramatically. Latency though, can be most noticed in games when it comes and goes. This can usually be seen in Ping Spikes. "Ping Spikes", are where you're playing a game and suddenly it takes a LONG time to get info back, or frames start stuttering. That's almost always because something is temporarily causing packet fragmentation or loss, and the latency is fluctuating wildly. If you were to graph this through continuous Pinging, it would look like a series of spikes, almost like a heartbeat monitor in a hospital, thus, Ping Spikes. If it gets bad enough, in a desperate attempt to get caught up, the system will just drop a group of packets, and WHOOSH..that guys you were fighting will warp right by you, and oh, btw, you're now dead.
Starting to get confused and or annoyed?
Let's back up a second and imagine how this works from a different perspective. A good way to visualize all this is by thinking of the postal system. No, not "going postal", the postal system. :Þ
Let's imagine that a 56k packet is the size of a letter. Now obviously, that letter is easier for the postman (network) to carry than a 640k packet, which is roughly 12 times larger. A BIG box.
On the other side, is a mail slot (game server on a 56k connection). The letter can be slid right through the mail slot, but the box is too big has to be torn down into itty-bitty chunks. If a letter is lost, it's less stuff that has to be resent. If the box is lost, you have to get all that data together again. Which takes more time.
Now, obviously, the box is a more economical way to move data, because you can move a bunch of it at once. BUT, the letter is less likely to be lost, more likely to not have to be altered at the other end to be processed (fit through the mail slot), and if it IS lost, it's easier to gather up the info and resend it.
As a consequence, because what we want is the fastest UPDATING AND RETURN of data, not necessarily the fastest raw download, it starts to become more desireable to move data in smaller, more compatible sizes.
There is a another factor that I've not really mentioned yet. Well, two, actually. "Default Gateways", and "Static Routes". We're moving into the realm of tweaking now, so experimentation will be necessary.
Default Gateway
The "Default Gateway" is the route that you by default use to access the internet. Easy enough right? Well..no. See, there's two sides to this. On the one side, your default gateway is the router you first connect to. On the other, it's the router that connects out to the internet. These are frequently two different devices.
As a result, finding a fast default gateway can make things faster and decrease latency. The reason for this is that you will still physically go out your directly connected router. After that point though, if you set a different default gateway THAN that router, the packets will be forwarded to THAT default gateway to reach the internet. Like so:
Before change:
You >>> first hop router >>> whatever is available to get out to internet (might be a T1)
You >>> first hop router >>> specific gateway to internet (might be a T3!)
You see the advantage I'm sure.
Now, obviously the key is to find out what gateways are available to you. Look for mapping programs, or trace programs. Run a series of traces, and see what addresses one or two hops away tend to pop up a lot. Those are gateways. If you can remove even one hop out of your path, you can reasonably expect the latency to go down by anywhere from 10-50ms.
Static Routes.
A "Static Route" is simply a set path to a destination.
Windows, has the ability to let you add a Static Route, so that packets to a particular destination will ALWAYS go out a particular gateway. This can help a bit because if you are in, say, Virginia, you will be able to tell windows that you always want packets destined for your friend in Texas to go out the gateway in Atlanta, as opposed to the gateway in New York.
This is done with the "route add"
command through a dos prompt. You can type in:
route add /?
For more information on how to do this.
Remember that these routes WILL NOT survive a reboot, so if you do something wrong, and the network stops running, reboot and it will be gone. Mind you, should you want to permanently add a route, there are ways to do that as well, though it a bit more involved.
I should point out that, even now, most new games were designed to be played over lans or dialup internet access. High speed internet connections aren't the primary system they were optimised for. As a consequence, some games (Falcon 4 comes to mind) are particularly poor at rates above 33.6kbps!
In Falcons case it has more to do with coding issues and the way the game engine updates things, particularly in campaign mode. But the point is, the more data you (and other players) send to the server, the more time it takes to send, be processed, and be returned.
For me, I'm currently playing the heck outta Half-Life /CS. And I've noticed that I seem to do better (not always, but frequently) when I have my rate set to that of a dial up connection as opposed to a cable modem. This seems to be especially true in larger games (up to 20 players) where there's a large amount of updating being done. I've actually seen how changing my rate took me from a very choppy (really unplayable) game to a smooth game.
In the end, you will have to find the combination that works the best for you and your connection, but it is important to remember that sometimes, less, is more.
Regards,
-Bouncer-
------------------
"Yeah Baby, YEAH!!!"
[This message has been edited by Bouncer (edited 02-11-2000).]