RapidGameFramework
Reusable Godot managers for data-driven small games
Loading...
Searching...
No Matches
ai_controller Namespace Reference

Variables

 DataCacheManager
 
 Dictionary
 Return cache diagnostics for file-based convenience loads.
 
 data_cache_manager
 
 data
 Load AI profiles from JSON containing profiles: [].
 
 String
 Configure AI profiles directly from dictionaries.
 
 Vector2
 
 float
 
 best_distance = distance
 
 best = target
 
 bool
 
 Array
 
 candidates = balls.duplicate(true)
 
 int
 
int direction = -1
 
 low_error = float(profile.get("easy_tracking_error_low", -44.0))
 
 high_error = float(profile.get("easy_tracking_error_high", 10.0))
 
 target_y = ball_position.y + velocity.y * lead_time + tracking_error
 
 update_delay = lerpf(float(profile.get("approach_update_delay_slow", 0.24)), float(profile.get("approach_update_delay_fast", 0.11)), difficulty)
 
 Vector2i
 
 patrol
 
 bounds
 
float approaching_penalty = 9999.0
 
 best_score = score
 

Variable Documentation

◆ approaching_penalty

float ai_controller.approaching_penalty = 9999.0

Definition at line 311 of file ai_controller.gd.

◆ Array

ai_controller.Array

Definition at line 72 of file ai_controller.gd.

◆ best

ai_controller.best = target

Definition at line 64 of file ai_controller.gd.

◆ best_distance

ai_controller.best_distance = distance

Definition at line 63 of file ai_controller.gd.

◆ best_score

ai_controller.best_score = score

Definition at line 316 of file ai_controller.gd.

◆ bool

ai_controller.bool

Definition at line 70 of file ai_controller.gd.

◆ bounds

ai_controller.bounds

Definition at line 263 of file ai_controller.gd.

◆ candidates

ai_controller.candidates = balls.duplicate(true)

Definition at line 84 of file ai_controller.gd.

◆ data

ai_controller.data

Load AI profiles from JSON containing profiles: [].

Definition at line 17 of file ai_controller.gd.

◆ data_cache_manager

ai_controller.data_cache_manager

Definition at line 11 of file ai_controller.gd.

◆ DataCacheManager

ai_controller.DataCacheManager

Definition at line 8 of file ai_controller.gd.

◆ Dictionary

ai_controller.Dictionary

Return cache diagnostics for file-based convenience loads.

Return whether an AI should use a held ability/power-up now.

Grid helper: choose attack, chase, flee, patrol, or wait from simple profile data.

Arcade helper: decide whether an AI should use a stored Pong power-up.

Arcade helper: choose a Pong-style paddle target with update cadence, lead, and aim error.

Arcade helper: choose a vertical paddle direction toward the nearest incoming ball.

Pick the nearest target to an actor from a list of entities/dictionaries.

Return a copied AI profile by id.

Definition at line 10 of file ai_controller.gd.

◆ direction

int ai_controller.direction = -1

Definition at line 91 of file ai_controller.gd.

◆ float

ai_controller.float

Definition at line 55 of file ai_controller.gd.

◆ high_error

ai_controller.high_error = float(profile.get("easy_tracking_error_high", 10.0))

Definition at line 123 of file ai_controller.gd.

◆ int

ai_controller.int

Definition at line 89 of file ai_controller.gd.

◆ low_error

ai_controller.low_error = float(profile.get("easy_tracking_error_low", -44.0))

Definition at line 122 of file ai_controller.gd.

◆ patrol

ai_controller.patrol

Definition at line 190 of file ai_controller.gd.

◆ String

ai_controller.String

Configure AI profiles directly from dictionaries.

Definition at line 23 of file ai_controller.gd.

◆ target_y

ai_controller.target_y = ball_position.y + velocity.y * lead_time + tracking_error

Definition at line 126 of file ai_controller.gd.

◆ update_delay

ai_controller.update_delay = lerpf(float(profile.get("approach_update_delay_slow", 0.24)), float(profile.get("approach_update_delay_fast", 0.11)), difficulty)

Definition at line 127 of file ai_controller.gd.

◆ Vector2

ai_controller.Vector2

Definition at line 53 of file ai_controller.gd.

◆ Vector2i

ai_controller.Vector2i

Definition at line 174 of file ai_controller.gd.