# rblxdecomp/rbxgsdecomp architecture

> Architecture diagram of the GitHub repository rblxdecomp/rbxgsdecomp, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rblxdecomp/rbxgsdecomp
- Repository: https://github.com/rblxdecomp/rbxgsdecomp

## Overview

RBXGS is a decompilation of Roblox Grid Service 0.3.634.0, focused on recovering engine behavior rather than providing a standalone user-facing product. The principal runtime path represented by the tree is interactive control of a modeled world, with simulation and rendering as distinct stages; networking, scripting, serialization, and editor interaction are significant adjacent capabilities. The README identifies v8kernel and v8world as current priorities. The graph uses sampled source for concrete relationships; other subsystem links are omitted where the excerpts do not establish their wiring.

Main entry points: [`Client/App/v8datamodel/UserController.cpp`](https://github.com/rblxdecomp/rbxgsdecomp/blob/master/Client/App/v8datamodel/UserController.cpp) (Input controllers), [`Client/App/v8world/ContactManager.cpp`](https://github.com/rblxdecomp/rbxgsdecomp/blob/master/Client/App/v8world/ContactManager.cpp) (Contact manager), [`Client/App/v8tree/Instance.cpp`](https://github.com/rblxdecomp/rbxgsdecomp/blob/master/Client/App/v8tree/Instance.cpp) (Instance tree), [`Client/App/v8tree/Service.cpp`](https://github.com/rblxdecomp/rbxgsdecomp/blob/master/Client/App/v8tree/Service.cpp) (Service provider)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_world["World simulation"]
  node_pipeline["World pipeline<br/>[IPipelined.cpp]"]
  node_physics["Kernel solver<br/>[Kernel.cpp]"]
  node_world["World stages<br/>[World.cpp]"]
  node_contacts["Contact manager<br/>[ContactManager.cpp]"]
  node_spatial["Spatial hash<br/>[SpatialHash.cpp]"]
end

subgraph group_model["Data model"]
  node_datamodel["Data model<br/>[DataModel.cpp]"]
  node_instances["Instance tree<br/>[Instance.cpp]"]
  node_services["Service provider<br/>[Service.cpp]"]
  node_worldmodel["Workspace<br/>[Workspace.cpp]"]
end

subgraph group_interaction["Interaction"]
  node_input["Input controllers<br/>[UserController.cpp]"]
  node_humanoid["Humanoid states<br/>[Humanoid.cpp]"]
  node_tools["Editing tools<br/>[Dragger.cpp]"]
  node_gui["GUI widgets<br/>[GUI.cpp]"]
end

subgraph group_presentation["Presentation"]
  node_renderer["Render scene<br/>[RenderScene.cpp]"]
  node_aggregation["Scene aggregation"]
end

subgraph group_platform["Runtime services"]
  node_scripts["Lua scripts<br/>[Script.cpp]"]
  node_reflection["Reflection system<br/>[type.cpp]"]
  node_network["Replication<br/>[Replicator.cpp]"]
  node_identity["Instance IDs<br/>[IdManager.cpp]"]
  node_serialization["XML serialization<br/>[XmlSerializer.cpp]"]
end

node_player(("Player"))
node_networkpeer(("Network peer"))

node_player -->|"provides controls"| node_input
node_input -->|"creates controllers"| node_services
node_input -->|"reads targets"| node_worldmodel
node_input -->|"subscribes heartbeat"| node_input
node_pipeline -->|"locates kernel stage"| node_physics
node_contacts -->|"updates broad phase"| node_spatial
node_contacts -->|"inserts contacts"| node_world
node_contacts -->|"destroys contacts"| node_world
node_services -->|"registers services"| node_instances
node_scripts -->|"uses reflected API"| node_reflection
node_networkpeer -->|"exchanges replication"| node_network
node_identity -->|"indexes instances"| node_instances
node_serialization -->|"serializes tree"| node_instances
node_aggregation -->|"adds scene chunks"| node_renderer

click node_input "https://github.com/rblxdecomp/rbxgsdecomp/blob/master/Client/App/v8datamodel/UserController.cpp"
click node_humanoid "https://github.com/rblxdecomp/rbxgsdecomp/blob/master/Client/App/humanoid/Humanoid.cpp"
click node_tools "https://github.com/rblxdecomp/rbxgsdecomp/blob/master/Client/App/tool/Dragger.cpp"
click node_gui "https://github.com/rblxdecomp/rbxgsdecomp/blob/master/Client/App/gui/GUI.cpp"
click node_datamodel "https://github.com/rblxdecomp/rbxgsdecomp/blob/master/Client/App/v8datamodel/DataModel.cpp"
click node_instances "https://github.com/rblxdecomp/rbxgsdecomp/blob/master/Client/App/v8tree/Instance.cpp"
click node_services "https://github.com/rblxdecomp/rbxgsdecomp/blob/master/Client/App/v8tree/Service.cpp"
click node_worldmodel "https://github.com/rblxdecomp/rbxgsdecomp/blob/master/Client/App/v8datamodel/Workspace.cpp"
click node_pipeline "https://github.com/rblxdecomp/rbxgsdecomp/blob/master/Client/App/v8world/IPipelined.cpp"
click node_physics "https://github.com/rblxdecomp/rbxgsdecomp/blob/master/Client/App/v8kernel/Kernel.cpp"
click node_world "https://github.com/rblxdecomp/rbxgsdecomp/blob/master/Client/App/v8world/World.cpp"
click node_contacts "https://github.com/rblxdecomp/rbxgsdecomp/blob/master/Client/App/v8world/ContactManager.cpp"
click node_spatial "https://github.com/rblxdecomp/rbxgsdecomp/blob/master/Client/App/v8world/SpatialHash.cpp"
click node_scripts "https://github.com/rblxdecomp/rbxgsdecomp/blob/master/Client/App/script/Script.cpp"
click node_reflection "https://github.com/rblxdecomp/rbxgsdecomp/blob/master/Client/App/reflection/type.cpp"
click node_network "https://github.com/rblxdecomp/rbxgsdecomp/blob/master/Client/Network/Replicator.cpp"
click node_identity "https://github.com/rblxdecomp/rbxgsdecomp/blob/master/Client/Network/IdManager.cpp"
click node_serialization "https://github.com/rblxdecomp/rbxgsdecomp/blob/master/Client/App/v8xml/XmlSerializer.cpp"
click node_renderer "https://github.com/rblxdecomp/rbxgsdecomp/blob/master/Client/Rendering/RenderLib/RenderScene.cpp"
click node_aggregation "https://github.com/rblxdecomp/rbxgsdecomp/blob/master/Client/Rendering/RenderLib/AggregatingSceneManager.cpp"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_pipeline,node_physics,node_world,node_contacts,node_spatial toneBlue
class node_datamodel,node_instances,node_services,node_worldmodel toneAmber
class node_input,node_humanoid,node_tools,node_gui toneMint
class node_renderer,node_aggregation toneRose
class node_scripts,node_reflection,node_network,node_identity,node_serialization,node_player,node_networkpeer toneIndigo
```

## Components

### World simulation

- [World pipeline](https://github.com/rblxdecomp/rbxgsdecomp/blob/master/Client/App/v8world/IPipelined.cpp): `Client/App/v8world/IPipelined.cpp`
- [Kernel solver](https://github.com/rblxdecomp/rbxgsdecomp/blob/master/Client/App/v8kernel/Kernel.cpp): `Client/App/v8kernel/Kernel.cpp`
- [World stages](https://github.com/rblxdecomp/rbxgsdecomp/blob/master/Client/App/v8world/World.cpp): `Client/App/v8world/World.cpp`
- [Contact manager](https://github.com/rblxdecomp/rbxgsdecomp/blob/master/Client/App/v8world/ContactManager.cpp): `Client/App/v8world/ContactManager.cpp`
- [Spatial hash](https://github.com/rblxdecomp/rbxgsdecomp/blob/master/Client/App/v8world/SpatialHash.cpp): `Client/App/v8world/SpatialHash.cpp`

### Data model

- [Data model](https://github.com/rblxdecomp/rbxgsdecomp/blob/master/Client/App/v8datamodel/DataModel.cpp): `Client/App/v8datamodel/DataModel.cpp`
- [Instance tree](https://github.com/rblxdecomp/rbxgsdecomp/blob/master/Client/App/v8tree/Instance.cpp): `Client/App/v8tree/Instance.cpp`
- [Service provider](https://github.com/rblxdecomp/rbxgsdecomp/blob/master/Client/App/v8tree/Service.cpp): `Client/App/v8tree/Service.cpp`
- [Workspace](https://github.com/rblxdecomp/rbxgsdecomp/blob/master/Client/App/v8datamodel/Workspace.cpp): `Client/App/v8datamodel/Workspace.cpp`

### Interaction

- [Input controllers](https://github.com/rblxdecomp/rbxgsdecomp/blob/master/Client/App/v8datamodel/UserController.cpp): `Client/App/v8datamodel/UserController.cpp`
- [Humanoid states](https://github.com/rblxdecomp/rbxgsdecomp/blob/master/Client/App/humanoid/Humanoid.cpp): `Client/App/humanoid/Humanoid.cpp`
- [Editing tools](https://github.com/rblxdecomp/rbxgsdecomp/blob/master/Client/App/tool/Dragger.cpp): `Client/App/tool/Dragger.cpp`
- [GUI widgets](https://github.com/rblxdecomp/rbxgsdecomp/blob/master/Client/App/gui/GUI.cpp): `Client/App/gui/GUI.cpp`

### Presentation

- [Render scene](https://github.com/rblxdecomp/rbxgsdecomp/blob/master/Client/Rendering/RenderLib/RenderScene.cpp): `Client/Rendering/RenderLib/RenderScene.cpp`
- [Scene aggregation](https://github.com/rblxdecomp/rbxgsdecomp/blob/master/Client/Rendering/RenderLib/AggregatingSceneManager.cpp): `Client/Rendering/RenderLib/AggregatingSceneManager.cpp`

### Runtime services

- [Lua scripts](https://github.com/rblxdecomp/rbxgsdecomp/blob/master/Client/App/script/Script.cpp): `Client/App/script/Script.cpp`
- [Reflection system](https://github.com/rblxdecomp/rbxgsdecomp/blob/master/Client/App/reflection/type.cpp): `Client/App/reflection/type.cpp`
- [Replication](https://github.com/rblxdecomp/rbxgsdecomp/blob/master/Client/Network/Replicator.cpp): `Client/Network/Replicator.cpp`
- [Instance IDs](https://github.com/rblxdecomp/rbxgsdecomp/blob/master/Client/Network/IdManager.cpp): `Client/Network/IdManager.cpp`
- [XML serialization](https://github.com/rblxdecomp/rbxgsdecomp/blob/master/Client/App/v8xml/XmlSerializer.cpp): `Client/App/v8xml/XmlSerializer.cpp`

### Other components

- **Player**
- **Network peer**

## Connections

- Player → Input controllers: provides controls
- Input controllers → Service provider: creates controllers
- Input controllers → Workspace: reads targets
- Input controllers → Input controllers: subscribes heartbeat
- World pipeline → Kernel solver: locates kernel stage
- Contact manager → Spatial hash: updates broad phase
- Contact manager → World stages: inserts contacts
- Contact manager → World stages: destroys contacts
- Service provider → Instance tree: registers services
- Lua scripts → Reflection system: uses reflected API
- Network peer → Replication: exchanges replication
- Instance IDs → Instance tree: indexes instances
- XML serialization → Instance tree: serializes tree
- Scene aggregation → Render scene: adds scene chunks
