Net CVars Explained

ELK

I made one post
I DO NOT PLAN ON COMPLETING THIS GUIDE IN ONE SITTING SO EXPECT UPDATES

Bandwidth Restrictions

The purpose of bandwidth restrictions is to prevent loss. You may lose multiple updates due to loss instead of the server holding back one.

rate - client requested bandwidth limit in byte/s
size of update/rate = time to wait in seconds before the server sends the update
recommended: 80% of connection
example: 800000 w/ 8mbit(1mbyte/s) internet

net_maxcleartime - client demanded maximum amount of time, in seconds, that rate can hold an update back
This setting is VERY useful for server's using bad sv_maxrate settings.
recommened: only on servers with restrictive sv_maxrate settings or if internet speed is 10mbit+
example: everyone is lagging because the server uses sv_maxrate 30000 but you're not because you have net_maxcleartime 0.01 (This is so fun to do)

net_splitrate - client demanded max packets per server frame received
roundup(net_maxroutable/size of update) = how many frames to send the update across
recommended: 13
example: 13*net_maxroutable*66tickrate > 1,048,576 (highest rate possible)

net_splitpacket_maxrate - same as rate except for split packets which may result in more overhead data
recommended: 80% of connection
example: 800000 w/ 8mbit(1mbyte/s) internet



Update Rate & Command Rate
You already know what these do, but 66 tick servers are actually 15ms tick time (66.666... continuous)

cl_updaterate - client requested updates/s
1/updaterate = time to wait in seconds before the server can send an update
recommended: 1000, hopefully the server is using at LEAST sv_maxupdaterate 67 if 66 tick.
Servers cannot send more updates than they are making so you could use 1000 on a 66 tick server.

cl_cmdrate - client requested commands/s
1/cmdrate = time to wait in seconds before the client can send a command
recommended: 1000
example: 66 command rate on a 66.666..tick server results in every 100th command not reaching the server until the next tick (as if cl_cmdrate was 33.333333)



Input Prediction
Input Prediction

cl_predict
recommended: 1

cl_smooth - corrects input prediction errors smoothly (rubberband instead of snappy teleport)
recommended: preference, see cl_smoothtime

cl_smoothtime - how long, in seconds, input prediction errors are smoothed
recommended: 1 server tick
example: 0.015 on a 66 tick server

Lag Compensation
Lag Compensaiton
Due to poor coding the amount of client view interpolation is rounded to the nearest tick.
For example, if your cl_interp was 0.022 the code will end up with 0.015 requiring shallow pointing, or 0.023 ending up 0.030 requiring to shoot where the enemy "was." Both considered bad hit reg. I want to click the heads.
// calc number of view interpolation ticks -1
int lerpTicks = TIME_TO_TICKS( player->m_fLerpTime );

// add view interpolation latency see C_BaseEntity::GetInterpolationAmount()
correct += TICKS_TO_TIME( lerpTicks );

#define TIME_TO_TICKS( dt ) ( (int)( 0.5f + (float)(dt) / host_state.interval_per_tick ) )
#define TICKS_TO_TIME( dt ) ( host_state.interval_per_tick * (float)(dt) )



Interpolation
 
Last edited:
3x.gif
 
So... what am I supposed to do with this information? What do I need to put in my autoexec in order to better click heads lol
 
Back
Top