Skip to content

Engine Internals

The manual describes the engine from a game developer’s seat. This section describes it from the inside: the C++ subsystems, the threading model, the render pipeline, and the tooling that generates half of the code you will read.

It assumes you have written C++ engine code before and are new to this codebase. It does not re-explain what a command buffer or an ECS is; it explains what Lumina’s version of them does differently and why.

If you are landing in the repository for the first time, read these in order.

  1. Application Lifecycle, from WinMain to the first rendered frame, and back out through shutdown.
  2. Threading Model, which threads exist, what each may touch, and where the hand-offs are.
  3. The Object System, CObject, classes, packages, and object lifetime. Almost every asset and settings type is one.
  4. Reflection and Code Generation, the Clang-based Reflector that produces .generated.h files and C# bindings.
  5. RHI and Frame Pipeline, the rendering half.
LuminaMain (Launch.cpp)
FApplicationGlobalState threading + logging
FCommandLine, FConfig
FEngine / FEditorEngine the engine singleton (GEngine)
FApplication::Run window creation, then the main loop
FEngine::Init subsystems come up here
while (!exit)
FWindow::ProcessMessages GLFW event pump
FEngine::Update one frame, six update stages
FEngine::Shutdown

FEngine::Update drives everything else:

FEngine::Update
FWorldManager::WaitForPhysics join last frame's physics
FWorldManager::UpdateWorlds per stage: FrameStart .. FrameEnd
CWorld::Update entity systems, scripts, transforms
CWorld::Extract game -> render snapshot (FrameEnd)
FRenderManager::FrameEnd enqueue the render-thread pipeline
FWorldManager::KickPhysics fire physics for next frame

and the render side:

FRenderThread drain (a job on a pool worker)
RHI::Core::BeginFrame(slot) wait the frame timeline, recycle lists
IRenderScene::PrepareRender serial, device-wide reconciliation
IRenderScene::RenderView per scene, records + submits
ImGui / RmlUi composite
RHI::Core::Present acquire, blit, present
DirectoryWhat lives there
Engine/Source/Runtime/CoreObject system, reflection runtime, serialization, delegates, math, threading primitives, console variables, profilers
Engine/Source/Runtime/ContainersEASTL aliases, FString, FName, and the engine-specific container types
Engine/Source/Runtime/MemoryAllocator facade over rpmalloc, frame and linear allocators, memory tracking
Engine/Source/Runtime/TaskSystemFiber job scheduler, ParallelFor, task graph, futures, fiber-aware sync
Engine/Source/Runtime/RendererRHI declaration, Vulkan backend, shader compiler and cache, material manager, render thread
Engine/Source/Runtime/WorldCWorld, the EnTT registry facade, entity systems, and the render scene
Engine/Source/Runtime/AssetsAsset registry, asset manager, asset types
Engine/Source/Runtime/Scripting.NET host, interop surface, script structs
Engine/Source/Runtime/PhysicsPhysics facade and the Jolt backend
Engine/Source/Runtime/UIRmlUi integration
Engine/Source/Runtime/ToolsImGui plumbing, importers, transactions, primitives, fonts
Engine/EditorEverything editor-only: tools, panels, property grid, node graphs
Engine/Applications/LuminaThe executable entry point
Engine/Applications/ReflectorThe code generator
Engine/Source/LuminaSharpThe managed (C#) engine API
Engine/Tools/LuminaBuildToolThe build tool: rules compilation, the module graph, the reflection step, project generation
Engine/BuildShared build rules (*.BuildRules.cs) and BuildConfiguration.json
PageSubject
Application LifecycleStartup, the main loop, update stages, shutdown
Modules and PluginsModule manager, DLL boundaries, plugin load phases
Threading ModelThreads, ownership rules, hand-off points
Task SystemFiber scheduler, counters, ParallelFor, task graph
MemoryAllocators, frame arenas, tracking
Math and ContainersThe in-house math library, SIMD, EASTL aliases, FName
Delegates and EventsDelegates, reentrancy, core delegates, input events
Configuration and SettingsFConfig, developer settings classes, live refresh
The Object SystemCObject, CClass, packages, handles, lifetime
Reflection and Code GenerationReflector, generated headers, C# binding emission
SerializationArchives, package format, the phased loader
AssetsRegistry, manager, VFS, cooking
ECS InternalsRegistry facade, systems, execution and validation
Physics InternalsJolt facade, bodies, constraints, queries, the job bridge
Animation InternalsPoses, the graph VM, the task system, root motion, notifies
Networking InternalsTransport, net GUIDs, the replication graph, the wire protocol
Audio InternalsThe audio context, command queue, voices, buses, spatialization
RHIThe graphics abstraction
Vulkan BackendDevice, queues, memory, descriptors, swapchain
Frame PipelineRender thread, extract, frames in flight
Render PassesThe scene renderer, pass by pass
ShadersSlang compilation, cache, conventions
Scripting HostCoreCLR hosting and interop
Editor ArchitectureEditor engine, tools, panels, transactions
Platform LayerWindowing, input, filesystem, process, crash handling
DiagnosticsLogging, console variables, profilers, GPU debugging
Build SystemLuminaBuildTool, targets, modules, plugins, rules files
  • F prefix for plain structs and classes (FEngine, FRenderManager).
  • C prefix for reflected CObject classes (CWorld, CTexture).
  • S prefix for reflected non-object structs (SPostProcessSettings).
  • E prefix for enums, I prefix for interfaces.
  • G prefix for globals (GEngine, GRenderManager, GWorldManager).
  • Allman braces, PascalCase members, no Hungarian notation beyond the prefixes above except b for booleans.
  • _GameThread / _RenderThread suffixes mark functions with a hard thread affinity.