🚀 RocketeerGame Demo Reference

The RocketeerGame demo is a simple C++ and blueprint game implementation that showcases the function calling capabilities of the LLMAI plugin using natural language commands.
This is intended as a demonstration of integration rather than how structured and refined gameplay mechanics should behave, however it could be used as a starting point for something comprehensive.
Core Architecture: The game consists of 7 main C++ classes working together - ARocketPawn (player), AObstacleManager (obstacles & projectiles), AEnemyManager (enemy spawning), AFlightPath (enemy movement), AObstacle (game objects), AEnemy (enemy behavior), and URocketeerEventSubsystem (global events).

Advanced Features: Object pooling for performance, event system with delegates, speed synchronization across systems, texture-based obstacle patterns, spline-based enemy flight paths, health/combat systems, and series-based enemy spawning with tracking.
🎮 AI-Callable Functions | 🤖 Complete Game Control | 🎯 Natural Language Interface

🎮 Game Functions Overview

Implementation Architecture: All AI-callable game functions are implemented in Blueprint (using the LLMAI plugin's function definition system) and delegate to the underlying ROCKETEER_API C++ classes for performance and functionality. The core game logic is handled by classes like ARocketPawn, AEnemyManager, AObstacleManager, and URocketeerEventSubsystem. These functions are all combined into a unified Rocketeer Function Profile that the AI can access through natural language commands. → Learn more about the C++ API

🎯 Core Game Functions

👤 Player Management

⚔️ Combat System

⏱️ Timer System

📋 Blueprint Assets

🎯 Core Game Functions

Core

AIF_StartGameRocketeer

Description: Initialize a new game session

Parameters: None
Returns: Success/failure status
Usage Examples:
"Start a new game"
"Begin Rocketeer game"
"Let's play!"
Core

AIF_CloseGame

Description: End the current game session

Parameters: None
Returns: Confirmation message
Usage Examples:
"Close the game"
"Exit Rocketeer"
"Stop playing"
Core

AIF_SetGameStage

Description: Change the current game stage and difficulty

Parameters:
Stage (integer): Stage number (0-2)
Difficulty (string): "easy", "medium", "hard"
FlightpathGUIDs (string): An array of comma seperated flightpath GUIDs that the game will use to spawn enemies
Returns: Stage change confirmation
Usage Examples:
"Set the game to stage 2, hard difficulty"
"Advance to stage 1 easy"
Core

AIF_SetGameSpeedMultiplier

Description: Adjust the overall game speed

Parameters:
SpeedMultiplier (number): Speed multiplier
Returns: Speed change confirmation
Usage Examples:
"Make the game faster"
"Slow down the game"
"Set speed to double"
Core

AIF_GetGameControls

Description: Receive the control descriptions the player can use to control the game

Parameters: None
Returns: Control descriptions and input mappings extracted at run time from the IMD_AIGameRocketeer asset
Usage Examples:
"What controls do I have?"

👤 Player Management Functions

Player

AIF_AddLife

Description: Grant an extra life to the player

Parameters: None
Returns: Lives added confirmation
Usage Examples:
"Give me an extra life"
"Add 2 lives"
Player

AIF_RemoveLife

Description: Remove a player life

Parameters: None
Returns: Life removed confirmation
Usage Examples:
"Remove a life"
"Make this harder, take away 2 lives"

👾 Enemy Management Functions

Enemy

AIF_SpawnEnemySeries

Description: Using a flightpath GUID reference you can spawn a number of enemies in a series which will fly along the path. This function returns a SeriesID which you can use to track series progression via events from the game.

Parameters:
FlightpathGUID (string): The GUID of the flightpath
NumEnemies (integer): Number of enemies in this series (default: 1)
SpawnInterval (number): Interval between each enemy in this series, best to keep the enemies close together for a tight formation (default: 0.2)
InitialOffset (number): Seconds delay before spawning in the enemies in seconds. You can use this to offset compared to other series (default: 0)
MovementSpeed (number, optional): You can set a specific speed for this enemy series, or omit if you want to just use the flightpath default speed (default: -1)
Returns: SeriesID for tracking progression via events
Usage Examples:
"Spawn 3 enemies on flight path"
"Create enemy series with tight formation"
"Launch 5 attackers with 2 second delay"
Enemy

AIF_AddEnemyFlightPath

Description: Create a new flight path for enemies

Parameters:
EnemyType (string): Sentinel is only implemented enemy
Speed (string, optional): Speed of the enemies down the spline
SplinePoints String of comma seperated points in x,y alternating pairs
Returns: Flight path creation status and assigned GUID
Usage Examples:
"Create a flight path that swoops down from the left"
"Add a zigzag pattern"
"Make a circular attack route"
Enemy

AIF_GetGameActiveFlightPaths

Description: Retrieve list of available flight paths

Parameters: None
Returns: Array of flight path IDs and names
Usage Examples:
"What flight paths are available?"
"List all flight patterns"
"Show me the attack routes"
Enemy

AIF_GetGameFlightpath

Description: Get detailed information about a specific flight path

Parameters:
flightPathId (integer): ID of the flight path to query
Returns: Detailed flight path information and points array
Usage Examples:
"Show me details of flight path 2"
"Describe the swooping pattern"
"What does path 1 look like?"

🌍 Environment Functions

Environment

AIF_SpawnObstacles

Description: AI can spawn one of three different types of test obstacles, used in stage 0 to show examples to the player

Parameters:
ObstacleType (string): "TestAsteroids", "TestCrystals", "TestPlates"
Returns: Obstacles spawned confirmation
Usage Examples:
"Add some obstacles"
"Spawn some Plates"
"Spawn some Asteroids"
"Spawn some crystals"

🖥️ UI Management Functions

UI

AIF_SetGameHUDVisibility

Description: Toggle the game HUD display

Parameters:
Visible (boolean): true to show, false to hide
Returns: HUD visibility status
Usage Examples:
"Hide the HUD"
"Show the game HUD"
"Turn off the UI"
UI

AIF_SetChatVisibility

Description: Control the chat interface visibility

Parameters:
Visible (boolean): true to show, false to hide
Returns: Chat visibility status
Usage Examples:
"Show the chat"
"Hide the chat interface"
"Turn off chat display"
UI

AIF_SetGameBackgroundVisibility

Description: Toggle background elements

Parameters:
Visible (boolean): true to show, false to hide
Returns: Background visibility status
Usage Examples:
"Turn off the background"
"Show the background"
"Hide background graphics"

⚔️ Weapon System Functions

Weapon

AIF_SetGameRocketFiringMode

Description: Change the rockets's firing mode, the AI can use this as part of a challenge such as the trivia round

Parameters:
mode (integer): "0: Disabled", "1: SingleShot", "2: TriShot"
duration (float, optional): Time limit for mode change in seconds, 0 = infinite
Returns: Firing mode change confirmation
Usage Examples:
"Upgrade to triple shot"
"Disable weapons for 10 seconds"
"Give me spread shot for 30 seconds"

⏱️ Timer System Functions

Timer

AIF_AddGameTimer

Description: Create a countdown timer with AI callback

Parameters:
Seconds (Integer): Number of seconds for the player to accomplish a task,
Description (string): Description of the timer for the player if required
ShowCountdown (Integer): Number of seconds to countdown for the player. eg set to 3 and the last 3 seonds will have a audible beep and number of the screen. 0 = no countdown
ShowCountdown (Boolean): AI will respond to this timer expiring
Returns: Timer creation confirmation with timer ID
Usage Examples:
"Set a 30 second timer with a three second countdown"
"Create a challenge timer"
Timer

AIF_GameTimerCancel

Description: Cancel an active timer

Parameters:
TimerId (integer): ID of the timer to cancel
Returns: Timer cancellation confirmation
Usage Examples:
"Cancel that timer"
"Stop the bonus timer"

🏗️ ROCKETEER_API: C++ Module Interface

📚 What is ROCKETEER_API?

The ROCKETEER_API macro is the core export/import interface that makes the RocketeerGame C++ classes available to other modules, Blueprint systems, and external code. Used to create blueprint-friendly classes and events.

// Core API Definition
#ifndef ROCKETEERGAME_API
    #ifdef ROCKETEERGAME_EXPORTS
        #define ROCKETEERGAME_API __declspec(dllexport)
    #else
        #define ROCKETEERGAME_API __declspec(dllimport)
    #endif
#endif
Core Classes

Game Management Classes

Exported Classes:

ROCKETEERGAME_API ARocketPawn - Player rocket with movement, state management, and weapon systems
ROCKETEERGAME_API AObstacleManager - Texture-based obstacle patterns and projectile management
ROCKETEERGAME_API AEnemyManager - Enemy spawning, series tracking, and AI coordination
Game Objects

Actor Classes

Exported Classes:

ROCKETEERGAME_API AFlightPath - Spline-based enemy movement paths with firing patterns
ROCKETEERGAME_API AObstacle - Pooled game objects with health, collision, and physics
ROCKETEERGAME_API AEnemy - AI enemies with path following and combat capabilities
Event System

Global Event Management

Exported Classes:

ROCKETEERGAME_API URocketeerEventSubsystem - Global event broadcasting system
• All delegate types for Blueprint event binding
• Static event firing functions for C++ integration

📋 Blueprint Implementations

🎯 Game Assets and Blueprint Classes

The RocketeerGame demo uses several Blueprint assets that extend and configure the C++ base classes. These Blueprints provide the game-specific content, AI integration logic, and visual elements.

Data Assets

DT_Rocketeer_GameStageList

Base C++ Class: UDataTable

Purpose: Data table that provides instructions to the AI when each stage starts. Contains stage configurations, difficulty settings, and contextual information for AI decision-making.

Flight Paths

Predefined FlightPaths

Base C++ Class: AFlightPath

Available Patterns: Three swoop patterns and two vertical weave patterns that the game uses to spawn enemies. The AI can retrieve information about these paths, create new ones, and optionally include them in the SetGameStage function call.

Player Pawn

PAWN_Rocket

Base C++ Class: ARocketPawn

Purpose: Blueprint subclass of the player-controlled rocket. Configures mesh, materials, input handling, and visual effects for the rocket ship.

Data Structures

STRUCT_GameTimer & STRUCT_GameStage

Base C++ Class: USTRUCT

Purpose: Blueprint structures that define internal data formats for game timers and stage configurations. Used by the game systems for state management and AI communication.

Environment

BP_rocketeer_backdrop

Base C++ Class: AActor

Purpose: Default backdrop actor for the game environment. Provides the visual background and atmosphere for the gameplay area.

Game Manager

BP_Rocketeer_GameManager

Base C++ Class: AActor or AGameModeBase

Purpose: Main scripting hub for game systems. Handles interpretation of AI function calls, manages game state, coordinates between systems, and implements the LLMAI function definitions that bridge natural language commands to C++ game logic.

Enemy

ENEMY_Sentinel

Base C++ Class: AEnemy

Purpose: The primary enemy type available in the game. Configured with specific mesh, materials, health, movement patterns, and combat behavior.

Game Objects

Obstacle Definitions

Base C++ Class: AObstacle

Available Types: Three types of obstacles (TestAsteroids, TestCrystals, TestPlates) and projectile definitions. Each configured with unique meshes, collision properties, health values, and visual effects.

Obstacle_Patterns Obstacle pattern textures, each color channel is assigned an obstacle type by the game manager and configuration passed to the obstacle manager which uses it to determine which obstacles spawn over time.

🤖 This API demonstrates the power of AI function calling, allowing natural language to control complex game systems in real-time.
📖 Plugin Documentation 📚 Full API Reference