Skip to main content
Reading time: ~30 minutes
The Unreal system is CORP’s game packaging and management framework. It provides a modular approach to organizing your game through Gamepacks - self-contained packages of assets, components, macros, and scripts.

Table of Contents

What is Unreal?

The Unreal system is CORP’s solution for:
  • Modular Game Organization: Package features into independent Gamepacks
  • Asset Management: Centralized asset loading and validation
  • Component Registration: Automatic component discovery and mapping
  • Script Management: Organized client and server script execution
  • Game Configuration: Flexible authority and boot configuration

Key Features

  • 📦 Gamepack System: Modular package organization
  • 🎮 Authority Models: Client or server-authoritative games
  • 🔧 Export Mappings: Components, Macros, and ScriptableObjects
  • 📜 Script Management: Automatic client/server script placement
  • 🚀 Bootstrap System: Configurable game initialization

Gamepacks

Gamepacks are the fundamental building blocks of the Unreal system. Each Gamepack is a self-contained module that can export:
  • Components
  • Macros
  • ScriptableObjects
  • Assets
  • Client Scripts
  • Server Scripts
  • Boot Configuration

Gamepack Structure

Project Structure

Typical CORP Project with Unreal

Important: The CORP source code must be a git submodule named “CORP” in your repository. Each Gamepack should also be a git submodule for modularity and version control.

Setting Up Submodules

Configuration

Game Info Configuration

Create GAMECONFIG/gameinfo.ts:

Authority Models

Important: Workspace.StreamingEnabled should be disabled for client-authoritative games to ensure all game content is loaded immediately.

Gamepack Metadata

Create metadata.ts in your Gamepack:

Bootstrap Process

How Unreal Bootstraps Your Game

  1. Load Game Info: Reads GAMECONFIG/gameinfo.ts
  2. Parse Gamepacks: Discovers and parses all Gamepacks in GAMEPACKS/
  3. Build Manifest: Creates game manifest with all exports
  4. Setup Assets: Organizes assets into centralized location
  5. Register Scripts: Places client/server scripts
  6. Execute Boot Config: Runs root Gamepack’s boot configuration

Using Bootstrap

In your client and server entry points:

Boot Configuration

Create exports/bootconfig.ts in your root Gamepack:
Boot Options:
  • startFromWorkspace: Load GameObjects from workspace with tags:
    • GameObjectSceneRoot: Main scene container
    • GameObjectContainer: Additional containers

Exports System

Exporting Components

Create exports/components.ts:
Naming Convention: Use snake_case for all mapping names (components, macros, ScriptableObjects). Core CORP components are prefixed with $ (e.g., $network_object).

Exporting Macros

Create exports/macros.ts:
Note: See Macros for detailed information about creating and using macros.

Exporting ScriptableObjects

Create exports/scriptableobjects.ts:
Note: See ScriptableObjects for detailed information about creating and using ScriptableObjects.

Authority Models

Server-Authoritative

Best for multiplayer games where server controls game state.
Characteristics:
  • Server spawns and manages NetworkObjects
  • Server validates all game logic
  • Clients replicate server state
  • Ideal for competitive multiplayer
Example:

Client-Authoritative

Best for single-player or cooperative games.
Characteristics:
  • Client controls game state
  • Reduced server validation
  • Lower network overhead
  • Ideal for single-player or trusted environments
Warning: Set Workspace.StreamingEnabled = false for client-authoritative games.

Checking Authority

Working with the Manifest

Accessing the Game Manifest

Getting Registered Classes

Managing Scripts

Client Scripts

Place client scripts in exports/scripts/client/:
These scripts are automatically placed in PlayerScripts.

Server Scripts

Place server scripts in exports/scripts/server/:
These scripts are automatically placed in ServerScriptService.

Asset Management

Adding Assets to a Gamepack

  1. Create an assets/ folder in your Gamepack
  2. Enable assets in metadata:
  1. Place asset folders in assets/:
  1. During bootstrap, assets are collapsed - all Gamepack assets are collected and organized into a centralized location in the game for easy access

Accessing Assets

Assets are accessed through the Virtual File System (VFS), which provides a unified path interface:
VFS Path Convention: Use %assets% as a shorthand for the collapsed assets directory. The VFS automatically resolves this to the actual location where all Gamepack assets are stored.

Complete Example

Example Gamepack Setup

1. Game Configuration

2. Gamepack Metadata

3. Component Exports

4. Boot Configuration

5. Bootstrap

Best Practices

1. Organize by Feature

Create separate Gamepacks for major features:

2. Use snake_case for Mapping Names

3. Choose Appropriate Authority

4. Validate Gamepack Structure

Ensure your Gamepack has proper metadata before adding exports:

5. Keep Root Gamepack Minimal

The root Gamepack should primarily handle bootstrapping:

6. Use Authority Checks

Troubleshooting

Common Issues

“Root gamepack not found”
  • Ensure rootPack name matches a Gamepack’s metadata name
  • Check Gamepack is in GAMEPACKS/ folder
“No scene root found in workspace”
  • Tag a container with GameObjectSceneRoot
  • Ensure startFromWorkspace: true in boot config
“Component mapping conflict”
  • Different Gamepacks export same component name
  • Use unique names across Gamepacks
Streaming warning with client authority
  • Set Workspace.StreamingEnabled = false in Roblox Studio
  • This ensures all content loads immediately for client authority
  • Or switch to Unreal.Authority.SERVER

Next Steps


Master the Unreal system for modular, scalable game organization! 📦