Skip to main content

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​

  1. Everything is an Instance. The scene, the GUI, the services, the scripts — all objects derive from RBX::Instance and live in one tree rooted at the DataModel. (Instance tree & reflection)
  2. 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)
  3. 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)
  4. Clients and servers share the same engine. RCCService runs the identical App engine headless; the Network/ stack replicates Instance-tree changes between peers with specialized channels for physics. (Networking)
  5. Rendering is layered. Device abstraction (GfxCore) under scene rendering (GfxRender, RbxG3D on G3D math) under engine draw code (AppDraw, adornments), with multiple backends: D3D9, D3D11, OpenGL. (Rendering)

Chapter contents​

  1. Instance tree & reflection — RBX::Instance, descriptors, services
  2. The DataModel — services, parts, GUI, gameplay instances
  3. Jobs & the TaskScheduler — threading model
  4. Scripting (Lua) — VMs, bridges, CoreScripts, security
  5. Physics — world, kernel, solver, humanoids, Bullet
  6. Rendering — graphics stack and backends
  7. Networking — RakNet, replication, physics sync
  8. Serialization — XML/binary place & model formats
  9. Terrain & CSG — voxels, smooth terrain, boolean geometry

Each subsystem has a matching deep-dive in the Module Reference.