Skip to main content
The KYBER Launcher is a modern, cross-platform desktop application built with Flutter that provides a user-friendly interface for managing Star Wars Battlefront II game sessions, mods, and servers.

Overview

The Launcher serves as the primary interface for players to:
  • Browse and join multiplayer servers
  • Manage game modifications
  • Download and configure game files
  • Track player statistics and events
  • Connect with the KYBER community

Tech Stack

Framework

Flutter 3.11+ (master channel)

Language

Dart SDK 3.11+

UI Library

Fluent UI (Windows-style design)

FFI Bridge

Rust via flutter_rust_bridge

Key Dependencies

  • State Management: BLoC pattern with flutter_bloc
  • Networking: gRPC, GraphQL, WebSockets
  • Storage: Hive (local database)
  • UI Components: Fluent UI, custom Star Wars themed widgets
  • Media: Video playback, audio, cached images
  • Error Tracking: Sentry for crash reporting

Architecture

The Launcher follows clean architecture principles with clear separation of concerns:
lib/
├── core/              # Core utilities and configuration
├── features/          # Feature modules
│   ├── server_browser/   # Server browsing and filtering
│   ├── mod_browser/      # Mod discovery and installation
│   ├── maxima/           # EA backend integration
│   ├── kyber/            # KYBER API integration
│   └── stats/            # Player statistics
├── shared/            # Shared UI components
└── gen/               # Generated code (assets, rust bindings)

Key Features Implementation

import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:fluent_ui/fluent_ui.dart';
import 'package:kyber_launcher/core/routing/app_router.dart';
import 'package:kyber_launcher/features/server_browser/providers/server_list_cubit.dart';
import 'package:kyber_launcher/features/maxima/providers/maxima_cubit.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  
  // Initialize Rust FFI bindings
  await RustLib.init();
  
  // Initialize Hive storage
  await Hive.initFlutter();
  
  runApp(const KyberApp());
}

class KyberApp extends StatelessWidget {
  const KyberApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MultiBlocProvider(
      providers: [
        BlocProvider(create: (_) => ServerListCubit()),
        BlocProvider(create: (_) => MaximaCubit()),
        // Additional providers...
      ],
      child: FluentApp.router(
        routerConfig: appRouter,
        theme: FluentThemeData(
          // Custom Star Wars theme
        ),
      ),
    );
  }
}

Building

Prerequisites

1

Install Flutter

Download and install Flutter (master channel)
flutter channel master
flutter upgrade
2

Install Rust

Install Rust nightly toolchain
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup toolchain install nightly
3

Install Protoc

Download Protocol Buffers compiler and add to PATH
4

Bootstrap Workspace

Install Melos and bootstrap dependencies
dart pub global activate melos
cd ~/workspace/source
melos bootstrap

Generate FFI Bindings

cd Launcher
dart run tool/ffigen.dart

Development Build

Run the launcher in debug mode:
cd Launcher
flutter run
Use flutter run -d windows or flutter run -d linux to specify the platform

Release Build

cd Launcher
flutter build windows --release
Output: build/windows/runner/Release/

Building the Installer

Use Inno Setup with the provided script:
# After building the release binary
cd Launcher/installer
iscc installer.iss
The installer will be created in the installer/Output directory.

Platform-Specific Features

Windows

  • Native window management (minimize to tray, always on top)
  • Discord Rich Presence integration
  • Windows Registry integration for game detection
  • Custom title bar with Fluent Design

Linux

  • XDG desktop integration
  • Native file picker
  • System tray support

Project Structure

pubspec.yaml
name: kyber_launcher
version: 2.0.0-beta9+1

dependencies:
  flutter:
    sdk: flutter
  fluent_ui: ^3.0.0
  flutter_bloc: ^9.0.0
  grpc: ^5.0.0
  graphql_flutter: ^5.2.0
  hive_ce: latest
  sentry_flutter: ^9.5.0
  window_manager: ^0.5.1
  flutter_rust_bridge: latest
  # Additional dependencies...

Code Generation

The Launcher uses several code generation tools:
cd Launcher
flutter pub run build_runner build --delete-conflicting-outputs

Development Tips

Flutter’s hot reload works great for UI changes, but requires a restart for:
  • Changes to Rust code
  • Changes to generated code
  • Changes to native plugins
Enable gRPC logging:
GrpcOrGrpcWebClientChannel.enableLog = true;
All theme colors and styles are defined in lib/core/config/colors.dart. The launcher uses a custom Star Wars inspired theme based on Fluent Design.

Common Issues

If you encounter FFI binding errors, ensure you’ve run dart run tool/ffigen.dart after any Rust code changes.
The Launcher requires the Module DLL to be present at C:/ProgramData/Kyber/Module/Kyber.dll for game launching functionality.
  • Module - C++ game module that the Launcher injects
  • API - Backend API for server data
  • CLI - Command-line alternative to the Launcher

Build docs developers (and LLMs) love