TRIZYAL.TECH
C++• VULKAN•JOLT PHYSICS•ECS ARCHITECTURE

Ubiquitous Reality (UBQR)

A custom-built C++ vehicular game engine unifying a multi-pass Vulkan renderer, Jolt raycast vehicle physics, a pooled Entity-Component-System architecture, and real-time Dear ImGui inspection tools.

// ECS & GameWare

Hierarchical transforms, two-phase loading, and virtual custom GameWare pooling.

// Vulkan Renderer

Cook-Torrance PBR, player-centered directional shadows, MSAA, and custom stylization passes.

// Jolt Physics

Multithreaded simulation, raycast VehicleConstraint suspension, and spring-damped camera.

// Systems & Tooling

Double-buffered event queues, 0-1 normalized GLFW/SDL3 input, SoLoud 3D audio, and ImGui.

00 // Vision & Engine Philosophy

Why Build a Stylized Engine?

The project began with a simple goal: combining complex rendering effects and object-specific stylisation directly with responsive gameplay. After a couple of conversations, a random word-generator, and an early Vulkan prototype, I teamed up with a small group to build Ubiquitous Reality (UBQR) from scratch—starting with a playable racing loop and taking full ownership of the Vulkan loader, pipeline architecture, and shader effects.

General-purpose engines often introduce unnecessary bloat, rigid inheritance trees, or multi-pass shader stutters when pushed outside their target mold. By forgoing one-size-fits-all generalization, UBQR tailors every subsystem around vehicular action and bullet-hell combat—two genres that rely on rigid, non-humanoid models (side-stepping uncanny valley and heavy skeletal animation costs) while demanding high-density entity pooling and expressive NPR-over-PBR visuals.

Ubiquitous Reality (UBQR) Engine Logo
Hand-drawn Ubiquitous Reality engine typeface.
01 // Core Engine & ECS Architecture

GameWare Entities, Hierarchies & Two-Phase Loading

To avoid deep inheritance bottlenecks like the "Deadly Diamond" or "Bubble-Up" effect when managing hundreds of active projectiles and vehicles, UBQR uses a data-oriented Entity-Component-System (ECS) core. World objects are represented as GameWares equipped with default transform components and parent-child hierarchies. Calling getWorldTransform() iteratively resolves nested local-to-world matrix chains, while getModelTransforms() gives the renderer direct, low-overhead access to active scene geometry. Transform updates operate in a ping-pong synchronization loop with the physics engine so gameplay scripts and rigid-body simulations stay cleanly in sync.

As illustrated in Fig. 1, individual Component instances attach either to standard GameWare entities or developer-subclassed Custom GameWares that expose virtual lifecycle callbacks while remaining resident in memory. From there, entities register into Scene Component Space for direct scene instantiation or into Recipe Component Space to define a reusable Pool Recipe for multi-instance object pooling—allowing pooled and non-pooled GameWares to behave identically inside the active Scene.

To keep load times balanced and extensible, startup is split into engine initialization (subsystems and global allocators) and scene loading (component-space data), paired with dual engine/game delta clocks for time dilation and a built-in checkpoint and scoreboard save system.

GameWare Interfacing System Diagram
Fig. 1 — GameWare interfacing and pooling hierarchy from the developer's perspective.
UBQR Render Pass Pipeline
Fig. 2 — Linear multi-pass Vulkan rendering pipeline managed by RenderManager.
02 // Multi-Pass Vulkan Renderer

PBR, Stylised Object Shaders & Screen-Space Filters

The rendering subsystem initializes in two stages—allocating persistent Vulkan device resources and memory pools first, followed by scene-specific buffers and textures. At runtime, RenderManager orchestrates the linear multi-pass frame graph shown in Fig. 2, encapsulating Vulkan synchronization while exposing runtime shader arguments directly through the ECS.

For directional lighting, a dedicated shadow pass renders an orthographic depth map centered on the player vehicle (Fig. 3a) so shadows remain crisp in the player's view without static shadow edges swimming during movement (Fig. 3b). In the forward pass, hardware-queried max-sample MSAA resolves multi-sampled attachments to eliminate geometric aliasing (Fig. 4).

Beyond default Cook-Torrance PBR with tangent-space (TBN) normal mapping, model components can opt into custom style passes—injecting dedicated object-masking and kernel-filtering stages for dual-kernel toon-shaded smoke (Fig. 5a) and procedural noise energy-ball projectiles (Fig. 5b), followed by separable two-pass 1D Gaussian bloom (Fig. 6a), band-quantized posterization (Fig. 6b), and directional chromatic aberration:

  • Cook-Torrance PBR + TBN
    Beckmann NDF, Schlick Fresnel approximation, Lambertian diffuse, and per-fragment tangent-space normal mapping.
  • Player-Centered Shadow Maps
    Orthographic directional depth pass anchored to the player vehicle to eliminate static shadow swimming.
  • Toon & Energy Ball Shaders
    Two-stage object masking with dual square-kernel Gaussian/edge filters, color banding, and animated 2D noise.
  • Screen-Space Post-Processing
    Separable two-pass 1D Gaussian bloom, grayscale-quantized posterization, and directional chromatic aberration.
Directional Light Depth Shadow Map
Fig. 3a — Orthographic Directional Shadow Map
Shadows Rendered in Scene
Fig. 3b — Player-Centered Shadows Rendered
Aliased geometry vs Hardware MSAA enabled
Fig. 4 — Hardware Multi-Sampling Anti-Aliasing (Left: Aliased edges | Right: Max-sample MSAA resolved)
Dual-kernel Toon Shaded Smoke
Fig. 5a — Dual-Kernel Toon Shaded Smoke
Procedural Noise Energy Ball Bullets
Fig. 5b — Edge-Evaluated Energy Ball Shaders
Two-Pass Gaussian Bloom with PBR
Fig. 6a — Separable 1D Gaussian Bloom + PBR
Screen-Space Posterise Filter
Fig. 6b — Band-Quantized Posterise Filter
03 // Physics, Vehicles & Camera Rig

Jolt Integration & Raycast Wheeled Vehicles

UBQR integrates Jolt Physics via a multithreaded job system, mapping Rigidbody and Collider components into quadtree-partitioned BroadPhase layers with custom ContactListener callbacks.

Player vehicles are driven by Jolt’s VehicleConstraint and WheeledVehicleController. Tagged wheel GameWares automatically derive their radius, width, and chassis offsets directly from mesh bounding boxes so suspension, steering, and drifting stay visually locked to the 3D model. A dual-mode player camera (Follow and Top-Down) uses Jolt NarrowPhase shape casting with spring-damped collision avoidance to prevent wall clipping.

04 // Events & Input Abstraction

Backlog Event Queues & Normalized GLFW / SDL3 Input

To minimize per-frame polling overhead, UBQR uses a templated Observer event system with compile-time type IDs and a two-stage queue/backlog architecture: events emitted while draining the primary queue are deferred into a secondary backlog queue for the following frame, preventing infinite recursive event cascades.

On the input side, keyboard/mouse events from GLFW and controller/haptic rumble events from SDL3 are unified into a normalized 0–1 magnitude scale and mapped to rebindable InputAction components at runtime.

05 // Audio, UI & Runtime Inspector

SoLoud 3D Spatial Audio & Dear ImGui Debug Suite

Spatialized 3D audio and dynamic gameplay music playlists are powered by SoLoud, with real-time listener attenuation, panning, and post-processing filters. For both gameplay HUDs and engine diagnostics, UBQR integrates Dear ImGui—enabling live scene switching without restarts, real-time GameWare entity and component inspection, G-buffer/masking debug views, and interactive sliders for tuning shader parameters like emission, bloom thresholds, and filter kernels on the fly.

06 // Architecture & Showcase Poster

System Overview Poster

Ubiquitous Reality Engine Showcase Poster
Fig. 7 — Full project poster presented at the University of Leeds showcase, summarizing UBQR’s architecture, rendering passes, and Axiom Swerve benchmarks.