How id-software/quake works
This repository contains several Quake game-engine variants: software- and OpenGL-rendered WinQuake and QuakeWorld. The principal networked workflow takes player input through the client, exchanges commands and state with the server, simulates the world, then updates the client view and audio. The graph emphasizes QuakeWorld’s client/server split and shows software and OpenGL rendering as alternatives. README and file names establish the variants and capabilities; most runtime links are architectural rather than verified from the partial excerpts.
Main entry points: cl_main.c Client Control · net_chan.c Client Networking · sv_nchan.c Server Networking · net_udp.c UDP Transport
Components 21
Client Runtime
- Client Control
QW/client/cl_main.c - Input Commands
QW/client/cl_input.c - Client Networking
QW/client/net_chan.c - State Parsing
QW/client/cl_parse.c - Entity Updates
QW/client/cl_ents.c - Demo Playback
QW/client/cl_demo.c
Server Simulation
- Server Networking
QW/server/sv_nchan.c - Client Commands
QW/server/sv_user.c - Server Control
QW/server/sv_main.c - World Physics
QW/server/sv_phys.c - World Collision
QW/server/world.c - Game Script VM
QW/server/pr_exec.c - State Broadcast
QW/server/sv_send.c
Presentation
- Software Renderer
QW/client/r_main.c - OpenGL Renderer
QW/client/gl_rmain.c - Screen and HUD
QW/client/screen.c - Sound Mixing
QW/client/snd_mix.c
Platform I/O
- UDP Transport
QW/client/net_udp.c - Audio Device
QW/client/snd_linux.c - Display Device
QW/client/vid.h
Other components
- Player
Connections 23
- Player → Input Commands: provides input
- Input Commands → Client Control: builds commands
- Client Control → Client Networking: sends commands
- Client Networking → UDP Transport: transmits packets
- UDP Transport → Server Networking: delivers packets
- Server Networking → Client Commands: dispatches commands
- Server Control → World Physics: runs simulation
- World Physics → World Collision: checks collisions
- World Physics → Game Script VM: executes game logic
- Server Control → State Broadcast: sends state
- State Broadcast → Server Networking: queues updates
- Server Networking → UDP Transport: transmits updates
- UDP Transport → Client Networking: delivers updates
- Client Networking → State Parsing: dispatches messages
- State Parsing → Entity Updates: updates entities
- Client Control → Software Renderer: renders frame
- Client Control → OpenGL Renderer: renders frame
- Software Renderer → Screen and HUD: draws view
- OpenGL Renderer → Screen and HUD: draws view
- Screen and HUD → Display Device: presents frame
- Client Control → Sound Mixing: updates audio
- Sound Mixing → Audio Device: outputs sound
- Demo Playback → State Parsing: replays messages