I started this project to understand the low-level architecture beneath modern game engines,
rather than simply scripting on top of existing commercial platforms. Building a game engine
from scratch forced me to address core hardware interactions and strict memory boundaries directly.
By writing my own renderer, custom memory pools, scene management, and tooling interface,
I gained a deep appreciation for the trade-offs involved in real-time systems design. It serves
as a playground to study performance limits, Data-Oriented Design (DOD), cache locality, and graphics API pipelines.
Working at this level requires strong fundamentals in C++ memory management, systems design,
and direct GPU programming, shifting the focus from using tools to building them.
// concept
What it is
The prototype is a fully functioning, two-project visual development workspace that splits
engine runtime systems from client sandbox logic:
Real-time 3D rendering
The engine renders 3D objects in real time using the Vulkan graphics API,
the same low-level graphics technology used in professional game productions.
Geometry is processed on the GPU each frame using custom-written shader programs.
Built-in visual editor
The engine includes an interactive editor panel, similar to Unity's Inspector,
to browse scene objects, rename them, and adjust their position, color, and shape in real time
without restarting the application.
3D transform gizmos
Clicking an object in the 3D viewport shows a set of interactive handles, the same colored
arrows and rings found in Unity or Blender. These handles can be dragged to move, rotate, or resize
objects directly inside the scene.
Click-to-select in the viewport
Clicking anywhere in the 3D viewport selects the object under the cursor. This is done
with raycasting: a ray is projected from the camera through the mouse
position into the 3D scene to find which object was clicked.
Scene save & load
The full scene, including every object, its position, color, and type, can be saved
to a file and reloaded later. The system is extensible by design:
custom object types added by a game developer are automatically included in saves,
with no changes needed to the engine itself.
Component-based object model
Objects are built by attaching small, focused data pieces called components:
a position, a mesh, a material, a camera. This is the same pattern used by Unity and Unreal.
It keeps the codebase flexible and makes adding new behavior straightforward.
Modular engine / game split
The engine is compiled as a separate static library that a game project
links against, similar to how Unity separates its runtime from a user project.
The included sandbox game shows how small a game-side script can be when the engine
handles the infrastructure.
Multi-threaded job system
Distributes heavy engine computations (like animation deforms and physics updates) across all available CPU cores. This prevents lag spikes, maximizes performance, and ensures a stable frame rate.
Skeletal character animation
Animates complex 3D characters smoothly using virtual skeletons, blending walking and running movements dynamically, and automatically adjusting foot placement relative to the ground.
3D physics & collision engine
Simulates realistic physical movement (gravity, drag, object weight) and calculates precise collisions, allowing objects to bounce, slide, and tilt naturally.
Direct FBX asset importer
Natively imports industry-standard 3D models and animation files at runtime, converting complex multi-track animations into optimized memory structures.
Custom reflection system
Automatically tracks C++ object properties to enable instant saving/loading of game worlds and displays properties in the editor inspector without requiring manual code bindings.
Interactive sandbox game
Demonstrates the engine's capabilities in a demo level featuring physics-controlled player movement and a physics-based gravity gun interaction script.
Atmospheric scattering & dynamic weather
Simulates physically based planetary skies using real-time GPU compute LUTs (transmittance, multi-scattering, skyview, aerial perspective), volumetric raymarched cloud decks, day/night celestial bodies, and dynamic weather (rain, snow, ground wetness/puddles, and procedural lightning bolts).
Sculptable terrain & hybrid foliage engine
Features real-time 3D viewport heightfield sculpting with Hermite falloff brushes (Raise, Lower, Smooth, Flatten, Noise), multi-layer texture splatting with slope auto-texturing, multi-tile border seam stitching, and GPU-instanced swaying vegetation with vertex-driven wind.
Cinemachine procedural virtual cameras
Implements dynamic camera tracking including 3rd-person orbital follow, 1st-person skeletal bone-locking (attaching directly to character head bones), exponential position/rotation damping, dead zones, and priority-blended camera transitions.
Infinite 3D grid world & 2D tilemaps
Supports 3D spatial voxel grids with infinite chunk hashing, Fast Voxel Traversal (3D DDA raycasting) for precision building, multi-layer 2D tilemaps, automatic sprite sheet slicing, and 2D/3D A* pathfinding.
Fluent UI builder & interface engine
A retained-mode UI system featuring Canvas overlays, RectTransform layouts, interactive widgets (buttons, sliders, toggles), pre-built gameplay templates (health bars, dialogues, inventories), and a one-click C++ code generator for the editor.
Post-processing & runtime shader compiler
Multipass rendering pipeline featuring Cascaded Shadow Maps (CSM), Screen-Space Ambient Occlusion (SSAO), photographic HDR tonemapping (ACES, AgX, Filmic, Reinhard), and an integrated glslc runtime shader compiler with timestamp caching.
Unified profiler & Tracy integration
Features an in-engine 120-frame rolling performance monitor with timeline scrubber and category breakdown, coupled with deep nanosecond callstack profiling via Tracy Profiler.
// challenges
Key challenges
Vulkan Verbosity & Safety: Vulkan has zero runtime safety fallback. Overcoming silent black screens involved implementing validation layers and diagnostics render passes (ensures rendering is stable and bug-free on different graphics cards).
Real-Time Atmospheric Scattering LUTs: Evaluating multi-bounce atmospheric integrals per pixel across screen space is computationally prohibitive. Decoupled optical depth and in-scattering into 4 compute shader passes (Transmittance, Multi-Scattering, SkyView, and 3D Aerial Perspective) evaluated once per frame (delivers photorealistic skies and dynamic day/night cycles at 60+ FPS).
Live Terrain Sculpting without VRAM Bottlenecks: Re-uploading full heightfield meshes on every brush stroke caused massive CPU-GPU synchronization stalls. Resolved by partitioning terrains into submesh chunks and dispatching partial staging buffer uploads only for dirty chunks (enables smooth 60 FPS viewport terrain sculpting).
Dynamic Plugin Boundary & State Sync: Hot-reloading systems across DLL boundaries often leads to memory address fragmentation and broken UI states. Engineered a clean C ABI handshake passing explicit registry, system manager, and ImGui context pointers (allows modular plugins like Skymo and Cinemachine to run seamlessly without engine recompilation).
Racy Stack Allocations in Job System: Worker thread synchronization originally used stack-allocated primitives, causing random crashes when the main thread exited early. This was resolved with a lock-free atomic chunk counter and cooperative spin-yielding (prevents game memory crashes during heavy multi-threaded workloads).
OBB Collision & Rotational Impulses: Calculating physical interactions for rotating rectangular boxes is mathematically complex. I implemented Separating Axis Theorem (SAT) checks across 15 projection axes and 3D rotational impulse physics (provides realistic movements like boxes tilting, sliding, and bouncing).
// architecture
How it works
Dynamic Plugin Host: Modular subsystems (Skymo atmosphere, Cinemachine cameras, A* pathfinding) compile into isolated shared libraries loaded dynamically at runtime via a unified C ABI (accelerates development cycles and keeps core engine builds lightweight).
Data-Oriented ECS & Cloning: Component data is stored contiguously in dense memory pools using the Swap-Remove pattern rather than deep inheritance trees, paired with deep entity cloning (maximizes CPU cache locality and makes entity duplication instant).
Compute-Driven Atmosphere & Weather: Real-time atmospheric radiance is driven by GPU compute pipelines, while volumetric raymarched clouds, rain/snow particles, and procedural lightning meshes render dynamically in the viewport.
Chunked Terrain & Instanced Vegetation: Terrains partition into spatial submesh chunks with Hermite smoothstep deformation, automated multi-tile seam stitching, and GPU-instanced swaying foliage.
Multipass Vulkan Pipeline: Coordinates Cascaded Shadow Maps (CSM), SSAO contact shadows with bilateral blur, HDR photographic tonemapping (ACES, AgX, Filmic), and an integrated glslc runtime shader compiler with timestamp caching.
Unified Profiler & Tracy Integration: Features an in-engine 120-frame rolling performance monitor with timeline scrubber and category breakdown, coupled with deep nanosecond callstack profiling via Tracy Profiler.