Difference between revisions of "SV Frame"

From ioquake3 wiki
Jump to: navigation, search
m (Reverted edits by Jensen07 (Talk) to last revision by Zakk)
 
Line 1: Line 1:
{{FuncDef|SV_Frame}} performs all of the server-side processing required for a single frame of gameplay. It takes a single parameter, <code>msec</code>, which is the number of milliseconds that have elapsed since the last frame was generated. If the process is running as a dedicated server better try some [http://www.essaymill.com essay writing], this number may be quite small. If the process is running with a client that is rendering with a slow graphics card, however, this number may be rather large. The basic flow of {{FuncDef|SV_Frame}} is as follows:
+
{{FuncDef|SV_Frame}} performs all of the server-side processing required for a single frame of gameplay. It takes a single parameter, <code>msec</code>, which is the number of milliseconds that have elapsed since the last frame was generated. If the process is running as a dedicated server, this number may be quite small. If the process is running with a client that is rendering with a slow graphics card, however, this number may be rather large. The basic flow of {{FuncDef|SV_Frame}} is as follows:
 
* add <code>msec</code> to {{FieldDoc|timeResidual|path=/code/server/server.h}}.
 
* add <code>msec</code> to {{FieldDoc|timeResidual|path=/code/server/server.h}}.
 
* calculate <code>frameMsec</code>, which is the number of milliseconds per server frame. The calculation is based on the value of {{CvarDoc|sv_fps}}.
 
* calculate <code>frameMsec</code>, which is the number of milliseconds per server frame. The calculation is based on the value of {{CvarDoc|sv_fps}}.

Latest revision as of 22:52, 9 July 2010

SV_Frame() performs all of the server-side processing required for a single frame of gameplay. It takes a single parameter, msec, which is the number of milliseconds that have elapsed since the last frame was generated. If the process is running as a dedicated server, this number may be quite small. If the process is running with a client that is rendering with a slow graphics card, however, this number may be rather large. The basic flow of SV_Frame() is as follows:

  • add msec to Template:FieldDoc.
  • calculate frameMsec, which is the number of milliseconds per server frame. The calculation is based on the value of sv_fps.
  • call SV_BotFrame() to allow bots to perform their actions for this frame.
  • if Template:FieldDoc >= frameMsec, repeatedly call VM_Call(GAME_RUN_FRAME) for each server frame that can be performed within Template:FieldDoc, where the server frame time is frameMsec.
  • call SV_CheckTimeouts() to see if we've lost any clients.
  • call SV_SendClientMessages() to send snapshots to clients.
  • call SV_MasterHeartbeat() to update the master servers ("master.quake3arena.com") about the server's current status.

See also