Skip to content

Architecture

Directory Layout

csretro/
├── engine/                  ← xash3d-fwgs  (vendored source)
│   ├── 3rdparty/mainui/     ← Generic Xash3D main menu
│   ├── 3rdparty/nanogl/     ← OpenGL ES shim
│   ├── 3rdparty/vgui_support/
│   └── …
├── client/                  ← cs16-client  (vendored source)
│   ├── cl_dll/              ← CS 1.6 client DLL source
│   ├── 3rdparty/
│   │   ├── ReGameDLL_CS/    ← Server DLL (vendored inside client/)
│   │   ├── mainui_cpp/      ← CS-specific main menu
│   │   ├── yapb/            ← Yet Another Ping Bot (AI bots)
│   │   └── miniutl/
│   └── …
├── 3rdparty/
│   ├── metamod/             ← metamod-fwgs  (vendored; required)
│   └── nodemod/             ← nodemod-goldsrc (vendored; required)
│       ├── packages/admin/  ← @nodemod/admin (TypeScript plugins)
│       ├── packages/core/   ← @nodemod/core
│       └── deps/            ← Node.js static build + vcpkg
├── game-test/               ← Runtime install target (gitignored)
│   └── cstrike/
│       ├── dlls/            ← csr_cstrike_amd64.so (ReGameDLL_CS)
│       ├── cl_dlls/         ← client_amd64.so (cs16-client)
│       └── addons/
│           ├── metamod/dlls/
│           └── nodemod/
├── build/                   ← CMake build output (gitignored)
├── logs/                    ← Build and run logs (gitignored)
├── CMakeLists.txt
├── CMakePresets.json
├── VENDOR.md                ← component revisions for CMake / csr version (repo root)
├── tools.sh
└── mkdocs.yml

Vendored upstreams (no Git submodules)

All engine, client, Metamod, NodeMod, and nested ReGameDLL sources live in this repository as normal directories. On GitHub you see full trees, not submodule links.

Import commit SHAs and refresh notes: VENDOR.md (also linked from the documentation site as Vendor table (VENDOR.md)).

Vendor tree hygiene (3rdparty/, engine/, …)

Upstream vendored trees may still contain .gitignore, .github/workflows/, or extra CMakeLists.txt files from the forked project. Those files are often kept so merging or diffing upstream updates stays straightforward. They are not always used by the CSRetro root CMake build (which drives engine + client + addons via tools.sh). Removing them is optional and should be done consistently with your upstream-sync workflow—not blindly, so future patches remain traceable.

Vendor-only files (audit)

The following are typical upstream-only artifacts inside vendored trees. They exist for standalone upstream builds or CI in the original repos; CSRetro may ignore them when using the top-level CMakeLists.txt + tools.sh:

Location What CSRetro note
engine/ waf, Documentation/, upstream 3rdparty/ Engine is built via tools.sh build:engine (Waf), not root CMake. Documentation/ is upstream reference only.
3rdparty/metamod/ Upstream metamod CMake presets, optional workflows Metamod is built from CSRetro’s install path; upstream’s standalone release pipeline may differ.
3rdparty/nodemod/ Node.js static build scripts, upstream packages/ layout Integrated via root CMake + npm pipeline; ignore duplicate top-level workflows when syncing.
client/3rdparty/* Per-subproject build files (YaPB, mainui, ReGameDLL) Driven by client/CMakeLists.txt from the CSRetro root; do not delete without testing build:release / build:full.

Do not mass-delete vendor files without a tested sync path (./tools.sh build:full or documented subset) and an update to VENDOR.md.

Upstream origins (reference)

Component Upstream repository Notes
Engine FWGS/xash3d-fwgs Vendored under engine/
Client DLL Velaron/cs16-client Vendored under client/
Server DLL rehlds/ReGameDLL_CS Vendored under client/3rdparty/ReGameDLL_CS/
Metamod FWGS/metamod-fwgs Vendored under 3rdparty/metamod/ (required for CSRetro baseline)
NodeMod nodemod/nodemod-goldsrc Vendored under 3rdparty/nodemod/ (required for CSRetro baseline)

Platform Policy

  • Supported: Linux x64, Windows x64, macOS x64
  • Not supported: 32-bit (x86), Android, PS Vita, Nintendo Switch, ARM

All CMake presets enforce 64-bit. Attempting a 32-bit build produces a fatal CMake error.

Engine Loading Chain

xash3d (launcher)
  └── libxash.so          (engine core)
        ├── filesystem_stdio.so
        ├── libref_gl.so  (OpenGL renderer)
        ├── libmenu.so    (main menu – from cs16-client/mainui_cpp or engine/mainui)
        ├── cl_dlls/client_amd64.so   (cs16-client – HUD, weapons, game events)
        └── [via Metamod] dlls/csr_cstrike_amd64.so  (ReGameDLL_CS – server game logic)
                └── addons/nodemod/dlls/libcsr_nodemod.so  (NodeMod – JS plugin runtime; legacy name `libnodemod.so`)

Metamod Plugin Chain

When Metamod is installed, gameinfo.txt points the engine to metamod.so as the game DLL.
Metamod then loads the actual game DLL (dlls/csr_cstrike_amd64.so) and all plugins from plugins.ini.

CSRetro baseline plugins.ini contains only NodeMod.
AMXX is not part of the CSRetro baseline.