Installation
Game Framework consists of two main components: the SDK (Flutter packages) and the CLI (command-line tool). You'll need both for the complete development experience.
Prerequisites
Before installing Game Framework, ensure you have:
- Flutter SDK: 3.3.0 or higher
- Dart SDK: 3.0.0 or higher
- Unity: 2022.3.x or higher (if using Unity)
- Unreal Engine: 5.x (if using Unreal)
Verify your Flutter installation:
flutter --version
flutter doctorSDK Installation
The Game Framework SDK consists of multiple packages that you add to your Flutter project.
1. Add Dependencies
Add the packages to your pubspec.yaml:
dependencies:
flutter:
sdk: flutter
gameframework: ^0.0.1
gameframework_unity: ^0.0.1 # If using Unity
# gameframework_unreal: ^0.0.1 # If using Unreal2. Install Packages
Run the Flutter pub get command:
flutter pub get3. Initialize Plugin
In your Flutter app's main file, initialize the engine plugin:
import 'package:flutter/material.dart';
import 'package:gameframework/gameframework.dart';
import 'package:gameframework_unity/gameframework_unity.dart';
void main() {
WidgetsFlutterBinding.ensureInitialized();
// Initialize Unity plugin
UnityEnginePlugin.initialize();
runApp(MyApp());
}The SDK is now installed! You can start using GameWidget in your Flutter app.
CLI Installation
The game-cli tool automates game exports, file syncing, builds, and publishing. Choose your preferred installation method:
The easiest way to install game-cli on macOS or Linux:
# Add the tap
brew tap xraph/tap
# Install game-cli
brew install game-cli
# Verify installation
game --versionTo upgrade to the latest version:
brew upgrade game-cliDownload pre-built binaries for your platform:
Download Links
Visit the GitHub Releases page and download:
| Platform | File |
|---|---|
| macOS (Apple Silicon) | game-cli-vX.Y.Z-macos-aarch64.tar.gz |
| macOS (Intel) | game-cli-vX.Y.Z-macos-x86_64.tar.gz |
| Linux (x64) | game-cli-vX.Y.Z-linux-x64.tar.gz |
| Windows (x64) | game-cli-vX.Y.Z-windows-x64.zip |
Install on macOS/Linux
# Extract the archive
tar -xzf game-cli-*.tar.gz
# Move to your PATH
sudo mv game /usr/local/bin/
# Verify installation
game --versionInstall on Windows
# Extract the zip file
Expand-Archive game-cli-*.zip
# Move to system directory
Move-Item game-cli-*\game.exe C:\Windows\System32\
# Verify installation
game --versionFor development or if you need the latest changes:
Clone Repository
git clone https://github.com/xraph/game-cli.git
cd game-cliInstall Dependencies
dart pub getBuild and Install
# Use Make for automated installation
make installThis compiles the CLI to a native executable at ~/.local/bin/game.
Add to PATH
Add the installation directory to your PATH (first-time setup):
# Add to your shell profile (~/.zshrc or ~/.bashrc)
export PATH="$HOME/.local/bin:$PATH"
# Reload your shell
source ~/.zshrc # or source ~/.bashrcVerify Installation
game --versionRebuilding After Changes
When developing the CLI:
make rebuildThe CLI is optional for basic SDK usage, but highly recommended for automated workflows and cloud publishing.
Verify Installation
Check SDK Installation
Create a simple Flutter app to verify the SDK works:
import 'package:flutter/material.dart';
import 'package:gameframework/gameframework.dart';
void main() {
runApp(MaterialApp(
home: Scaffold(
body: Center(
child: Text('Game Framework SDK Installed!'),
),
),
));
}Run the app:
flutter runCheck CLI Installation
Verify the CLI is installed and accessible:
# Check version
game --version
# View available commands
game --help
# Check CLI configuration
game config showNext Steps
Now that you have Game Framework installed, here are some recommended next steps:
Ready to build? Follow the Quick Start Guide to create your first integrated app!
For SDK Development
- SDK Overview - Learn about the SDK architecture
- API Reference - Explore the GameWidget API
- Unity Integration - Integrate Unity games
- Unreal Integration - Integrate Unreal games
For CLI Usage
- CLI Overview - Learn about CLI features
- Commands Reference - Explore available commands
- Workflows - Common development workflows
- Configuration - Configure your projects
Troubleshooting
SDK Installation Issues
Problem: Package not found on pub.dev
The gameframework packages may be published to a private registry or not yet on pub.dev. Check the repository README for alternative installation methods.
Problem: Platform-specific build errors
Ensure you have the required platform tools installed:
- Android: Android SDK and NDK
- iOS: Xcode and CocoaPods
- Desktop: Platform-specific build tools
CLI Installation Issues
Problem: Command not found
Ensure the CLI is in your PATH. Check your shell configuration:
# Check if game is in PATH
which game
# If not, add to PATH
export PATH="$HOME/.local/bin:$PATH"Problem: Permission denied
Make the game executable:
chmod +x /path/to/gameProblem: Dependencies missing
Install Dart dependencies:
cd game-cli
dart pub getPlatform-Specific Notes
Android
Additional requirements for Android:
- Android SDK 22+
- NDK for native builds
- Gradle 7.0+
iOS
Additional requirements for iOS:
- macOS with Xcode 14+
- CocoaPods
- Valid Apple Developer account for device deployment
Desktop
Additional requirements for desktop:
- macOS: Xcode command-line tools
- Windows: Visual Studio 2022 with C++ workload
- Linux: Build essentials and GTK3
Desktop support is currently in beta. Some features may be unstable.
Getting Help
If you encounter issues during installation:
- Check the Troubleshooting Guide
- Search GitHub Issues
- Ask in GitHub Discussions