-
Notifications
You must be signed in to change notification settings - Fork 0
Engine Adapters
Youniss edited this page Jun 11, 2026
·
1 revision
Radix uses a modular engine adapter system to support multiple game engines through a unified interface. Each engine has a dedicated adapter that handles:
- Binary discovery — Finding the correct executable in an uploaded ZIP
- Startup arguments — Generating engine-specific CLI flags
- Process management — Handling engine-specific lifecycle events
- Plugin API — Communication with engine-side game logic plugins
| Engine | Adapter | Binary Detection | Status |
|---|---|---|---|
| Godot | godot-adapter.ts |
*.server.x86_64, server.console.exe, *.pck
|
✅ Stable |
| Unity | unity-adapter.ts |
*_Data/, server.console.exe, Unity DLLs |
✅ Stable |
| Unreal | unreal-adapter.ts |
GameServer.exe, GameServer-Linux-Shipping
|
✅ Stable |
┌─────────────────────────────┐
│ EngineAdapterFactory │
│ (detects engine from ZIP) │
└──────────┬──────────────────┘
│
┌───────────────┼───────────────┐
▼ ▼ ▼
┌──────────┐ ┌──────────┐ ┌──────────┐
│ Godot │ │ Unity │ │ Unreal │
│ Adapter │ │ Adapter │ │ Adapter │
└────┬─────┘ └────┬─────┘ └────┬─────┘
│ │ │
▼ ▼ ▼
┌──────────────────────────────────────┐
│ BaseProcessAdapter │
│ (child_process.spawn, stdin/stdout) │
└──────────────────────────────────────┘
Every engine adapter implements:
interface EngineAdapter {
/** Detect if this engine can handle the extracted file tree */
detect(files: string[]): boolean;
/** Discover the main executable binary */
discoverExecutable(files: string[]): string | null;
/** Build CLI arguments for spawning */
buildArgs(config: ServerConfig): string[];
/** Environment variables for the process */
buildEnv(config: ServerConfig): Record<string, string>;
/** Post-start validation */
validateStart(pid: number): Promise<boolean>;
}Scans the extracted directory for, in order of priority:
-
*.linuxbsd.server.x86_64(Linux dedicated server) -
*.windows.server.x86_64.exe(Windows dedicated server) -
*.server.console.exe(Windows console server) -
*.x86_64(fallback binary) -
*.pck(asset package — used as indicator)
./godot-server --headless --server --port 7777 --max-players 50The Godot adapter includes a WebSocket plugin (GDScript) that connects back to Radix for:
- Status reporting (
server_ready,player_joined,player_left) - Metric reporting (player count, tick rate)
- Command relay (admin commands from dashboard)
Scans for:
-
server.console.exe(Windows) -
*_Data/Managed/directory (indicator of Unity build) - Executable matching project name in build config
./unity-server -batchmode -nographics -port 7777 -players 50Unity adapter uses a file-based IPC mechanism:
| File | Direction | Description |
|---|---|---|
radix_commands.txt |
Radix → Game | Admin commands from dashboard |
radix_metrics.txt |
Game → Radix | CPU, RAM, player count updates |
Scans for:
-
GameServer.exe(Windows) -
GameServer-Linux-Shipping(Linux) -
Engine/Binaries/directory (indicator of Unreal build)
./GameServer /Game/Maps/DefaultMap?Port=7777?MaxPlayers=50 -server -logUnreal adapter uses console commands piped via stdin for administration and a log parser for metrics extraction.
- Create a new adapter file in
src/modules/servers/adapters/<engine>/ - Implement the
EngineAdapterinterface - Register the adapter in
engine-adapter.factory.ts - Add known binary signatures for auto-detection
- Add engine option to the frontend creation form