LOG IN
Docs
By Opus

Project Structure

A tour of the top-level repository layout and what lives in each folder.

The repo is one Git tree with two distinct halves: the C++ game (engine, renderer, platform, data) and the C# services and tooling built around it (launcher, relay, web site). They share a branch and a commit history, but they do not share a build system or a runtime, and nothing in the game links against anything in the services. When you are working in one half, the other is effectively a sibling project you happen to clone with it.

The game side is built from Visual Studio 2026 .vcxproj files invoked through GeneralsRemastered.sln. There is a CMakeLists.txt at the root and CMake files scattered under individual libraries, but the shipping game binary comes out of the vcxproj path. CMake is there for partial builds and for Renderer experiments; it is not the build you run to produce generals.exe.

Game runtime

  • Core/ — the shared engine. Core/GameEngine holds the platform-agnostic simulation (logic, AI, pathfinder, scripting), Core/GameEngineDevice holds the older device backends (audio, input, Miles, the legacy W3D renderer), and Core/Libraries vendors the WW3D2 / WWMath / WWDebug subtree under Core/Libraries/Source/WWVegas/. Core exists as if there were a non-ZH build, but there isn't one — only Zero Hour ships. Core is the common base; GeneralsMD is the override.
  • GeneralsMD/ — the Zero Hour expansion build. GeneralsMD/Code/Main has the WinMain entry point and produces the executable. GeneralsMD/Code/GameEngine and GeneralsMD/Code/GameEngineDevice contain the ZH-specific overrides that layer on top of Core. This is where most actual gameplay code lives, and it is where the D3D11 port's compatibility shim sits: GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/D3D11Shims.cpp implements the D3D8-era entry points the rest of the engine still calls.
  • Renderer/ — the new standalone rendering library with its own D3D11 and Vulkan paths. Renderer.cpp/h is the top-level API, Core/Device.* and Core/Shader.* handle device and shader lifetimes, Shaders/HLSL/ is the source tree for compiled shaders, and GPUParticles.* is the compute-based particle pipeline. Where D3D11Shims exists to fool the old engine, Renderer is the new engine.
  • Platform/ — the SDL3 platform layer. Platform/SDLPlatform.cpp owns the window and event pump; Platform/SDLGameEngine.cpp is the engine adapter; SDLMouse.cpp, SDLKeyboard.cpp, and SDLAudioManager.cpp replace the old Win32 and Miles backends. Platform/AniCursor/ is a self-contained parser for Windows .ANI cursor files so SDL can animate them.
  • Inspector/ — the live-debug panel. ImGui-based, attaches to the running game, exposes state for the renderer, audio, pathfinder, and netcode. Toggled by keybind in-game.

Tooling and services

  • Launcher/ — the WinUI 3 launcher app, known in-tree as "Discombobulator", under Launcher/GeneralsLauncher/. It handles auth, account linking, lobby browser, and handoff into the game.
  • Server/ — the ASP.NET Core backend. It is three things in one solution: the relay that proxies lobby and in-game traffic, the auth service that issues the s_ / l_ / g_ tokens, and the telemetry pipeline that ingests match events into SQL Server.
  • Web/ — the public site at generals64.com. Web/GeneralsRemastered.Web is a Razor Pages app; Docs/Content/ is the Markdown tree this article lives in.

Data and build output

  • Data/ — the runtime-expected data folder layout. What the game reads at load time.
  • GameExtern/ and OGGameData/ — original shipping assets kept around as extraction sources and reference.
  • GameData/ — runtime-writable outputs: the telemetry SQLite DB and perf_timeseries.csv from the LivePerf sampler.
  • Dependencies/, extern/ — vendored third-party libs (SDL3, ImGui, etc.).
  • Tests/ — C# unit tests for the server.
  • build/, build_cmake/, build_vk/ — compiler output. Git-ignored.

Quirks

  • Core vs GeneralsMD for a ZH-only ship. The split reads like there is a base-game build. There isn't. It's a layering convention inherited from the original source: Core is shared, GeneralsMD overrides. Only ZH has a Main.
  • vcxproj is canonical, CMake is not. If your edit doesn't appear in z_generals.vcxproj or a referenced project, it won't compile into the game no matter how clean the CMake build is.
  • D3D11Shims.cpp is a translation layer, not a renderer. It implements D3D8-era symbols on top of D3D11 so the old W3D code compiles and runs unchanged. New rendering work goes in Renderer/.
  • Miles audio is dead code in-tree. Core/GameEngineDevice/Source/MilesAudioDevice/MilesAudioManager.cpp is still in the source tree and still compiles, but the active backend is Platform/SDLAudioManager.cpp. If you're debugging audio, don't start in Miles.
  • extracted_textures/ is tool output, not source. It's generated by the asset-extraction scripts under tools/ and should be regenerable, not hand-edited.
  • Two game-data roots. OGGameData/ is pristine shipping assets; Data/ is the runtime layout the exe reads. They are deliberately distinct so extraction work doesn't mutate the reference copy.