snaps

Discussion for Bani's Tournament Mod

Moderators: Forum moderators, developers

Post Reply
gh3
Posts: 1
Joined: Mon Sep 13, 2004 8:49 am

snaps

Post by gh3 »

hi, in the last few days i read a lot about this cvar.

lots of ppl agree with the best & unique value for this var is 40, other ppl agree with the idea that snaps should be set 20.

are we behind a sort of conflict?

i dwnl et sdk, and i tried to take a look inside them.
i have understood that snaps cvar works as interpolation amount data, so a client has to receive 20 or 40 "packets" before starting a data interpolation that permit you to see your pg moving on your monitor.

server var sv_fps is locked to 20, so server is able to send 20 packets to each client every time, so why ppl have to put snaps 40? they will have 2 receive two group of 20 packets from the server before start interpolation, so i think it will be a little delay ( very little ) but it could give probs ( like no hitting shots and going on )

so i'm pleased to know what's your point of view about it.
why not to force snaps value to 20 directly in etpro?
User avatar
ReyalP
Posts: 1663
Joined: Fri Jul 25, 2003 11:44 am

Post by ReyalP »

You have seem to have misinterpreted the meaning of snaps. Snaps tells the server how many snapshots per second you want to get. A snapshot is the data required to represent the world. The server sends at most one per server frame. This should make sense, since the data required to construct the snap is only caclulated once per server frame. Your client tries to interpolate between the two most recent snaps (and failing that, extraplolates from the most recent one).

In theory, having snaps over sv_fps has no effect. It should be exactly the same as having snaps == sv_fps.

Note that both snaps and sv_fps control stuff in engine code, so looking at the gamecode won't tell you the whole story.

FWIW, I have at times felt that snaps 40 does have some effect, but common sense says it shouldn't, and I haven't found verifiable difference. It certainly doesn't cause twice as many snaps to be sent.
send lawyers, guns and money
nedd3h
Posts: 67
Joined: Fri Jan 14, 2005 12:52 am
Location: Australia
Contact:

Post by nedd3h »

Is there a negative to forcing clients to have snaps of 20?
GameArena give a range of 1 - 20

Code: Select all

command "sv_cvar snaps IN 1 20"
Some complain that there is an exploit where braodband users use low snaps values. Is this true?


(sorry for the bump, I was searching for something and found this thread... just curious)
User avatar
gotenks
Posts: 3465
Joined: Fri Nov 15, 2002 4:12 pm
Location: out of my mind
Contact:

Post by gotenks »

there is no advantage to a client using snaps other then 20, infact it's quite damaging to use a non 20 multiple (20,40,etc) but anything over 20 is useless
My Website
Image
After a night of binge drinking:
=FF=im2good4u wrote:WTF wanst i on top ?
User avatar
ReyalP
Posts: 1663
Joined: Fri Jul 25, 2003 11:44 am

Post by ReyalP »

gotenks wrote:there is no advantage to a client using snaps other then 20, infact it's quite damaging to use a non 20 multiple (20,40,etc) but anything over 20 is useless
Lower than 20 is useful if you are on a very slow connection (dialup). There is probably no reason to allow less then 10, but from my testing even snaps 1 didn't make you much warpier on other peoples screens. It is unplayable for the person using that setting.

Note that the difference between 20 and 40 has been explained since I made the post above. Essentially, snaps 40 on a server with sv_fps 20 can confuse rate limiting, causing you to get rate limited before you really need to be.
send lawyers, guns and money
bacon
Posts: 549
Joined: Sat Apr 19, 2003 9:34 pm
Contact:

Post by bacon »

Code: Select all

// snaps command
	val = Info_ValueForKey (cl->userinfo, "snaps");
	if (strlen(val)) {
		i = atoi(val);
		if &#40; i < 1 &#41; &#123;
			i = 1;
		&#125; else if &#40; i > sv_fps->integer &#41; &#123;
			i = sv_fps->integer;
		&#125;
		cl->snapshotMsec = 1000/i;
	&#125; else &#123;
		cl->snapshotMsec = 50;
	&#125;
Snaps = 40 has no effect.
User avatar
ReyalP
Posts: 1663
Joined: Fri Jul 25, 2003 11:44 am

Post by ReyalP »

Where is that code from ? What I see for quake3 (code/server/sv_client.c:SV_UserinfoChanged) is

Code: Select all

	// snaps command
	val = Info_ValueForKey &#40;cl->userinfo, "snaps"&#41;;
	if &#40;strlen&#40;val&#41;&#41; &#123;
		i = atoi&#40;val&#41;;
		if &#40; i < 1 &#41; &#123;
			i = 1;
		&#125; else if &#40; i > 30 &#41; &#123;
			i = 30;
		&#125;
		cl->snapshotMsec = 1000/i;
	&#125; else &#123;
		cl->snapshotMsec = 50;
	&#125;
send lawyers, guns and money
Post Reply