Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Correcting your rates | CS Tutorial #3 [By: Shroomish]
#1
Intro:

Client rates and server rates go hand in hand with how they interact with each other, so it is important to know: a) What CVARs do. b) Which CVARs are for client and which are for Server.

Here is a list and explination of the CVARs:

Server-Side CVAR's

Most server CVARs have the prefix of sv_ , but then there are a few that don't.

"sv_minrate": Sets the "floor" for the lowest client minrate allowed. Will force client's minrate up to the minimum if it is too low. (Rate is bytes/sec)

"sv_maxrate": Maximum rate allowed. (Rate is bytes/sec)

"sv_maxupdaterate": Specifies the maximum number of packets per second a server is allowed to send. Note, setting the client’s “cl_updaterate” above the server’s “sv_maxupdaterate” value will not increase the amount of updates you receive.

"sys_ticrate": Here's the big CVAR that impacts gameplay more than anything else. Sys_ticrate is a measure of how fast commands execute on the server (“Frames Per Second” of the server), and it VARIES with the server's FPS rating. The more FPS the server handles, the better the registry and gameplay. The HL Engine is limited to 1000fps max. To achieve high-ticrates your system must be using a high-resolution timer (or something else along those lines, server providers have their own ways; this can be achieved by idling something like Windows Media Player). By default, your Half-Life server will average 64fps for Win32 based servers and 50fps for Linux based servers. A player can really feel the improvement on a server that is consistently 200+ FPS, but most people will be in heaven at about 512.

Rule of thumb for "sys_ticrate":

sys_ticrate 500 = 250fps
sys_ticrate 1000 = 512 fps
sys_ticrate 10000 = 1000fps (Max)

"sv_unlag": Enables lag compensation for online play. I will explain the difference between unlag and interp later.

Client-Side CVAR's

“cl_cmdrate”: Number of times per second client updates to the server

“rate”: bytes/sec limit FROM the server

“cl_rate”: bytes/sec limit TO the server
“cl_updaterate”:

Jon Mellin states that
Quote:It has long been thought that the prescription for cl_updaterate was to start at 101 and work your way down until you receive and acceptable amount of “choke.” Choke can be viewed by using the command net_graph 3. Personally, choke is the last thing on my mind. The best value for cl_updaterate is much more complicated. The CAL server side config provides for an sv_maxupdaterate of 101, so one may conclude that your cl_updaterate should be set to 101. Ideally, this is correct, but in reality is not very useful. Most servers you will play on in North America won’t be able to calculate 100 frames per second; this means that there is no way the server can send out 100 updates per second. Therefore, a value of cl_updaterate 101 will tell your client to use ex_interp 0.009, but you won’t actually be receiving 100 updates per second, so the players will appear choppy. Since there is no way to determine a server’s fps without rcon (again use rcon stats), the optimum value is somewhat of a guessing game. You might say, “Well, just set cl_updaterate to 101 anyway and I’ll receive the maximum number of packets the server can send.” The problem here is the disregard of cl_updaterate’s effect on ex_interp and the delicate balance that must be maintained between them.

To find your optimum value of cl_updaterate (remember to set ex_interp to 0), start at 101 and work your way down until the models only slightly skip around. “Slightly skip around” is a matter of preference, as long as ex_interp equals 1/cl_updaterate, the models will be in the right place. You will need to readjust your cl_updaterate on a per-server basis. Don’t be afraid to use a value under 50, if necessary. The prediction engine will do its job. Note: most public servers will be using the default sv_maxupdaterate value of 30, so cl_updaterate 30 will work best in that situation.
Please note that starting from a low value of cl_updaterate (such as 20) and working your way up will not work. Once you increment cl_updaterate to a higher value, the ex_interp will not reset itself automatically; you will have to manually type ex_interp 0 again and again. Here is a convenient script I’ve written for adjusting cl_updaterate easily:

“ex_interp”: This is the godfather of controversy and misunderstanding in all of the Half-Life mod world. Here is a decent post I made a while ago on the CAL forums.
Well, think of it this way:

Quote:Interp calculates all possible player positions that said player could be. Now, you control how much your client interpolates by using ex_interp.
So basically: The higher the interp setting, the more CS "guesses" where the other player is. Thats why a long time ago, you could set ex_interp very high and see a player before they were actually there.

Basically, When ex_interp equals:
.01 - Very little "guessing"
.1 - Somewhat more "guessing"
Now as for lag compensation with sv_unlag 1, heres a little experiment you can try.

Play normally for half a scrim, then at the half go into console and set cl_lc 0. That turns off lag compensation for you, and it makes it like back before v1.1 .

Now I'm not sure if this works as good or if it even works like having sv_unlag 0, but it should by what the command is supposed to do.[/quote]

So the next time you jump past double-door on DD2 and get picked, it is because of sv_unlag and interp, not just a persons interp setting.

A good example of interp would be: You shooting your deagle rapidly at someone who is moving around and you are nowhere near their head, and you get a headshot.
So whats the deal? Do you set it high or low? That answer may seem obvious, but it isn’t! The time in between each packet is exactly 1/(the # of updates per second), so this is how long you want your client to interpolate. Adjusting your “cl_updaterate” will automatically adjust your “ex_interp” when ex_interp is set to 0. Therefore it is recommended that you only change your cl_updaterate, and letting Counter-Strike set your ex_interp. This provides for the most accurate gameplay.


Note that ex_extrapmax is no longer used...


Recommended Rates

Screw that eh! You like things easy! Don't want to have to change stuff in console that much! Well congrats, here is a present from me to you. This is my netcode configuration. If you really want I will send you the rest of my config on demand, just PM me. Just place this code in your userconfig.cfg file in your C:\ProgramFiles\Steam\SteamApps\yourusernamehere\c ounter-strike\cstrike folder. (see bottom of post if you do not have one.)

Code:
Code:
// ||
// Network Settings
// ||
rate "20000"
cl_cmdrate "105"
//cl_updaterate "101" ****PLEASE USE CYCLE script****
ex_interp "0"
cl_rate "20000"
cl_timeout "35"
cl_resend "0"
cl_smoothtime "0"

//Cycle script

bind [ "updatexx"

alias updatexx "update101"
alias update101 "cl_updaterate 101; ex_interp 0; alias updatexx update90"
alias update90 "cl_updaterate 90; ex_interp 0; alias updatexx update80"
alias update80 "cl_updaterate 80; ex_interp 0; alias updatexx update70"
alias update70 "cl_updaterate 70; ex_interp 0; alias updatexx update60"
alias update60 "cl_updaterate 60; ex_interp 0; alias updatexx update50"
alias update50 "cl_updaterate 50; ex_interp 0; alias updatexx update40"
alias update40 "cl_updaterate 40; ex_interp 0; alias updatexx update30"
alias update30 "cl_updaterate 30; ex_interp 0; alias updatexx update101"

Basically this will set you up for making the best of any server. By pressing the open bracket key “[“ you will decrease the updaterate down to the servers update rate until there is no orange/yellow dots when you look at net_graph 1 (Click here for explanation). Remember, a majority of pub servers use an updaterate of 30!

How to make a userconfig.cfg :

1) Open up
C:\ProgramFiles\Valve\Steam\SteamApps\yourusername here\counter-strike\cstrike

2) Right click and hit 'New Text Document'

3) Open it up and paste the code in there.

4) Go to Save As and save as "userconfig.cfg" (WITH THE QUOTATION MARKS!!!)

5) Look in the \cstrike folder for userconfig.cfg. If it's there you win, if it isn't you fail.

6) You can set .cfg files to open with notepad by Right Clicking on them > Properties > Opens With > Notepad.
Reply
#2
Great guide, Shroomish. Good job. Smile
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [Tutorial] Halo Reach: How To Get Blue Flaming Helmet Free + Nameplate! [Tutorial] old 20 5,869 11-02-2011, 02:09 PM
Last Post: Detroit
  [Tutorial] How to fix the Red Ring of Death for your Xbox 360 [Tutorial] old 43 11,235 08-18-2011, 02:42 PM
Last Post: Xbox360™
  Making a Userconfig | CS Tutorial #5 [By: Shroomish] Shroomish™ 4 1,761 12-14-2010, 03:04 PM
Last Post: Prior
  Deciphering the Netgraph | CS Guide #2 [By: Shroomish] Shroomish™ 2 1,037 11-23-2010, 12:31 PM
Last Post: jameswilliam
  CS 1.6 Weapon Guide [By: Shroomish] Shroomish™ 7 5,053 11-23-2010, 12:24 PM
Last Post: Marikftw

Forum Jump:


Users browsing this thread: 1 Guest(s)