# fable2recomp/fable-return-to-albion architecture

> Architecture diagram of the GitHub repository fable2recomp/fable-return-to-albion, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/fable2recomp/fable-return-to-albion
- Repository: https://github.com/fable2recomp/fable-return-to-albion

## Overview

Return to Albion is a native PC/Android remake runtime for Fable II and III, combining statically recompiled game simulation with a new Godot presentation layer. The player supplies game media and title updates; the launcher verifies/extracts inputs and compiles a native payload, then Godot hosts gameplay, rendering, controls, and co-op. The repository also includes asset virtualization, shader translation, and an integrated modding SDK. README documents the broad runtime flow; source excerpts substantiate selected VFS and editor relationships, so unsampled subsystem links are omitted or marked unverified.

Main entry points: [`Godot/src/game/GameWorld.cs`](https://github.com/fable2recomp/fable-return-to-albion/blob/main/Godot/src/game/GameWorld.cs) (Godot game runtime), [`Godot/addons/bnk_mount/BnkMountPlugin.cs`](https://github.com/fable2recomp/fable-return-to-albion/blob/main/Godot/addons/bnk_mount/BnkMountPlugin.cs) (Modding hub and SDK), [`src/runtime/include/core/payload_bridge.h`](https://github.com/fable2recomp/fable-return-to-albion/blob/main/src/runtime/include/core/payload_bridge.h) (Native payload), [`rexglue-net/shadow/rexglue-sdk/src/rexnet/core/src/engine.rs`](https://github.com/fable2recomp/fable-return-to-albion/blob/main/rexglue-net/shadow/rexglue-sdk/src/rexnet/core/src/engine.rs) (Recompiler)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_setup["Setup and compilation"]
  node_media["Game media and TU"]
  node_setup_wizard["Install wizard<br/>[BnkMountPlugin.cs]"]
  node_codegen["Recompiler<br/>[engine.rs]"]
end

subgraph group_runtime["Game runtime"]
  node_native_payload["Native payload<br/>[payload_bridge.h]"]
  node_godot["Godot game runtime<br/>[GameWorld.cs]"]
  node_host_bridge["Host bridge<br/>[HostBridge.cs]"]
  node_fable2_hooks["Fable II hooks"]
end

subgraph group_assets["Assets and rendering"]
  node_fable2_vfs["Fable II virtual filesystem<br/>[open_pipeline.cpp]"]
  node_fable3_vfs["Fable III virtual filesystem"]
  node_asset_reader["Host asset reader"]
  node_shader_pipeline["Shader bank pipeline"]
end

subgraph group_modding["Modding tools"]
  node_mod_sdk["Modding hub and SDK<br/>[BnkMountPlugin.cs]"]
  node_mod_values["Mod value editor"]
  node_mod_exporter["Mod exporter"]
  node_babel["Babel localization<br/>[babel_database.cpp]"]
  node_gdb["GDB database<br/>[gdb_database.cpp]"]
end

subgraph group_multiplayer["Co-op networking"]
  node_rexnet["RexNet multiplayer<br/>[engine.rs]"]
  node_co_op["Local and online co-op"]
end

node_player(("Player"))

node_player -->|"selects title"| node_setup_wizard
node_media -->|"provides inputs"| node_setup_wizard
node_setup_wizard -->|"requests recompilation"| node_codegen
node_codegen -->|"compiles payload"| node_native_payload
node_native_payload -->|"runs with"| node_godot
node_godot -->|"bridges simulation"| node_host_bridge
node_native_payload -.->|"uses game hooks"| node_fable2_hooks
node_native_payload -->|"requests assets"| node_fable2_vfs
node_fable2_vfs -->|"reads host assets"| node_asset_reader
node_godot -.->|"uses translated shaders"| node_shader_pipeline
node_godot -.->|"loads Fable III assets"| node_fable3_vfs
node_player -->|"creates mods"| node_mod_sdk
node_mod_sdk -->|"edits values"| node_mod_values
node_mod_sdk -->|"exports packages"| node_mod_exporter
node_mod_values -->|"supplies edits"| node_mod_exporter
node_mod_sdk -.->|"supports overlays"| node_babel
node_mod_sdk -.->|"supports patches"| node_gdb
node_godot -->|"connects sessions"| node_rexnet
node_godot -->|"supports local play"| node_co_op

click node_setup_wizard "https://github.com/fable2recomp/fable-return-to-albion/blob/main/Godot/addons/bnk_mount/BnkMountPlugin.cs"
click node_codegen "https://github.com/fable2recomp/fable-return-to-albion/blob/main/rexglue-net/shadow/rexglue-sdk/src/rexnet/core/src/engine.rs"
click node_native_payload "https://github.com/fable2recomp/fable-return-to-albion/blob/main/src/runtime/include/core/payload_bridge.h"
click node_godot "https://github.com/fable2recomp/fable-return-to-albion/blob/main/Godot/src/game/GameWorld.cs"
click node_host_bridge "https://github.com/fable2recomp/fable-return-to-albion/blob/main/Godot/src/host/HostBridge.cs"
click node_fable2_hooks "https://github.com/fable2recomp/fable-return-to-albion/blob/main/Fable2/src/hooks/src/receive_items_hooks.cpp"
click node_fable2_vfs "https://github.com/fable2recomp/fable-return-to-albion/blob/main/Fable2/src/vfs/src/index/open_pipeline.cpp"
click node_fable3_vfs "https://github.com/fable2recomp/fable-return-to-albion/tree/main/Fable3/src/vfs"
click node_asset_reader "https://github.com/fable2recomp/fable-return-to-albion/blob/main/src/runtime/include/core/host_asset_reader.h"
click node_shader_pipeline "https://github.com/fable2recomp/fable-return-to-albion/blob/main/src/shader/src/shader_sbk_pipeline.cpp"
click node_mod_sdk "https://github.com/fable2recomp/fable-return-to-albion/blob/main/Godot/addons/bnk_mount/BnkMountPlugin.cs"
click node_mod_values "https://github.com/fable2recomp/fable-return-to-albion/blob/main/Godot/addons/bnk_mount/EditorModValueService.cs"
click node_mod_exporter "https://github.com/fable2recomp/fable-return-to-albion/blob/main/Godot/addons/bnk_mount/EditorModExporter.cs"
click node_babel "https://github.com/fable2recomp/fable-return-to-albion/blob/main/src/formats/src/babel/babel_database.cpp"
click node_gdb "https://github.com/fable2recomp/fable-return-to-albion/blob/main/src/formats/src/gdb/gdb_database.cpp"
click node_rexnet "https://github.com/fable2recomp/fable-return-to-albion/blob/main/rexglue-net/shadow/rexglue-sdk/src/rexnet/core/src/engine.rs"
click node_co_op "https://github.com/fable2recomp/fable-return-to-albion/blob/main/Fable2/src/hooks/src/coop_player_hooks.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_media,node_setup_wizard,node_codegen toneBlue
class node_native_payload,node_godot,node_host_bridge,node_fable2_hooks toneAmber
class node_fable2_vfs,node_fable3_vfs,node_asset_reader,node_shader_pipeline toneMint
class node_mod_sdk,node_mod_values,node_mod_exporter,node_babel,node_gdb toneRose
class node_rexnet,node_co_op,node_player toneIndigo
```

## Components

### Setup and compilation

- **Game media and TU**
- [Install wizard](https://github.com/fable2recomp/fable-return-to-albion/blob/main/Godot/addons/bnk_mount/BnkMountPlugin.cs): `Godot/addons/bnk_mount/BnkMountPlugin.cs`
- [Recompiler](https://github.com/fable2recomp/fable-return-to-albion/blob/main/rexglue-net/shadow/rexglue-sdk/src/rexnet/core/src/engine.rs): `rexglue-net/shadow/rexglue-sdk/src/rexnet/core/src/engine.rs`

### Game runtime

- [Native payload](https://github.com/fable2recomp/fable-return-to-albion/blob/main/src/runtime/include/core/payload_bridge.h): `src/runtime/include/core/payload_bridge.h`
- [Godot game runtime](https://github.com/fable2recomp/fable-return-to-albion/blob/main/Godot/src/game/GameWorld.cs): `Godot/src/game/GameWorld.cs`
- [Host bridge](https://github.com/fable2recomp/fable-return-to-albion/blob/main/Godot/src/host/HostBridge.cs): `Godot/src/host/HostBridge.cs`
- [Fable II hooks](https://github.com/fable2recomp/fable-return-to-albion/blob/main/Fable2/src/hooks/src/receive_items_hooks.cpp): `Fable2/src/hooks/src/receive_items_hooks.cpp`

### Assets and rendering

- [Fable II virtual filesystem](https://github.com/fable2recomp/fable-return-to-albion/blob/main/Fable2/src/vfs/src/index/open_pipeline.cpp): `Fable2/src/vfs/src/index/open_pipeline.cpp`
- [Fable III virtual filesystem](https://github.com/fable2recomp/fable-return-to-albion/tree/main/Fable3/src/vfs): `Fable3/src/vfs`
- [Host asset reader](https://github.com/fable2recomp/fable-return-to-albion/blob/main/src/runtime/include/core/host_asset_reader.h): `src/runtime/include/core/host_asset_reader.h`
- [Shader bank pipeline](https://github.com/fable2recomp/fable-return-to-albion/blob/main/src/shader/src/shader_sbk_pipeline.cpp): `src/shader/src/shader_sbk_pipeline.cpp`

### Modding tools

- [Modding hub and SDK](https://github.com/fable2recomp/fable-return-to-albion/blob/main/Godot/addons/bnk_mount/BnkMountPlugin.cs): `Godot/addons/bnk_mount/BnkMountPlugin.cs`
- [Mod value editor](https://github.com/fable2recomp/fable-return-to-albion/blob/main/Godot/addons/bnk_mount/EditorModValueService.cs): `Godot/addons/bnk_mount/EditorModValueService.cs`
- [Mod exporter](https://github.com/fable2recomp/fable-return-to-albion/blob/main/Godot/addons/bnk_mount/EditorModExporter.cs): `Godot/addons/bnk_mount/EditorModExporter.cs`
- [Babel localization](https://github.com/fable2recomp/fable-return-to-albion/blob/main/src/formats/src/babel/babel_database.cpp): `src/formats/src/babel/babel_database.cpp`
- [GDB database](https://github.com/fable2recomp/fable-return-to-albion/blob/main/src/formats/src/gdb/gdb_database.cpp): `src/formats/src/gdb/gdb_database.cpp`

### Co-op networking

- [RexNet multiplayer](https://github.com/fable2recomp/fable-return-to-albion/blob/main/rexglue-net/shadow/rexglue-sdk/src/rexnet/core/src/engine.rs): `rexglue-net/shadow/rexglue-sdk/src/rexnet/core/src/engine.rs`
- [Local and online co-op](https://github.com/fable2recomp/fable-return-to-albion/blob/main/Fable2/src/hooks/src/coop_player_hooks.cpp): `Fable2/src/hooks/src/coop_player_hooks.cpp`

### Other components

- **Player**

## Connections

- Player → Install wizard: selects title (evidence: `README.md`)
- Game media and TU → Install wizard: provides inputs (evidence: `README.md`)
- Install wizard → Recompiler: requests recompilation (evidence: `README.md`)
- Recompiler → Native payload: compiles payload (evidence: `README.md`)
- Native payload → Godot game runtime: runs with (evidence: `README.md`)
- Godot game runtime → Host bridge: bridges simulation (evidence: `Godot/src/host/HostBridge.cs`)
- Native payload → Fable II hooks: uses game hooks
- Native payload → Fable II virtual filesystem: requests assets
- Fable II virtual filesystem → Host asset reader: reads host assets (evidence: `Fable2/src/vfs/src/index/open_pipeline.cpp`)
- Godot game runtime → Shader bank pipeline: uses translated shaders
- Godot game runtime → Fable III virtual filesystem: loads Fable III assets
- Player → Modding hub and SDK: creates mods (evidence: `README.md`)
- Modding hub and SDK → Mod value editor: edits values (evidence: `Godot/addons/bnk_mount/BnkMountPlugin.cs`)
- Modding hub and SDK → Mod exporter: exports packages (evidence: `Godot/addons/bnk_mount/BnkMountPlugin.cs`)
- Mod value editor → Mod exporter: supplies edits (evidence: `Godot/addons/bnk_mount/EditorModExporter.cs`)
- Modding hub and SDK → Babel localization: supports overlays (evidence: `README.md`)
- Modding hub and SDK → GDB database: supports patches (evidence: `README.md`)
- Godot game runtime → RexNet multiplayer: connects sessions (evidence: `README.md`)
- Godot game runtime → Local and online co-op: supports local play (evidence: `README.md`)
