How nem0/lumixengine works
Purpose and entry points
Lumix Engine is a native C++ 3D game engine plus the Lumix Studio editor. Application startup is src/app/main.cpp; platform-specific Studio launchers are src/studio/win/main.cpp and src/studio/linux/main.cpp. Studio configuration and built-in assets begin under data/studio_default.ini and data/.
Engine kernel and modular runtime
The engine centers on a world/entity-component model, resource loading, reflection, and dynamically composed plugins/modules. Engine coordinates systems while World owns scene state; plugin/module boundaries allow renderer, physics, animation, Lua, navigation, audio, and UI features to attach to the core runtime.
• src/engine/engine.cpp
• src/engine/world.cpp
• src/engine/plugin.cpp
Core platform services
A shared core layer provides allocation, threading/fibers, job scheduling, logging, streams, paths, profiling, and OS abstractions. Platform-specific implementations are split between Windows and Linux; higher engine modules should depend on these abstractions rather than directly on OS facilities.
• src/core/job_system.cpp
• src/core/win/os.cpp
• src/core/linux/os.cpp
Editor and asset pipeline
Lumix Studio is an ImGui-based authoring environment around the runtime. It edits worlds/prefabs, exposes property/reflection-driven controls, watches project files, and compiles/imports assets. The key boundary is source project content versus runtime/editor asset representations; importers turn formats such as FBX into engine resources.
• src/editor/studio_app.cpp
• src/editor/asset_compiler.cpp
• src/renderer/editor/fbx_importer.cpp
Rendering and GPU pipeline
The renderer consumes world visibility/culling data and resource-backed models, materials, textures, terrain, particles, and shaders to issue GPU work. GPU abstraction currently includes a DirectX 12 backend; shader programs and post-processing effects are data-driven HLSL assets. Editor scene/game views use the same renderer through editor-facing integration.
• src/renderer/renderer.cpp
• src/renderer/gpu/gpu_dx12.cpp
• data/shaders/lighting.hlsl
Simulation, gameplay, and UI modules
Runtime behavior is supplied by specialized modules: PhysX-backed physics, Recast/Detour navigation, animation controllers/graphs, platform audio devices, Luau scripts, and UI resources/systems. These systems operate on engine world entities and are surfaced to users through editor plugins and Lua APIs.
• src/physics/physics_system.cpp
• src/navigation/navigation_system.cpp
• src/lua/lua_script_system.cpp
• src/ui/ui_system.cpp
Content, dependencies, and delivery
data/ contains engine defaults (shaders, materials, editor assets); demo/ is a runnable/sample project with serialized worlds (.unv), scripts, UI, models, navzones, and probes. Major vendored dependencies include PhysX, Luau, Recast/Detour, Dear ImGui, FreeType, meshoptimizer, and OpenFBX. Build/project generation uses Genie, with GitHub Actions driving build, test, and deployment workflows.
• demo/maps/demo/demo.unv
• external/physx/include/PxPhysics.h
• scripts/genie.lua
Main entry points: plugin.cpp Plugin system · studio_app.cpp Lumix Studio · engine.cpp Engine · renderer.cpp Renderer
Components 20
Core runtime
Shared engine services and ECS world runtime.
- Core services · Jobs, fibers, allocation, logging, streams, and OS services.
src/core/job_system.cpp - Engine · Composes modules and coordinates runtime systems.
src/engine/engine.cpp - World · Owns entities and scene state.
src/engine/world.cpp - Plugin system · Attaches feature modules to the engine.
src/engine/plugin.cpp
Studio and assets
Authoring, import, and project-content boundary.
- Studio launchers · Windows and Linux launch Lumix Studio.
- Lumix Studio · Edits worlds and exposes reflection-driven tools.
src/editor/studio_app.cpp - Asset compiler · Converts source project content into engine assets.
src/editor/asset_compiler.cpp - FBX importer
src/renderer/editor/fbx_importer.cpp - Engine data · Built-in editor assets, materials, and shaders.
data/studio_default.ini
Rendering
World rendering and GPU execution.
- Renderer · Consumes world visibility and resources to issue GPU work.
src/renderer/renderer.cpp - DirectX 12 backend
src/renderer/gpu/gpu_dx12.cpp - Shader programs · Data-driven lighting and post-processing programs.
data/shaders/lighting.hlsl
Feature modules
Runtime systems attached through engine plugins.
- Physics
src/physics/physics_system.cpp - Navigation
src/navigation/navigation_system.cpp - Lua scripting
src/lua/lua_script_system.cpp - UI system
src/ui/ui_system.cpp - PhysX
external/physx/include/PxPhysics.h
Build and delivery
Project generation and shipped sample content.
- Demo project · Runnable serialized worlds and project assets.
demo/maps/demo/demo.unv - Genie build generation
scripts/genie.lua
Other components
- Application startup
src/app/main.cpp
Connections 23
- Application startup → Engine: starts
- Studio launchers → Lumix Studio: launches
- Lumix Studio → Engine: hosts runtime
- Engine → Core services: uses
- Engine → World: coordinates
- Engine → Plugin system: loads modules through
- Plugin system → Renderer: attaches
- Plugin system → Physics: attaches
- Plugin system → Navigation: attaches
- Plugin system → Lua scripting: attaches
- Plugin system → UI system: attaches
- Physics → PhysX: uses
- Renderer → World: renders
- Renderer → DirectX 12 backend: submits GPU work
- Renderer → Shader programs: loads
- Lumix Studio → Renderer: drives scene views
- Lumix Studio → Asset compiler: invokes
- Asset compiler → FBX importer: uses
- Asset compiler → Engine data: produces runtime assets from
- Lumix Studio → Demo project: authors and opens
- Demo project → Asset compiler: provides source content
- Genie build generation → Application startup: generates build for
- Genie build generation → Lumix Studio: generates build for