The network layer (also called Net Channel) outputs world information into the frames variable ( An array of frame_t). They are picked up by the prediction layer, where collisions are also taken care of and data are outputted under the form of Visibility Edicts (cl_visedicts) and the POV definition. VisEdicts are used by the rendition layer, in addition to the POV (cl.sim*) variables to render the scene.

setjmp :

Setup a code waypoint, if anything bad happens, program jumps back here.

In every game loop, commands in the buffer are executed. Commands are generated mostly via the console, but can also come from the server or even direct keystroke.

The game starts with a exec quake.rc in the command buffer.

CL_ReadPackets and CL_SendCmd :

Take care of the Network piece of the engine.
CL_SendCmd grabs the mouse/keyboard inputs, generates a command, which is then sent.
As Quake World used UDP, the reliability is mainly replicated via a set of sequence/sequenceACK in the netChannel packet headers. Additionally, the last sent command is systematically re-sent.
Regarding the flow control, there is no limitation on client side, updates are sent as fast as possible. On server side, a message is sent to a client only if a packet has been received and if the sending rate is below a "choke" limit. This limit is set from client side and sent to the server.

Take care of the Rendition piece of the engine. In this part, the BSP/PVS is extensively used. This is also where a fork occurs in the code based on include/define. Quake engine can render the world either with pure software or hardware accelerated.

Opening the zip and compiling

Opening the zip:

Upon opening q1sources.zip, there is two folders/Visual Studio projects: QW and WinQuake.

WinQuake is the code with client and server code melted together, running within one single process (Ideally, they would have been two different processes if DOS had supported them). Network gaming was still possible via LAN only.

QW is "Quake World" project, where Server and Client are meant to run on different machine (notice the client staring point is WinMain (in sys_win.c), whereas the Server stating point is main (also in sys_win.c)).

I studied Quake World, openGL rendered ; Upon opening the solution, 4 sub-projects can be seen:

gas2asm - Utility to port assembler code from GNU ASM to x86 ASM

qwcl - The client part of Quake

QWFwd - Proxy sitting in front of Quake Servers

qwsv - The server part of Quake

Compiling:

After installation of Windows and DirectX SDKs, compilation with Visual Studio 2008 raised one error :