How to Really Remove Those Pesky Lags for Dial Ups
Article by [V[f]X]Medina Aryeh (retired)
All credit should go to [ph]MaSTeR SuIcIdE

During one day, I manage to get a pep talk with Pinoybattle.net's master tweaker - [ph]MaSTeR SuIcIdE. We talked about a lot of things - Reminiscing the past, old players that had disappeared, new players coming in and such. Until we manage to come about with a very sensitive topic. The one that keeps popping out in every modem users. The lags. I used to experience such of these when am still using Dial-Up Connection. I asked the Master if he can share his views on how to relieve this problem, and he told me that he would email me the details. I thanked him and sure enough he did email me the details.

UPDATE (August 4, 2002)

The Master have written me an email once more. He reasoned out that the letter he had given before was pretty outdated. He made a lot of changes over the tweaks. So for the old schools who had used this - its better for you to make some revisions - for the first timers - you're in good hands now. ^_^

Maximum Lag Tolerance for Modem Players
By MaSTeR SuIcIdE

Last Updated: August 1, 2002

    Author's Note: My apologies for not updating this article. I only found out that it was outdated when I read this article again and compared it to the existing settings I use to play on the net. I have made minor corrections to this article, and added a new command: cl_cmdbackup. Read on and find out more.

    Many die hard and novice CS players have a common enemy: PING! And since many players use 56K modems, it is often difficult to have a ping of 150-250, which is the optimal ping for most 56K modems, especially for servers that are far from the player's location. For those playing in Pinoybattle, even though you are using Pinoybattle's prepaid cards, it isn't enough. Some people opt for cable modems, but it is not a very practical solution (big monay required!). Many modem players give up because of this.

    This article aims to help the poor and repressed (in terms of ping and connection rate). I am not making any guarantees to its effectiveness. I am assuming that all of you who reads this article know the basics of the console and know how to make an autoexec.cfg. Take note that I am not an expert! All of these are based on what I have learned and experienced throughout my life as a computer addict (HAHAHA!!!). If there are any inconsistencies or wrong info in this article, email me immediately. Read on to find out how to tune up your modem and Half-Life to get the most out of every...

PING!

The Major Problem: Not in the connection rate!

    Many people using modems believe that a higher connection rate means less ping and greater performance. It IS a proven fact, however that is not always the case. Many people overlook the following details:

1. Throughput. This is a major cause of lag. No matter how high your connection rate is, you'll still be getting that damn cl_flushentity packet if there is no consistent throughput. Games like Half-Life and Quake use very little bandwidth. If you enable the net_graph setting for Half-Life (type net_graph 3 on the console to monitor data transfer without the graph), you would see that the data comes in at 1.0-1.5 kbps at 28.8 kbps, while a typical 28.8 kbps connection can go up to 2.8-3.0 kbps! Inconsistent throughput can be caused by:

a. Line quality - if the line quality is poor, it can cause corrupted data to be resent again which will result in additional resending of data and thus throw you out of sync with the server.

b. Amount of incoming data - can cause you to go out of sync with the server, especially if the server has many players.

c. Modem - modems are made differently, and are normally configured to get the best data transfer rates. I won't discuss it here. For info on tuning up your modem, go to www.3dspotlight.com.

2. Modem Compression. This can cause additional lag because of the fact that it takes additional time to compress and decompress data. If you think about it, will it really make that much difference? Theoretically, yes! That few milliseconds of compression/decompression will increase lag. Practically, it will vary.

3. Connection Rate. This is the common knowledge: a higher connectivity will give less ping and greater response. This has been well founded. Like they say, "In every rule, there is an exception." For modems, remember that the higher the connection rate, the more likely to have data errors. And everything else follows.

 

So...WHAT THE HECK DO I DO?!?!?! 

    Even with all the modem optimizations, it is not a guarantee that you won't get lagged or improve your ping. Many people overlook one thing: Half-Life's own net code! The net code has been greatly improved, and now it offers voice communication even at low connection rates. Before tweaking Half-Life's netcode, let's start from the hardware: the modem.

 

Modem Tweaking

    Modem tweaking has been the very first thing anyone would tell you to improve gaming performance. Unfortunately, each modem manufacturer has its own set of commands. As a result, it is hard to tweak a modem without proper documentation.

    Because of the differences of commands for each modem manufacturer, I will simply list the description of the commands you need to look and their appropriate setting.

Load Hardware Control Template (Your starting template)
Enable Hardware Control
Disable Data Compression
Disable V.42 error control
Disable Autoretrain

    Take note however, that when these settings are in effect, it is almost impossible to surf the net! I recommend using these settings when you'll be playing, then remove them when you surf the net.

    As an example, here is the modem initialization string I use when playing in PB, which follows the order of commands stated above. This is only applicable to D-Link DFM-560EL or similar D-Link modem only:

AT&F1&K3%C0\N0*H0

    For additional info on modems, check out http://www.3dspotlight.com and http://808hi.com/56k

 

Tweaking Half-Life

    As a result of my continuous research, headbanging on the wall, continuous & habitual reformatting, and the destruction of my 1st modem (yiiihaaaaa!), I now give you how to tweak Half-life's settings for maximum lag tolerance! Below are the commands to tweak and a few explanations about each. All of them (except rate) were taken from www.3dspotlight.com

cl_allowdownload "x". A value of 1 for x enables downloading of maps/models/decals when joining a server. 0 disables this.

cl_allowupload "x". A value of 1 for x enables the uploading of Maps/Models/Decals when joining a server. 0 disables this.

cl_cmdbackup "x". With each command packet sent, we re-send the last few previous movement commands (in case there is packet loss) so that we can keep moving smoothly in the face of minor network problems. The default number of "backup" commands that we send is 2. You can send more than 8 backup commands & you should note that sending backup commands will increase your outgoing bandwidth usage.

cl_download_ingame "x". A value of 1 for x enables downloading during a multiplayer game.

cl_gaitestimation "x". Setting x to 1 enables estimated player movement motions, 0 disables this.

cl_nopred "x". Setting this to 1 disables client side prediction, 0 enables the prediction.

cl_resend "x". This sets how many times a packet may be resent if it fails.

cl_cmdrate "x". This sets the maximum amount of packets that get sent to the server per second. The default setting is 30.

cl_updaterate "x". This sets the maximum amount of packets that get sent from the server per second. The default setting is 20.

cl_lw "x". When x is set to 1 weapon firing animations, sounds, etc. are played client-side at the time the weapon is fired. When set to 0 these events are delayed until the server conveys the event data back to the client.

cl_lc "x". When x is set to 1 this sets that you are requesting the server you are connected to performs server-side lag compensation.

cl_lb "x". When x is set to 1 client-side weapons will predict their own blood trails when other players are hit. When set to 0 the server does this, which is more accurate at determining hit locations. If cl_lc "0" this setting is ignored. I'd recommend setting this to 0, particularly with inaccurate weapons.

rate "xxxx". This tells Half Life exactly how much data it should be trying to download from the server at any given time, which is extremely important. This setting might have to be changed on the fly depending on how bandwidth fluctuations and the like, so keep this one in mind if you're experiencing in game lag - often times a quick change makes a big difference. Modem users will want to set their rate in the 2,500-4,000 range, broadband anywhere from the 4,000-20,000(for T1 size lines) depending on the quality of your line.

    Now that we all have an understanding about what each setting does, we can tweak this settings to our taste. Note that these are for modem players only. Those using cable modems need not bother with the settings. I have placed this settings on my autoexec.cfg because from my experience, Half-Life sometimes returns some of the settings to default when exiting. Below are the settings that I use:

   cl_allowdownload "1"
    cl_allowupload "1"
    cl_cmdbackup "1"
    cl_download_ingame "0"
    cl_gaitestimation "1"
    cl_nopred "0"
    cl_resend "2"
    cl_cmdrate "10"
    cl_updaterate "10"
    cl_lw "1"
    cl_lc "1"
   
cl_lb "0"

    bind "]" "rate 2500"
    bind "[" "rate 1500"
    bind "p" "rate 1000"
    bind "o" "rate 500"

    As you can see, cl_cmdrate and  cl_updaterate are way below the default values. It took me some time to determine the best values for these two. Also, I have assigned four keys where I can change the rate depending on how lag it is. If there are many players, I set my rate to 500, if there are few, I set it to 2500. With these settings, I can play even at a connection rate of 24 kbps, a ping of 180-280, and an almost full server! Not bad!

    I recommend trying these out first and see whether your ping will improve. Depending on the conditions, it will take some tweaking, particularly cl_cmdrate and  cl_updaterate. It would be best to enable the net graph (type net_graph 3 on the console) to monitor the performance of the connection.

Conclusion:

    This solution that I gave may not be 100% guarantee to a better gameplay, and it may not improve gameplay at all. But frankly, it is all worth a try. With the proper tinkering of the hardware and software, ping of deaths can be lowered to a certain degree. For any comments, suggestions, clarifications, or death warrants, email me.