[quake3] cl_packetdelay

Tony J. White tjw at webteam.net
Tue May 30 16:43:39 EDT 2006


On Tue, May 30, 2006 at 02:06:20PM -0600, Neil Toronto wrote:
> Yeah, that could work. You could either push some of the mod code stuff up (I 
> think the client-side delay is in cg_snapshot.c and the server-side delay is in 
> g_active.c) if you want it in the engine, or just leave it where it is.
> Its only problem is resolution. You get 1000/sv_fps millisecond (usually 50ms) 
> resolution from delaying snapshots, and usually about 8ms resolution from 
> delaying client commands.

Oh thanks.  I hadn't noticed cg_latentSnaps. 

The cl_packetdealy and sv_packetdelay in ET _seem_ to work on the individual
packet level not just delaying server frame snapshots since you can tune them
precisely to the millisecond.

I think I will try queuing NET_SendPacket() first to try to mimic what's in
ET.  If it's too complex, I'll just use your cg_latentSnaps for testing.

> 
> On the plus side, the effects of lag on the game are exactly the same no matter 
> which direction it happens in (client->server or server->client), so you could 
> combine the two for a decent approximation.

The comments in the ET 2.60 release notes indicate that the settings only
effect transmitting, so you need to set both sv_packetdelay and
cl_packetdelay to create realistic latency.   However like you say, it sure
didn't seem necessary when testing in ET.   Setting cl_packetdelay only
seemed to create the desired effect (at least for testing unlagged).

-Tony


> 
> Neil
> 
> Zachary J. Slater wrote:
> 
> >Tony J. White wrote:
> >
> >>The 2.60 patch for Enemy Territory added the following cheat-protected cvars:
> >>
> >>cl_packetdelay - artificially set the client's latency
> >>cl_packetloss  - mimic packet loss
> >>
> >>I'm dabbling with a re-implementation of Neil Toronto's unlagged in 
> >>code/server/ and I need to clone at least cl_packetdelay for testing.
> >>
> >>Does anyone have any tips for doing this?  The only way I can think to do it
> >>would be to create a queue for all outgoing packets marked with timestamp
> >>and make all CL_Netchan_Transmit() calls use the queue.  Would there be an 
> >>easier and/or cleaner way?
> >>
> >>-Tony
> >>
> >
> >http://icculus.org/~zakk/q3run/unlagged-2.01-src-gpl.zip
> >
> 

-- 



More information about the quake3 mailing list