How fwgs/xash3d works
Xash3D FWGS is a cross-platform Gold Source-compatible game engine. Its main user-facing workflow is running a compatible game or mod: the engine loads game assets and game-DLL interfaces, then runs client/server simulation and presents graphics, audio, and input. The tree also shows networking, shared movement physics, platform backends, and a Win32 compatibility loader. Major client features include rendering, sound, input, menus, and cinematics. Several subsystem links are based on documented capabilities or header references rather than sampled call sites; those uncertain links are dashed.
Main entry points: cl_main.c Client session · host.c Host lifecycle · filesystem.c Game files · sv_frame.c Server simulation
Components 22
Engine runtime
- Host lifecycle
engine/common/host.c - Game files
engine/common/filesystem.c - Models and maps
engine/common/model.c - Asset storage
engine/common/filesystem.c
Game simulation
- Server simulation
engine/server/sv_frame.c - Game DLL interface
engine/eiface.h - Shared movement
pm_shared/pm_defs.h - Network protocol
engine/common/network.c - Client handling
engine/server/sv_client.c
Client experience
- Client session
engine/client/cl_main.c - Client networking
engine/client/cl_parse.c - Input controls
engine/client/input.c - World renderer
engine/client/gl_rmain.c - Entity fragments
engine/client/gl_refrag.c - Audio playback
engine/client/s_main.c - Menus and UI
engine/client/cl_menu.c - Cinematics
engine/client/cl_video.c
Platform and compatibility
- Game launcher
game_launch/xash.c - Platform backends
engine/platform/sdl/events.c - Win32 emulation
loader/win32.c
Other components
- Player
- Game or mod
Connections 23
- Player → Game launcher: starts game
- Game launcher → Host lifecycle: starts runtime
- Game or mod → Game files: provides assets
- Host lifecycle → Game files: uses files
- Game files → Asset storage: reads assets
- Host lifecycle → Client session: runs client
- Host lifecycle → Server simulation: runs server
- Server simulation → Game DLL interface: dispatches callbacks
- Client handling → Network protocol: encodes messages
engine/server/sv_client.c - Server simulation → Shared movement: simulates movement
- Client session → Client networking: receives updates
- Client networking → Network protocol: decodes protocol
- Client session → Input controls: collects input
- Client session → World renderer: renders frames
- World renderer → Entity fragments: uses fragments
engine/client/gl_refrag.c - Client session → Audio playback: plays audio
- Client session → Menus and UI: shows menus
- Client session → Cinematics: plays videos
- Platform backends → Input controls: supplies events
- Game or mod → Win32 emulation: uses compatibility
- Win32 emulation → Game launcher: loads game libraries
game_launch/xash.c - Models and maps → Game files: loads model data
- World renderer → Models and maps: displays world