Architecture overview
This chapter explains how the engine fits together. Each page covers one subsystem; together
they describe the whole stack from the Instance base class down to the pixels and packets.
The big picture
Design principles of the 2016 engine
- Everything is an
Instance. The scene, the GUI, the services, the scripts — all objects derive fromRBX::Instanceand live in one tree rooted at theDataModel. (Instance tree & reflection) - Reflection drives both the editor and Lua. Properties, methods and events are described once via reflection descriptors; Studio property grids, XML/binary serialization and the Lua API are all generated from that single source of truth. (Scripting, Reflection)
- The DataModel is a scheduled, mostly single-threaded world. Work runs as Jobs on a
central
TaskScheduler; an Arbiter system decides which jobs may run concurrently (rendering and physics overlap; DataModel mutation does not). (Jobs & the TaskScheduler) - Clients and servers share the same engine.
RCCServiceruns the identicalAppengine headless; theNetwork/stack replicates Instance-tree changes between peers with specialized channels for physics. (Networking) - Rendering is layered. Device abstraction (
GfxCore) under scene rendering (GfxRender,RbxG3Don G3D math) under engine draw code (AppDraw, adornments), with multiple backends: D3D9, D3D11, OpenGL. (Rendering)
Chapter contents
- Instance tree & reflection —
RBX::Instance, descriptors, services - The DataModel — services, parts, GUI, gameplay instances
- Jobs & the TaskScheduler — threading model
- Scripting (Lua) — VMs, bridges, CoreScripts, security
- Physics — world, kernel, solver, humanoids, Bullet
- Rendering — graphics stack and backends
- Networking — RakNet, replication, physics sync
- Serialization — XML/binary place & model formats
- Terrain & CSG — voxels, smooth terrain, boolean geometry
Each subsystem has a matching deep-dive in the Module Reference.