Reading time: ~30 minutes
Table of Contents
- What is Unreal?
- Gamepacks
- Project Structure
- Configuration
- Bootstrap Process
- Authority Models
- Exports System
- Best Practices
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
CreateGAMECONFIG/gameinfo.ts:
Authority Models
Workspace.StreamingEnabled should be disabled for client-authoritative games to ensure all game content is loaded immediately.
Gamepack Metadata
Createmetadata.ts in your Gamepack:
Bootstrap Process
How Unreal Bootstraps Your Game
- Load Game Info: Reads
GAMECONFIG/gameinfo.ts - Parse Gamepacks: Discovers and parses all Gamepacks in
GAMEPACKS/ - Build Manifest: Creates game manifest with all exports
- Setup Assets: Organizes assets into centralized location
- Register Scripts: Places client/server scripts
- Execute Boot Config: Runs root Gamepack’s boot configuration
Using Bootstrap
In your client and server entry points:Boot Configuration
Createexports/bootconfig.ts in your root Gamepack:
startFromWorkspace: Load GameObjects from workspace with tags:GameObjectSceneRoot: Main scene containerGameObjectContainer: Additional containers
Exports System
Exporting Components
Createexports/components.ts:
Naming Convention: Usesnake_casefor all mapping names (components, macros, ScriptableObjects). Core CORP components are prefixed with$(e.g.,$network_object).
Exporting Macros
Createexports/macros.ts:
Note: See Macros for detailed information about creating and using macros.
Exporting ScriptableObjects
Createexports/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.- Server spawns and manages NetworkObjects
- Server validates all game logic
- Clients replicate server state
- Ideal for competitive multiplayer
Client-Authoritative
Best for single-player or cooperative games.- Client controls game state
- Reduced server validation
- Lower network overhead
- Ideal for single-player or trusted environments
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 inexports/scripts/client/:
PlayerScripts.
Server Scripts
Place server scripts inexports/scripts/server/:
ServerScriptService.
Asset Management
Adding Assets to a Gamepack
- Create an
assets/folder in your Gamepack - Enable assets in metadata:
- Place asset folders in
assets/:
- 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
rootPackname matches a Gamepack’s metadataname - Check Gamepack is in
GAMEPACKS/folder
- Tag a container with
GameObjectSceneRoot - Ensure
startFromWorkspace: truein boot config
- Different Gamepacks export same component name
- Use unique names across Gamepacks
- Set
Workspace.StreamingEnabled = falsein Roblox Studio - This ensures all content loads immediately for client authority
- Or switch to
Unreal.Authority.SERVER
Next Steps
- Getting Started: Learn CORP basics
- Core Concepts: Understand GameObjects and Components
- Macros: Learn about the macro system
- ScriptableObjects: Learn about data assets
- Scene Management: Alternative to
startFromWorkspace - Examples: See complete implementations
Master the Unreal system for modular, scalable game organization! 📦