Com Frame

From ioquake3 wiki
Jump to: navigation, search

Com_Frame() generates a single frame of gameplay. After stripping away the miscellaneous accounting code, the basic flow of Com_Frame() boils down to:

  • Call Com_EventLoop() to collect any input events since the last frame.
    • When not running as a dedicated server, Com_EventLoop() may be called repeatedly in a spin-loop so that the frame does not exceed com_maxfps.
    • When running as a dedicated server, server FPS is limited using a different mechanism.
  • Call Cbuf_Execute() to process any commands that may have come in during Com_EventLoop().
  • Call SV_Frame() to allow server part to do its processing for this frame.
  • Call CL_Frame() to allow client part to send commands to the server and update the display based on snapshots received from the server.