Desktop + VR game engine, Vulkan renderer.
VorpalEngine is a primarily an AI-developed project, maintained as a study of what frontier models can do on a real complex C++ codebase rather than on a toy example. The majority of ongoing work is written by an AI agent working under human direction and review.
Code predating 2025 is human-written. Code added from 2025 onward may be partly or wholly AI-generated. Read it as a research codebase. the architecture is deliberately being reworked in the open, so expect churn.
Build dependencies (Fedora tested only):
sudo dnf install cmake make gcc g++ git glslc zip \
wayland-devel libxkbcommon-devel libX11-devel libXrandr-devel \
libXinerama-devel libXcursor-devel libXi-devel mesa-libGL-devel \
vulkan-validation-layersglslcis required. Shaders are compiled fromassets/shaders/src/as part of the build and the.spvoutputs are no longer committed, so there is nothing to fall back to. SettingVULKAN_SDKalso works.zipis required; assets are packed intoassets.zipat build time.vulkan-validation-layersis only needed for-DVORPAL_VALIDATION=ON.spirv-toolsis optional, for inspecting or validating the compiled shaders withspirv-dis/spirv-val.
Third-party code lives in git submodules, so clone recursively or run:
git submodule update --init --recursiveThen build with cmake:
mkdir build
cd build
cmake ..
make -j$(nproc)Validation layers are off by default and gated on a build option, so a release build cannot ship with them enabled:
cmake .. -DVORPAL_VALIDATION=ONRun from the build directory. The engine opens assets.zip relative to the current
directory, so launching from anywhere else fails with assets.zip not found.
cd build
./vorpal_engineGame logic is a shared library loaded at runtime behind the C ABI in api/vorpal/vorpal.h
a module exports a single vp_module() symbol and reaches engine services through a table of function pointers.
Modules are declared in CMakeLists.txt:
vorpal_add_game(hunted games/hunted/hunted.c)Three ship with the engine. games/sponza/ is the default and loads on launch: a freecam
walkthrough of the Khronos Sponza with the render settings exposed as an in-world panel,
which E teleports in front of the view. games/hunted/ is the gameplay reference, and
games/bench/ submits a fixed scene for --bench. Pass a different .so as the first
argument to load it instead.
Modules hot-reload: rebuild one while the engine is running and it is reloaded in place. Game state is owned by the engine rather than the module so it survives the unload, which means it has to be plain data. See the header for the reload and versioning rules.
The renderer detects GPU capabilities at startup instead of assuming a feature set, because
descriptor indexing has to be handled per vendor: AMD mis-samples a non-uniformly indexed
texture array without the nonuniformEXT decoration, while older Intel parts do not expose
the extension at all and index correctly without it. Since nonuniformEXT is a compile-time
SPIR-V decoration and not a runtime switch, the fragment shader is built twice and the engine
picks the permutation the device needs. See include/VK/DeviceCaps.hpp.