Skip to main content

Codebase Architecture & Function Hub

Welcome to the automated architectural reference and function-by-function documentation for the R2K16 engine. This documentation thoroughly covers every function across the codebase, its internal implementation, how it is used and verified in test suites, and whether its behavior differs across target platforms and actual code files.

Automated Documentation System

This documentation is generated and maintained entirely via automated Python scripts located in scripts/docgen/. It automatically scans all source and test files on every build, detecting newly added functions and tests to guarantee that documentation never drifts from the actual source code.

Key Engine Metrics​

MetricCountDescription
Documented Engine Functions25,310Distinct C++, C#, and Python functions parsed and analyzed across all core modules
Parsed Test Cases432Unit, regression, and benchmark test cases mapped from Boost and MSUnit suites
Functions with Test Coverage1,889Functions directly tested, asserted, or exercised within test scenarios
Platform-Divergent Functions1,735Functions with #ifdef branching or multi-file implementations across platforms

Architectural Subsystems​

1. Engine & Foundations​

2. Networking, Graphics & Geometry​

  • Network & Replication: RakNet replication stack, Client/Server Replicators, physics senders/receivers, and cluster buffers.
  • Rendering Pipeline: GfxBase, GfxCore, DirectX (D3D9/D3D11), OpenGL backends, scene graph, and shaders.
  • CSG Geometric Kernel: Constructive Solid Geometry boolean operations over solid meshes.

3. Clients, Applications & Services​

4. Cross-Cutting Analysis & Directories​