Tweaking
& Net Code
Other Client Tweaks
Custom.hpk
Custom.hpk is a file in your game directories (example:
half-life/valve, half-life/cstrike, half-life/firearms, etc.). This file
stores the spray decals of your various teammates and nefarious enemies.
This file loads every time Half-Life loads into the game, and unfortunately,
it never automatically empties itself of old, unused decals. As a result,
if you frequent a lot of different servers with a lot of players, this
file can quickly grow in size, anywhere from 5MB to 35MB+! As a result,
load times in Half-Life can be slowed on even the fastest of machines.
If you'd like to decrease your loading times, I suggest you delete this
file (don't worry, Half-Life will make a fresh new one) about every one
to two weeks. This will keep its size down and your load times faster.
Console
CVAR Tweaks
Besides the netcode tweaks mentioned earlier, there
are also numerous tweaks for the graphical engine and game itself. Many
of these only make a tiny improvement on the framerate, so I'll try to
stick to the ones that make a big enough difference to framerate or image
quality to matter.
max_shells X
- The max number of ejected ammo shells that can be seen at any
one time. Once it hits this limit, the other ones begin to disappear (if
they haven't already).
max_smokepuffs
X -
Just like max_shells, only this limits smokepuffs. (Duh :)
gl_texturemode
-
This tells the engine what process to use for texture filtering (Bilinear
/ Trilinear filtering). With most videocards, setting this to a higher
quality value doesn't produce a lot of slow down, and the visual improvement
is worth it.
GL_NEAREST_MIPMAP_LINEAR (Default)
GL_LINEAR_MIPMAP_LINEAR (High Quality)
This can be set to other values, but they
look far worse, and don't improve framerates nearly enough to justify
it.
gl_ztrick X -
This option can be set to 1 or 0, and defaults to 0. This reduces the
accuracy of the z-buffer, which can cause distant objects to flicker in
and out and cause other depth-related inaccuracies. Its benefit is a reduction
of memory bandwidth use. Most recent video cards (TNT1+) aren't taxing
their memory bandwidth that much with Half-life, so it's not likely to
help these cards at all. Older cards can see quite a nice boost however.
cl_himodels X
-
This turns on/off high quality models in the game, at the cost
of polygon power. This improves models in TFC, HLDM, and many other mods
drastically, but it tends to make Counter-Strike screwy. Leave it on 0
in CS, and try turning this to 1 for other games if you have the CPU power.
0 by default.
gl_polyoffset
XX -
This defaults to 4. This setting can cause decals (blast marks and so
on) to flicker in and out of surfaces with some video cards. To fix this,
you can try setting this to 20 to eliminate the flickering. Otherwise,
leave it be.
con_color RRR
GGG BBB -
This nifty CVAR can be used to change the text color of your console text/in-game
text. It works in an RGB method, so con_color 255 255 255 would change
the text to white, for instance. con_color 31 72 127 would change it to
Tweak3D blue. con_color 255 0 0 would change it to red. This one can be
fun boys & girls. :)
Other Client Tweaks (cont.)
hud_fastswitch
X -
Turning this on changes the weapon switching method so that when you press
the number for the weapon slot, it automatically picks it and brings it
up, ready to fire. This is great for Counter-Strike, where Primary, Secondary,
and Knife slots can only have one weapon. For any slot with more than
one selection (for instance CS's grenade slot), it brings down the menu
like normal. This is enabled by default in TFC, and disabled in Counter-Strike
and HLDM.
hud_saytext_time
XX -
This is the amount of time, in seconds, that player chat messages stay
on your screen before they scroll off. Setting this to 20 or so can make
team communication much more effective, as you don't always have time
to notice the messages as they come up. This defaults to 6.
hud_deathnotice_time
XX -
Similar to hud_saytext_time, this is the number of seconds that death
notices stay on your screen. While this is normally 6, setting this higher
can give you more time to notice the deaths of teammates or important
enemies. This is very helpful in team games.
fastsprites X
-
This is a helpful tweak for Counter-Strike. Setting this to 1 decreases
smoke grenade complexity, making it ugly, but much faster. 2 uses a different
method which may be even faster depending on your machine. This defaults
to 0, or off.
hud_fastswitch X
- Turning this on changes the weapon switching method so that when you
press the number for the weapon slot, it automatically picks it and brings
it up, ready to fire. This is great for Counter-Strike, where Primary,
Secondary, and Knife slots can only have one weapon. For any slot with
more than one selection (for instance CS's grenade slot), it brings down
the menu like normal. This is enabled by default in TFC, and disabled
in Counter-Strike and HLDM.
hud_saytext_time
XX -
This is the amount of time, in seconds, that player chat messages stay
on your screen before they scroll off. Setting this to 20 or so can make
team communication much more effective, as you don't always have time
to notice the messages as they come up. This defaults to 6.
hud_deathnotice_time
XX - Similar to hud_saytext_time, this is the number of seconds
that death notices stay on your screen. While this is normally 6, setting
this higher can give you more time to notice the deaths of teammates or
important enemies. This is very helpful in team games.
fastsprites X -
This is a helpful tweak for Counter-Strike. Setting this to 1 decreases
smoke grenade complexity, making it ugly, but much faster. 2 uses a different
method which may be even faster depending on your machine. This defaults
to 0, or off.
- This controls whether or not your computer
will download any files (whether that be maps or logos) from the server.
If the server changes to a map you don't have (which is common), you will
be kicked off. Leaving this to 1 (the default) is highly recommended.
cl_download_ingame
X
- By setting this to 0, your client will not download new logos and so
on as people join the server while you play. This can save you a lot of
pain if you're a modem user with a poor connection. If logo downloading
has ever caused you undue stress, disable this for wonderful relief. It
will still download maps and extra files in between games as they are
needed, however. 1 is the default.
More >>
|
Counterstrike
Tweaking
|
Command Line Options and Config
this Half-Life has some command line
options that allow you to tweak up the game a bit. These
command line options can be entered in the game's shortcut
command line. To reach the game's command line, just right-click
on your Half-Life shortcut and click properties to bring
up this box. In the command line, you can enter the following
options to enable/change certain options:
- connect
This nifty trick allows you to issue
console commands right in the shortcut command line for
Half-Life. This can have dozens of uses. For example, you
could add
+connect zzz.zzz.zzz.zzz:27015
(where zzz... is a server's IP address)
-console
This one is one that everyone should have in their command
line. Besides disabling the annoying intro movies, it allows
you to access the console from the main menu and from in
single player mode. After enabling this, you can open the
console in-game using the ~ key. -32bpp
This option is used to enable 32-bit color in Half-Life.
If you have a good video card or run in high resolutions,
this will allow you to make the most of your excellent hardware.
Note however that 32-bit color can be significantly slower
than 16-bit color. With lots of transparencies on your screen
(the smoke grenade from Counter-Strike 6.5 being a perfect
example), having 32-bit color will multiply the slowdown
caused. We recommend 16-bit for resolutions 1024x768 and
above when seriously gaming. -numericping
This option allows you to see actual ping times to servers
instead of stupid dot ratings in the Half-Life server browser.
Even if you use other game browsers, it's still informative,
and doesn't have any drawbacks. -nojoy
This disables joystick support in the Half-Life engine.
It shaves a little bit off the memory footprint of Half-Life,
so add this if you don't use a joystick.
-noipx
This disabled IPX support in the Half-Life engine, and like
nojoy, it reduces memory use slightly. If you don't use
IPX in your network, add this to your command line. -heapsize
XXXXX
Where XXXXX is, you can place a number, and Half-Life will
allocate that much memory (in kilobytes) for use with the
game. While many recommend setting this anywhere from 75
to 100% of your system memory, I have generally noticed
performance seems much better when Half-Life does its own
memory management. I leave this in the guide for you to
experiment with however.
-game XXXXX
This option can be used to specify a mod folder for Half-Life
to load whenever it is started. -game cstrike for Counter-Strike,
-game firearms for Firearms, or -game tfc for TFC. This
can save you some time if you only play one of Half-Life's
mods. and that shortcut would now connect to whatever server
you told it to (it's great for making direct shortcuts to
your favorite servers!). Here are some other ideas - +exec
mysettings.cfg would exec your custom .cfg file whenever
Half-Life was started, +net_graph 1 would turn the netgraph
on for you. As you can see, this command line option can
be very useful.

Enabling & Reading the Netgraph
The netgraph can feed you useful information on your up/downstream
bandwidth usage, ping, packetloss, framerate, network stability,
and so on. To enable it, open your console, and type net_graph
1. This will enable a small display in the lower right corner
of your screen telling you all sorts of info about your
connection:
1. FPS Counter - Your
current frame rate.
2. Network Latency - This is your current network latency.
Unlike the Ping display on the game scoreboard, this readout
does not count rendering & timing latencies into the
number.
3. Your downstream bandwidth use.
4. Your upstream bandwidth use.
5. This is an animated graph displaying your ever-changing
ping. The higher your ping, the thicker this graph gets.
This also displays your lost packets in red.
6. Your current server update (incoming) rate.
7. Your current client update (outgoing) rate.
You can change the netgraph's position with the CVAR net_graphpos.
Setting net_graphpos to 1, 2, or 3 will place the netgraph
in the bottom right, center, or left section of the screen
respectively. To change the width of the netgraph, use the
CVAR net_graphwidth, which defaults to 192. You can change
the graph's default height of 64 pixels by the CVAR graphheight.
Important Note: The new netgraph creates quite a drain on
framerates. It's important that this be turned off when
you're not testing your connection. If you prefer it turned
on, decreasing its size can improve framerates drastically
when it is on.
|
|
Tweaking the
New Netcode
(Server, These are put in your Config
file)
Server-side commands first. These should
be entered into the console, and only affect the game if it's the
server.
sv_unlag X
This CVAR turns on/off Valve's lag compensation. We suggest that
you leave this on. It helps most people, and those it doesn't can
turn it off individually (see Client-side Tweaks below). 1 for on,
0 for off, this defaults to on.
sv_maxunlag
X.XX
This controls the maximum amount of time (in seconds) that the netcode
attempts to compensate for someone's ping. When set to 1, it will
account for 1000ms, or 1 full second. When set to 0.4, it would
account for 400ms. You don't want to set this any higher than 0.55,
because if a person with a high ping hits someone, the hit will
catch up so late that the game's fun factor begins to drop. I don't
recommend setting it below 0.35 however. This defaults to 0.5, or
500ms.
sv_unlagsamples
X
This determines how many of the client-sent packets are averaged
to find the ping time to compensate for. This defaults to one, meaning
it only takes the most recent packet and uses only that value. Setting
it to 2 would take the 2 most recent packets and average them, 3
would take 3, and so on. This is best left set to 1 or 2, and it
defaults to 1.
Tweaking the new Netcode (Client)
So you understand how the server is
compensating for your lag now, and... what's that? You don't like
it? Well never fear, you can turn it off for just yourself while
others who play better with it can leave it on. Valve has included
many options for you to setup the netcode how you play best. Let's
get started.
cl_lc X -
This tells the server you're playing on whether or not you want
lag compensation. If you find that lag compensation sucks for you,
setting this to 0 will get rid of it for you, allowing you to play
by your latency. This defaults to 1.
cl_lw X -
This controls whether the weapon animations/sounds are played client-side.
If this is enabled (cl_lw 1), then the sounds and animations are
played client-side, the instant you fire the gun (instead of waiting
for the server to confirm it). There are disadvantages and advantages
to this.
If left off (cl_lw 0), you'll see the
gun firing as your lag allows, which also means you'll see the gun
fire in sync with the hits. The problem with this is that if lag
compensation is on, you'll have no bullet marks to adjust your aim
by until it's way too late. This can work against you with random-trajectory
weapons, such as Counter-Strike's AK-47.
The problem with turning it on is that
your machine has to generate the random kick and inaccuracy. As
a result, the bullet marks/kick being shown will likely not line
up with the ones the server is randomly generating. If you're shooting
a highly inaccurate weapon (once again using CS's AK-47 as an example),
bullets that seem to hit might not really hit, and bullets that
don't seem to hit might end up hitting anyways.
We recommend that you leave this on
if you're playing with lag compensation. If you aren't, then turn
it off. This defaults to 1 (on).
cl_lb X -
This CVAR turns on/off blood prediction if client-side weapon-prediction
is enabled. If you're playing a game with weapons that don't have
much random kick, you may want to enable this, but I highly recommend
disabling it in a game with any amount of random kick/accuracy.
Keeping it disabled in these games will allow you to see when you've
scored a true hit. This defaults to 0 (off).
cl_updaterate
XX -
This CVAR controls the number of network updates it requests per
second from the server. It's similar to the "snaps" setting
in Quake3, which the exception that you don't have to set it to
divisors of 40 for optimal results. It defaults to 20.
People with broadband connections might
want to set this to 30-40, but in larger games, 25 or less is recommended.
Modem users should find the best mix of bandwidth usage/smoothness
at 20, but if you are joining large games with a 33.6 or worse connection,
setting this to 15 will cut your bandwidth use enough to keep you
in the game. For those of you gaming on a LAN, 50 is an optimal
setting.
Just to note, choppiness of average
player movement is hard to notice until it's set below 13. The only
times lower update rates become noticeable are when objects in game
move very quickly (for example, a rocket flying towards your face).
cl_cmdrate
XX -
This CVAR is similar to cl_updaterate, but instead of updates from
the server, this controls updates to the server. The separation
of these two allows you to adjust them individually for your up/downstream
bandwidth. This defaults to 30.
Due to the fact that your outgoing
bandwidth doesn't change as much as your incoming bandwidth in large
games, modem users can get away with keeping this CVAR set to 30.
Broadband users will want this set to 40-50. 50 for LAN gamers.
fps_max XXX
-
This is the new all-in-one framerate limiter CVAR for the new Half-Life.
This affects LAN, Internet and Single player play modes. Due to
the fact that setting this high will no longer create lag, I'd suggest
that users set this to its maximum value of 100. This could be changed
to a lower setting if the user wishes to reduce CPU load for some
reason (such as running a dedicated server and client on the same
machine).
rate XXXXX
-
This is an important setting. This CVAR controls how much data your
connection will try to download at any given time from the server.
We recommend:
14.4 Modem Get a new modem
28.8 Modem 2500 to 3000
33.6 Modem 2900 to 3900
56k Modem/1 Channel ISDN 3600 to 5300
2 Channel ISDN 5000 to 7000
Cable Modem 5600 to 10000
xDSL, T1+ 7500 to 20000
LAN (10MBps or 100MBps) 20000
Unfortunately,many onnections are rarely
consistent enough to be able to download at a constant speed. As
a result, you'll frequently find yourself adjusting this in game.
These settings will give you a good general idea of common limitations,
but don't be afraid to experiment in case your connection quality
doesn't fit into "common limitations". :)
To find a setting that works well for
you, keep an eye on your netgraph in the game. If your rate is set
too high, you'll experience unstable ping and packet loss. If it's
too low, your machine will begin dropping net updates to reduce
bandwidth use. It's much better to err on the low side, so be conservative.
cl_allowupload
X -
Setting this to 0 stops your client from uploading any files to
the server, such as your spray logo. This will keep other players
from seeing it, and since it only lags you a little bit when you
join the first time, leaving this enabled is probably fine. This
is 1 by default.
|
News
WWW.SC-clan.org
TOP CS CLAN
|