A world is a collection of decisions#
An engine is the machinery between a creator’s intention and a player’s experience. If a character walks into a room, the engine changes its position, blends its animation, checks collisions, loads nearby assets, calculates visibility, builds GPU commands, and updates the sounds around the listener. A renderer is one part of that machinery. QubicEngine organizes this work around explicit ownership. The simulation owns the world’s state. The renderer owns its GPU resources. The asset system bridges files and runtime objects. Each boundary has a defined data format and a defined point at which work becomes visible to another system.
The systems and their contracts#
| System | Owns | Publishes |
|---|---|---|
| Scene | Entities, components, local transforms | A simulation state |
| AssetStore | Asset records, decode jobs, readiness | Stable handles and ready versions |
| AnimationSystem | Playback state and local poses | Joint palettes and events |
| PhysicsWorld | Collision state and fixed-step bodies | Authoritative dynamic transforms |
| Renderer | RenderWorld, RenderGraph, GPU allocations | A presented frame and timings |
| AudioWorld | Voices, listener, decoded sound data | Mixed audio at the audio device’s rate |
| Editor | Commands, selection, documents | Reversible scene edits |
The main thread runs input and coordinates updates. A job system parallelizes independent simulation and import tasks. A render thread consumes an immutable RenderWorld snapshot instead of reaching into components while another thread changes them.
Follow an object#
A model file enters AssetStore as a request. Decoding produces mesh vertices, indices, material slots, and animation tracks. Upload work fills GPU resources, and completion publishes a ready asset version. A MeshRenderer component keeps an asset handle and material overrides, rather than storing a raw graphics API pointer. During extraction, the renderer copies the object’s world matrix, bounds, mesh handle, material handle, and optional skin palette into RenderWorld. Visibility selects useful instances. RenderGraph orders passes and resource transitions. GraphicsDevice turns those decisions into DirectX 12 commands, or Vulkan commands when that backend is selected.
Rendering choices#
QubicEngine’s reference renderer uses deferred lighting for opaque surfaces, tiled light lists, forward shading for transparency, a linear HDR intermediate, temporal reconstruction, and tone mapping into a display image. Shadows and global illumination supply additional lighting inputs. The advanced chapters explain where each approximation spends memory, compute time, or quality. A Vulkan backend implements the same resource and command contracts. The primary learning path uses DX12 because it makes the ownership and scheduling choices concrete on Windows. Shared C++ systems do not imply identical API objects or identical barrier rules.
Choose a system to inspect#
Architecture & ownership
Understand modules, stable handles, immutable render snapshots, and the boundary between an engine and its graphics backends.
Explore chapter Engine / CHAPTERThe life of a frame
Trace input, fixed simulation, animation, extraction, recording, GPU execution, presentation, and safe cleanup.
Explore chapter Engine / CHAPTERScenes, entities & transforms
Build a world from stable entity identities, components, parent transforms, fixed simulation, and serialized scene data.
Explore chapter Engine / CHAPTERAssets: from disk to draw
Follow decoding, staging, copies, descriptors, mipmaps, streaming, caching, and fence-based retirement through one connected asset lifecycle.
Explore chapter Engine / CHAPTERMeshes & materials
Turn vertices, indices, UVs, texture channels, and shader parameters into a complete draw packet.
Explore chapter Engine / CHAPTERAnimation: a pose in motion
Follow clips through sampling, local-pose blending, hierarchy evaluation, inverse bind matrices, GPU skinning, and animation events.
Explore chapter Engine / CHAPTERPhysics & fixed simulation
Connect collision detection, rigid-body integration, triggers, interpolation, and authoritative scene transforms.
Explore chapter Engine / CHAPTERAudio in a spatial world
Understand listeners, sources, attenuation, mixing, asset lifetime, and timing without tying sound generation to frame rate.
Explore chapter Engine / CHAPTEREditor: a view into the world
Connect scene hierarchy, selection, transforms, properties, reversible commands, serialization, and play mode.
Explore chapter Engine / CHAPTEROptimization is a measurement
Find the bottleneck, understand the tradeoff, and spend effort where it changes frame time.
Explore chapter