Fixed values of snaps maxpackets and rate

38 replies [Last post]
0MS
Offline
Joined: Apr 2010
Posts:
Re: Fixed values of snaps maxpackets and rate

// rate command

// if the client is on the same subnet as the server and we aren't running an
// internet public server, assume they don't need a rate choke
if ( Sys_IsLANAddress( cl->netchan.remoteAddress ) && com_dedicated->integer != 2 && sv_lanForceRate->integer == 1) {
cl->rate = 99999; // lans should not rate limit
} else {
val = Info_ValueForKey (cl->userinfo, "rate");
if (strlen(val)) {
i = atoi(val);
cl->rate = i;
if (cl->rate < 1000) {
cl->rate = 1000;
} else if (cl->rate > 90000) {
cl->rate = 90000;
}
} else {
cl->rate = 3000;
}
}

mow Q [EN]
Offline
Joined: Nov 2003
Posts:
Re: Fixed values of snaps maxpackets and rate

so, this means if rate is bigger than 90000 clients get handled by server with 3.000? Sry, i am not a coder, but this would explain the lag of clients on a server which offers a rate of 25.000 which would be too much for a client with a rate of 3.000.

Otherwise please explain what this code actually means for normal humans who have no idea of coding.

D3L1GH7
TanaKa's picture
Offline
Joined: May 2010
Posts:
Re: Fixed values of snaps maxpackets and rate

HAHA! WHY?

Seriously, no.

Refresh memories :

\rate
This setting controls packets to ensure a good connection. If you have an ISDN modem ( 128K ) then this can be set to around 12000. If you have a 56K modem then this should be around 4000-5500 depending on your connection speed. If you are on a LAN or have a ADSL modem then this can be around 25000 or perhaps even higher. Remember, it is best to experiment to find a suitable number but don't get too carried away or you may cap performance.

\snaps
This is possibly the most important setting for getting a good connection. As everyone knows, in Quake 2, your gameworld updates depended on your current FPS so slower computers were at a disadvantage. Now, in Quake 3, your snaps setting determines how many updates you recieve from the server. 56K modems should have a setting of around 20 - 30. ISDN modems (128K) should be around 40 as should any other fast connection devices ( LAN, T1 etc.... ).

\cl_packetdup
As the name suggests, this setting is used to send multiple packets to compensate for lost packet drops. This setting should be set at 1 unless you have a good connection (no lost packets) in which case set this to 0.

\cl_maxpackets
This setting puts a limit on the maximum amount of packets that can be sent to the server via the client. This setting is useful for people with slower modems. The default setting is 30 ( comparable to a 56K modem), but lower this if you have a 33.6K modem or less, and higher this setting if you have an ISDN or higher modem.

But remember, with \cg_lagometer "1"
"The first line displays the conjunction between your graphics card updating the frames in sync with the gameworld updates recieved from the server. Idealy, this should be a straight blue line. If it has bouncing yellow spikes then your display will stutter and be more difficult to view. To combat this, first ensure you have followed my tweaking techniques and then change your snaps setting. Usually, this means lowering it by 1 or 2 until your screen is stable and you have a nice flowing blue line in your lagometer. The second line shows if packets are being recieved from the server. This should be green. If it is yellow or red, try increasing your rate or try lowering your snaps."

"Skill is when luck becomes a habit".

0MS
Offline
Joined: Apr 2010
Posts:
Re: Fixed values of snaps maxpackets and rate

1000 < rate < 90000 ( 99999 for LAN )
20 < snaps < 30
15 < cl_maxpackets < 125
-30 < cl_timenudge < 30

mow Q [EN]
Offline
Joined: Nov 2003
Posts:
Re: Fixed values of snaps maxpackets and rate

oh, ok thx for the translation.

I am pretty sure that this cvars don't cause lag because of high setting.

FranK
frank's picture
Offline
Joined: Jan 2011
Posts:
Re: Fixed values of snaps maxpackets and rate

i thought online rate was capped by engine at 25,000 anyways

"Beauty can cover a multitude of sins. But underneath, we all look exactly the same."

Frank Breitkopf :- no way out

rUnThEoN?!
Site administrator
Skullheadq3's picture
Offline
Joined: Dec 2005
Posts:
DE Germany
Re: Fixed values of snaps maxpackets and rate
FranK wrote:

i thought online rate was capped by engine at 25,000 anyways

exactly.

Online you will never get rate above 25000 except if you play on a modified server, where you however, still just get as many rate as you need, so even if it is on 193500 you just get as many as people are around. Remember, for a 1on1 3000 would nearly work out.

About snaps -> =sv_fps or more as mow stated.

About cl_maxpackets -> depends on client connection and fps.

Even if you enforce 125 maxpackets, if someone has maxfps of 100 or 63 or 60 (blah blah ati drivers buggy shit blah nub whatever, don't read here, read it up elsewhere) the person will just send as many packets as fps.

So we can't enforce a rate down to 25000 because it has no sense (lower does make sens, but it is overall already forbidden Tongue ).

We can't enforce higher snaps because snaps do not alter how you are displayed to other people on server and on sv_fps 30 everyone gets enough snaps anyways, also its in clients interest to get as many snaps as possible.

We can't enforce maxpackets because of limited connection (discrimination) and zero sense considering maxfps. Also for rank/pb games maxpackets are at least forced to 63 which gives over 90%? (didn't measure it sorry Tongue ) accuracy considering the sv_fps of 30. So any miss on a person with that amount of maxpackets is mostly because failed at tracking, however due to this inprecision being stable, you have same amount of luck to actually hit that guy eventhough it should be miss.

Aj, so overall, great suggestion nosia, I am totally f1!... nooot

edit: Now to get it a bit more precise, Imo nosia either describes an general effect (if I think I am right) but explained it wrong.

However Nosia might also just complain because he stopped getting better and searches the source of it.

Anyways, I wonder about one very odd thing.

Back in 1.03 or 1.02b, when you run a localserver with sv_fps 30 and played on it with rate 25000, maxpackets 125 and snaps 125, you have just blue spikes on top of your lagometer.

In newer versions of E+ these blue spikes are interrupted by yellow eventhough connection to loopback adapter is perfect, reason?

Edit2: Now goes even funnier, sometimes I have yellow spikes on local and sometimes I don't D: if I run dedicated I don't for example, if I run just 1 q3 I have spikes. Smug

hurrenson: "This idiot is apparently not familiar with a rail/sniper style."

You Fuckers
Blasphemy's picture
Offline
Joined: Sep 2010
Posts:
Re: Fixed values of snaps maxpackets and rate
eXtreme.nosia! wrote:

I know one! That ppls with good conection put rate 193500 and snaps 125. This ppls can see and kill faster than i see them. and when im try to aim him he is lagging! its fact! This lags make hard to hit him. U can make test and u will see. And second i think ppls who have bad connection not more than 10 % of all ppls.

bullshit. Sometimes my snaps and rate automaticcaly set on these value and it is much much much much worse for me to play so that when i realize i put back 25000/40

The bullet hole looks so right in your head,
like it'd been missing all along.
The blood streaked across your face
like some twisted lover's deformed lipstick trace.
Staring at your reflection
wondering how you're still alive.
Wondering if she's somewhere laughing,
deciding whether to let you die.

"if one has to be scared to lead a decent life his weakness is obvious" (cit.)"I do not hunt freaks, freaks hunt me" (cit.)"Lady, – he whispered with concern, your
eyes are so empty" (cit.)

METEORKID
Forum moderator Rank moderator
Meteorkid's picture
Offline
Joined: Feb 2010
Posts:
Re: Fixed values of snaps maxpackets and rate

If you say yes you clearly don't no anything about what these cvars actually do or why they exist. maybe yes if everyone lived in the same place with the same internet i would say yes but seriously this is just stupid.


seus
Offline
Joined: Aug 2010
Posts:
Re: Fixed values of snaps maxpackets and rate

lol.... just a big fucking lol....
diff' rate snaps and shit as a hack... Big grin
or is it just b'cuzz 'sometimes' player with rate 25 k can't hit fast as a motherfuker player with rate 125 k ?
all my life I thought shitty providers makes us lag.... My cfg is my bussines... mind Ur own then. Happy

The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he who, in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who attempt to poison and destroy my brothers. And you will know my name is The Lord when I lay my vengeance upon thee.