cl_nodelta

Discussion for Bani's Tournament Mod

Moderators: Forum moderators, developers

User avatar
ouroboro
Posts: 662
Joined: Mon Jul 26, 2004 6:52 pm

cl_nodelta

Post by ouroboro »

Sorry, I know this isn't a Q3 source code discussion forum, but I don't know of any such place and I know smart people live here, so...

Can someone translate this from C to E please?

Code: Select all

// begin a client move command
if ( cl_nodelta->integer || !cl.snap.valid || clc.demowaiting
	|| clc.serverMessageSequence != cl.snap.messageNum ) {
	MSG_WriteByte (&buf, clc_moveNoDelta);
} else {
	MSG_WriteByte (&buf, clc_move);
}
This is the only reference to cl_nodelta in the Q3 source (cl_input.c - line 748). When I set this to 1, the bottom line of my lagometer gets slightly rough, so I wondered what it does exactly. Google says it turns "delta compression" on/off, so I guess I'm asking what that actually means in English, and how it might affect play.

Danke

P.S. I must confess that this question was brought on by the raving lunacy of LilleBror and his asinine cvar checks. :oops:
User avatar
deej
Posts: 743
Joined: Fri Mar 19, 2004 12:44 am
Location: Belgium!
Contact:

Re: cl_nodelta

Post by deej »

ouroboro wrote:P.S. I must confess that this question was brought on by the raving lunacy of LilleBror and his asinine cvar checks. :oops:
LOL he's getting to ya :D.
Our servers now run on 64 bit steroids. Point your ET to:
- Forgotten Ground StopWatch Server with occasional wolfrof 1
- Fraggle Rock ETPub Server - Mix up ET/UT & Duke Nukem
User avatar
Spoofeh
Posts: 296
Joined: Sat Jul 26, 2003 4:50 am

Post by Spoofeh »

This is where it ends up, assuming I read it correctly: sv_snapshot.c, SV_WriteSnapshotToClient()

client->deltaMessage is -1 if cl_nodelta is 1.

Code: Select all

	// try to use a previous frame as the source for delta compressing the snapshot
	if &#40; client->deltaMessage <= 0 || client->state != CS_ACTIVE &#41; &#123;
		// client is asking for a retransmit
		oldframe = NULL;
		lastframe = 0;
	&#125; else if &#40; client->netchan.outgoingSequence - client->deltaMessage 
		>= &#40;PACKET_BACKUP - 3&#41; &#41; &#123;
		// client hasn't gotten a good message through in a long time
		Com_DPrintf &#40;"%s&#58; Delta request from out of date packet.\n", client->name&#41;;
		oldframe = NULL;
		lastframe = 0;
	&#125; else &#123;
		// we have a valid snapshot to delta from
		oldframe = &client->frames&#91; client->deltaMessage & PACKET_MASK &#93;;
		lastframe = client->netchan.outgoingSequence - client->deltaMessage;

		// the snapshot's entities may still have rolled off the buffer, though
		if &#40; oldframe->first_entity <= svs.nextSnapshotEntities - svs.numSnapshotEntities &#41; &#123;
			Com_DPrintf &#40;"%s&#58; Delta request from out of date entities.\n", client->name&#41;;
			oldframe = NULL;
			lastframe = 0;
		&#125;
	&#125;
My interpretation: cl_nodelta turns "delta compression" on/off. :lol:
User avatar
ReyalP
Posts: 1663
Joined: Fri Jul 25, 2003 11:44 am

Post by ReyalP »

SaltehLies.

It chooses whether or not the packets fly on Delta Airlines or not. Delta has decent service(for an American carrier, which doesn't say much unless you are used to Aeroflot or Sudan Air), but is a bit pricey. So you might want to use nodelta unless you have a lot of frequent flyer miles saved up, or generally have money burning a hole in your pocket. Delta compression is what you get when you fly economy class. By the time you get to your destination, you are compressed, unless you suffered from explosive decompression.

You could use cl_aeroflot instead, but then your packets would just get stuck in Sheremetyevo airport security, and never actually get anywhere.

edit:
I should add that delta compression is pretty efficient, but not quite as efficient as South West compression.
send lawyers, guns and money
User avatar
HarryHirsch
Posts: 92
Joined: Mon Sep 01, 2003 9:28 am
Location: Germany

Post by HarryHirsch »

LOL @ ReyalP *g*
User avatar
ouroboro
Posts: 662
Joined: Mon Jul 26, 2004 6:52 pm

Post by ouroboro »

LOL WTF :curse: :curse: :curse:

ROFL @ Sudan Air. :lol:
User avatar
Nail
Posts: 425
Joined: Fri Jan 02, 2004 3:47 pm
Contact:

Post by Nail »

toggles Delta-compression of client and server packets
Improvise, Adapt, Overcome
User avatar
deej
Posts: 743
Joined: Fri Mar 19, 2004 12:44 am
Location: Belgium!
Contact:

Post by deej »

Nail wrote:
toggles Delta-compression of client and server packets
But wtf is Delta-compression?
Our servers now run on 64 bit steroids. Point your ET to:
- Forgotten Ground StopWatch Server with occasional wolfrof 1
- Fraggle Rock ETPub Server - Mix up ET/UT & Duke Nukem
User avatar
ouroboro
Posts: 662
Joined: Mon Jul 26, 2004 6:52 pm

Post by ouroboro »

deej wrote:
Nail wrote:
toggles Delta-compression of client and server packets
But wtf is Delta-compression?
User avatar
Ragnar_40k
Posts: 394
Joined: Thu Mar 18, 2004 5:18 pm
Location: Berlin, birthplace of the Döner
Contact:

Post by Ragnar_40k »

Delta compression: You don't store the values itself, but the difference (i.e. the delta) between successive values.

Oh, and Delta declared bankruptcy in 2005 ...
The Emperor watch over you.
User avatar
deej
Posts: 743
Joined: Fri Mar 19, 2004 12:44 am
Location: Belgium!
Contact:

Post by deej »

Ragnar_40k wrote:Delta compression: You don't store the values itself, but the difference (i.e. the delta) between successive values.
Sweet! Is that a good thing or a bad thing ;-)?
Our servers now run on 64 bit steroids. Point your ET to:
- Forgotten Ground StopWatch Server with occasional wolfrof 1
- Fraggle Rock ETPub Server - Mix up ET/UT & Duke Nukem
User avatar
ReyalP
Posts: 1663
Joined: Fri Jul 25, 2003 11:44 am

Post by ReyalP »

deej wrote: Sweet! Is that a good thing or a bad thing ;-)?
It's a good thing. The only reason to turn it off would be debugging.
send lawyers, guns and money
User avatar
deej
Posts: 743
Joined: Fri Mar 19, 2004 12:44 am
Location: Belgium!
Contact:

Post by deej »

ReyalP wrote:It's a good thing. The only reason to turn it off would be debugging.
So the paranoid amongst us should forbid setting cl_nodelta to 1? I wonder whether or not this can be exploited to generate lag on demand.
Our servers now run on 64 bit steroids. Point your ET to:
- Forgotten Ground StopWatch Server with occasional wolfrof 1
- Fraggle Rock ETPub Server - Mix up ET/UT & Duke Nukem
User avatar
ouroboro
Posts: 662
Joined: Mon Jul 26, 2004 6:52 pm

Post by ouroboro »

deej wrote:
ReyalP wrote:It's a good thing. The only reason to turn it off would be debugging.
So the paranoid amongst us should forbid setting cl_nodelta to 1? I wonder whether or not this can be exploited to generate lag on demand.
LilleBror says yes! Isn't that good enough for you? :lol:

Seriously though, if it's only use is debugging, I can't imagine why anyone would want to change it unless they were being devious - even if those devious intentions were misguided and pointless.
User avatar
ReyalP
Posts: 1663
Joined: Fri Jul 25, 2003 11:44 am

Post by ReyalP »

ouroboro wrote: Seriously though, if it's only use is debugging, I can't imagine why anyone would want to change it unless they were being devious - even if those devious intentions were misguided and pointless.
Or they are just misguided.

There will always be ways to lag on demand.
send lawyers, guns and money
Locked