Correcting your rates | CS Tutorial #3 [By: Shroomish] - Printable Version +- Support Forums (https://www.supportforums.net) +-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87) +--- Forum: Life Support (https://www.supportforums.net/forumdisplay.php?fid=12) +---- Forum: Video Gaming (https://www.supportforums.net/forumdisplay.php?fid=47) +---- Thread: Correcting your rates | CS Tutorial #3 [By: Shroomish] (/showthread.php?tid=13808) |
Correcting your rates | CS Tutorial #3 [By: Shroomish] - Shroomish™ - 11-17-2010 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.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: // || 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. RE: Correcting your rates | CS Tutorial #3 [By: Shroomish] - Marikftw - 11-23-2010 Great guide, Shroomish. Good job. |