How zdoom/gzdoom works
GZDoom is a modder-friendly DOOM source port with OpenGL and Vulkan rendering. Its main runtime spans engine startup, resource and map loading, gameplay, rendering, sound, and player-facing systems such as menus, saves, and the console. The graph highlights those stages and the scripting/debugging and texture-management layers. Some connections are documented only by the source index or README; unsampled implementation details are left unconnected rather than inferred.
Main entry points: d_main.cpp Engine Startup · p_acs.cpp Gameplay Simulation · r_utility.cpp Rendering · c_enginecmds.cpp Console Commands
Components 22
Engine Core
- Engine Startup
src/d_main.cpp - Resource Filesystem
src/common/engine/filesystem.h
Game Runtime
- Map Loading
src/maploader/maploader.cpp - Gameplay Simulation
src/playsim/p_acs.cpp - Game Data Translation
src/gamedata/xlat/parsecontext.cpp - Intermission
src/intermission/intermission.cpp - Script VM
src/common/scripting/vm/vm.h
Presentation
- Rendering
src/rendering/r_utility.cpp - Hardware Renderer
src/rendering/hwrenderer/scene/hw_walls.cpp - Software Renderer
src/rendering/swrenderer/drawers/r_draw_pal.cpp - Texture Manager
src/common/textures/texturemanager.cpp - Sound System
src/sound/s_advsound.cpp - ZMusic Playback
libraries/ZMusic/source/zmusic/zmusic.cpp
Player and Modder Systems
- Game Menus
src/menu/doommenu.cpp - Save Games
src/common/menu/savegamemanager.cpp - Console Commands
src/common/console/c_enginecmds.cpp - Console Variables
src/common/console/c_cvars.h - Debug Adapter
src/common/scripting/dap/DebugExecutionManager.cpp - Breakpoints
src/common/scripting/dap/BreakpointManager.cpp
Shared Services
- Core Utilities
src/common/utility/basics.h - Engine Errors
src/common/utility/engineerrors.h
Other components
- Player
Connections 23
- Player → Engine Startup: starts
README.md - Engine Startup → Console Commands: uses
src/d_main.cpp - Engine Startup → Gameplay Simulation: initializes
src/d_main.cpp - Engine Startup → Sound System: initializes
src/d_main.cpp - Engine Startup → Resource Filesystem: uses
src/d_main.cpp - Engine Startup → Map Loading: dispatches
- Resource Filesystem → Texture Manager: provides assets
src/common/textures/texturemanager.cpp - Map Loading → Gameplay Simulation: loads gameplay
- Gameplay Simulation → Script VM: runs scripts
src/playsim/p_acs.cpp - Engine Startup → Rendering: initializes
- Rendering → Hardware Renderer: uses
- Rendering → Software Renderer: uses
- Gameplay Simulation → Intermission: advances to
- Engine Startup → Game Menus: initializes
- Game Menus → Save Games: manages
src/common/menu/savegamemanager.cpp - Console Commands → Console Variables: configures
- Sound System → ZMusic Playback: uses
- Engine Startup → Debug Adapter: starts
src/d_main.cpp - Debug Adapter → Breakpoints: manages
src/common/scripting/dap/BreakpointManager.cpp - Breakpoints → Script VM: inspects
src/common/scripting/dap/BreakpointManager.cpp - Console Commands → Resource Filesystem: queries
src/common/console/c_enginecmds.cpp - Engine Startup → Engine Errors: uses
src/d_main.cpp - Texture Manager → Core Utilities: uses
src/common/textures/texturemanager.cpp