Next Previous Contents

3. The Quake 2 Main Engine

There is only limited knowledge about the main engine, which basically serves as client and, if necessary (e.g. in single player) as server, or, alternatively, as dedicated server.

It is believed that the main engine, if run as client only, and the refresh DLL's do not require the Game DLL at runtime. There is a certain amount of overlap between the refresh libraries and the Game DLL, which indicates either copies of sources, or compile time access to the GameDLL. See the documentation of the Rendering/Refresh Libraries for a list of shared functions.

The following description is based on strings as found in the main executable, and guesses.

3.1 Memory Manangement

Zone Memory Allocation

According to John Carmack, the Zone Memory allocation as used in DOOM was the only module that had a chance of being used for Quake. See the DOOM source, z_zone.c, for details of the previous implementation.

Hunk Memory Allocation

3.2 Main Engine Sound System

Functions

Variables

CD subsystem

3.3 GUI/Menu

Functions

M Variables


m_cursor
m_main_game
m_main_multiplayer
m_main_options
m_main_video
m_main_quit

m_main_plaque
m_main_logo
m_banner_multiplayer
m_banner_game

m_pitch
m_yaw
m_forward
m_side

MENU variables


menu_main
menu_game
menu_loadgame
menu_savegame
menu_joinserver
menu_addressbook
menu_startserver
menu_dmoptions
menu_playerconfig
menu_credits
menu_multiplayer
menu_video
menu_options
menu_keys
menu_quit

3.4 Networking

NET/UDP functions

SVC_DirectConnect

SVC message types


svc_frame
svc_deltapacketentities
svc_packetentities
svc_playerinfo
svc_download
svc_centerprint
svc_spawnbaseline
svc_configstring
svc_serverdata
svc_stufftext
svc_print
svc_sound
svc_reconnect
svc_disconnect
svc_nop
svc_inventory
svc_layout
svc_temp_entity
svc_muzzlflash2
svc_muzzleflash
svc_bad
svc_lightstyle 

3.5 Client subsystem

Variables.


cl_testblend
cl_testparticles
cl_testentities
cl_stats
cl_stereo_separation
cl_stereo
cl_blend
cl_lights
cl_particles
cl_entities
cl_gun
cl_footsteps
cl_noskins
cl_autoskins
cl_predict
cl_maxfps
cl_upspeed
cl_forwardspeed
cl_sidespeed
cl_yawspeed
cl_pitchspeed
cl_anglespeedkey
cl_run
cl_shownet
cl_showmiss
cl_timeout
cl_testlights

3.6 Rendering Variables

3.7 Server subsystem

SV Functions and Variables

SV_Multicast SV_StartSound SV_StartSound SV_StartSound SV_SendClientMessages SV_Configstrings_f SV_Baselines_f SV_Begin_f SV_ReadClientMessage SV_AreaEdicts SV_FatPVS SV_ReadPackets

sv_enforcetime sv_noreload


Next Previous Contents