A work-in-progress 3D game engine built on Vulkan — multithreaded rendering, Bullet physics and a clean application framework.
⚠️ Work in progress. This is an experimental engine playground — APIs and structure change constantly, and many features are incomplete.
The repository is split into a reusable engine framework (engine/) and a small demo game (src/, include/) that drops a physics-driven cube onto a plane with a free-look camera.
- 🧵 Multithreaded frame loop — a dedicated render thread synchronized with the main (update) thread via binary semaphores, with
MAX_FRAMES_IN_FLIGHT = 2 - 📊 Built-in profiler overlay — FPS, CPU/GPU thread times and wait times plotted live with ImGui
- 🗄️ Vulkan abstractions — device selection, swapchain, render passes, graphics pipelines & pipeline layouts, command buffers, shaders, images and debug utils wrapped in small RAII-style classes
- 💾 VMA-backed buffers — uniform buffers and push-constant buffers built on Vulkan Memory Allocator
- 🧱 Bullet physics integration —
GameWorldmanages game objects with rigid bodies and collision shapes - 📦 OBJ mesh loading — models loaded via
OBJ_Loaderand indexed 16-bit meshes - 💡 Blinn-Phong lit pipeline — ambient + diffuse + specular shading in GLSL, compiled to SPIR-V
- 🎥 FPS-style camera — raw mouse input, cursor locking, WASD fly movement
- 🧩 Application framework — derive from
Engine::Application, overridecreateWindow/loadAssets/init/update/render/guiand callEngine::Engine::run(game)
| Input | Action |
|---|---|
W A S D |
Fly camera |
| Mouse | Look around |
Esc |
Toggle cursor lock |
| Dependency | Purpose |
|---|---|
| Vulkan + Vulkan-Headers | Graphics API |
| VulkanMemoryAllocator | GPU memory management |
| GLFW | Windowing & input |
| glm | Math |
| Bullet3 | Physics |
| Dear ImGui (Vulkan & GLFW bindings) | Debug UI |
| meshoptimizer | Mesh optimization |
| plog | Logging |
| stb, zlib, aklomp/base64 | Images, compression, encoding |
All dependencies are managed through the vcpkg manifest (vcpkg.json).
Requirements: CMake ≥ 3.25, a C++20 compiler (MSVC) and vcpkg. The Vulkan loader and headers come from vcpkg, so the Vulkan SDK is only needed for glslc (shader compilation) and for the validation layers used by Debug builds.
git clone https://github.com/kewldan/VulkanEngine.git
cd VulkanEngine
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release `
-DCMAKE_TOOLCHAIN_FILE=<path-to-vcpkg>/scripts/buildsystems/vcpkg.cmake `
-DVCPKG_TARGET_TRIPLET=x64-windows-static
cmake --build build --config ReleaseGLSL sources in shaders/ must be compiled to SPIR-V (data/shaders/*.spv) with glslc from the Vulkan SDK:
.\shader_compilation.batThe script uses %VULKAN_SDK%\Bin\glslc.exe when VULKAN_SDK is set, otherwise glslc from PATH. Run the executable from the repository root so it can find the data/ folder.