Forum

SV_Frame

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

SV_Frame

Postby nicolasbol » Wed Mar 04, 2009 9:09 pm

Looks like QuakeWorld server is updating the world at a fixed framerate (10hz).

But I see no limitations in sending messages to clients, looks like the main loop is sending packet as fast as it can.

Where is the 10Hz limitations enforced in the code ?

At first I thought it was:

Code: Select all
if (select (net_socket+1, &fdset, NULL, NULL, &timeout) == -1)
         continue;


But it only check for socket readability....
nicolasbol
 
Posts: 9
Joined: Mon Feb 23, 2009 6:47 pm

Postby r00k » Thu Mar 05, 2009 4:39 am

in netQuake its at _host_frame

so in QW maybe its near cl_maxfps...

or host_frametime ?
r00k
 
Posts: 1110
Joined: Sat Nov 13, 2004 10:39 pm

Postby Spike » Thu Mar 05, 2009 11:36 am

sys_mintic defaults to 0.013 (one tic every 13 milliseconds for about 76 fps so its smooth enough at 72).
That's the server physics rate limiter.
Its checked in... sv_phys.c
This doesn't apply to player physics.

server->client packets are sent with no artificial waiting as soon as the server receives a packet. select is used only to reduce cpu load on an idle server, without unconditionally sleeping. Its timeout will keep the qc ticking over at a much reduced rate.
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby nicolasbol » Thu Mar 05, 2009 6:12 pm

So after further reading and testing, it looks like there is no 10Hz limit in Quake World.

As Spike mentionned, there is a limit for the physic simulation but players movements are unaffected.

So the Server sends message to a client if:

- A message was received from this client
- The client rate is not "chocked" via a client parameter.

That's mostly how flow control is performed.
nicolasbol
 
Posts: 9
Joined: Mon Feb 23, 2009 6:47 pm


Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 1 guest