Problem & Constraints
Standard 2D engines rely on either flat sprites or brittle shadow-map hacks that break down with dozens of emissive light sources. I built a custom C++20/Vulkan 1.3 engine to hit locked frame times with real-time 2D global illumination, deterministic memory lifetimes, and custom spatialized audio without third-party runtime bloat.
Architecture & Tradeoffs
- World-Space Radiance Cascades + Jump Flood Algorithm (JFA): Precomputes a signed distance field per frame via JFA so raymarching steps safely across empty space, keeping diffuse bounce lighting and soft penumbras independent of light count.
- Task Parallelism (
enkiTS+custom entity handler): Decouples simulation, physics, and command-buffer recording across worker threads with custom arena/pool allocators to eliminate per-frame heap fragmentation. - Custom Audio Engine (
miniaudio+stb_vorbis): Implements real-time spatialization, reverb, echo, and EQ directly in the audio callback without pulling in heavyweight commercial middleware.
Debugging & Performance Win
Add a concrete RenderDoc capture breakdown, GPU pass timing table, or synchronization/barrier bug you solved here.
| Render Pass | Before Optimization | After Optimization |
|---|---|---|
| JFA Distance Field | — ms | — ms |
| Radiance Cascade Merge | — ms | — ms |
| Total Frame Time | — ms | — ms |