class

PointClickEngine::Navigation::PathfindingDebugRenderer

Inherits Reference < Object

Debug visualization for pathfinding and navigation

The PathfindingDebugRenderer provides visual debugging tools for pathfinding algorithms, navigation grids, and character movement. It should only be used during development and debugging.

Constructors

new(grid : NavigationGrid)
Source

Instance methods

blocked_color
Source
blocked_color=(blocked_color : RL::Color)
Source
disable

Disables debug rendering

Source
draw_algorithm_state(visited_nodes : Set(Tuple(Int32, Int32)), open_nodes : Set(Tuple(Int32, Int32)), alpha : UInt8 = 80_u8)

Draws pathfinding algorithm state (visited and open nodes)

Source
draw_character_info(character_pos : RL::Vector2, target_pos : RL::Vector2 | Nil = nil, character_radius : Float32 = 10.0_f32)

Draws character position and target

Source
draw_grid(color_walkable : RL::Color = @walkable_color, color_blocked : RL::Color = @blocked_color, alpha : UInt8 = @grid_alpha)

Draws the navigation grid

Source
draw_grid_coordinates(font_size : Int32 = 8, spacing : Int32 = 4)

Draws grid coordinates for debugging

Source
draw_grid_outlined(color_walkable : RL::Color = @walkable_color, color_blocked : RL::Color = @blocked_color, outline_color : RL::Color = RL::BLACK, alpha : UInt8 = @grid_alpha)

Draws the navigation grid with outline

Source
draw_grid_stats(x : Int32 = 10, y : Int32 = 10, font_size : Int32 = 16)

Draws navigation grid statistics

Source
draw_node_costs(nodes : Hash(Tuple(Int32, Int32), Tuple(Float32, Float32, Float32)), font_size : Int32 = 10)

Draws node costs for debugging

Source
draw_path(path : Array(RL::Vector2), color : RL::Color = @path_color, thickness : Float32 = @path_thickness)

Draws a path with waypoints

Source
draw_path_directions(path : Array(RL::Vector2), arrow_size : Float32 = 5.0_f32, color : RL::Color = RL::GREEN)

Draws directional arrows along path

Source
draw_path_simple(path : Array(RL::Vector2), color : RL::Color = @path_color, thickness : Float32 = @path_thickness)

Draws a simple path without waypoints

Source
draw_performance_info(x : Int32, y : Int32, search_time : Float64, nodes_explored : Int32, path_length : Float32, font_size : Int32 = 16)

Draws pathfinding performance info

Source
enable

Enables debug rendering

Source
enabled
Source
enabled=(enabled : Bool)
Source
end_color
Source
end_color=(end_color : RL::Color)
Source
grid
Source
grid=(grid : NavigationGrid)
Source
grid_alpha

Visual settings

Source
grid_alpha=(grid_alpha : UInt8)

Visual settings

Source
highlight_cells(cells : Array(Tuple(Int32, Int32)), color : RL::Color = RL::MAGENTA, alpha : UInt8 = 150_u8)

Highlights specific grid cells

Source
open_color
Source
open_color=(open_color : RL::Color)
Source
path_color
Source
path_color=(path_color : RL::Color)
Source
path_thickness
Source
path_thickness=(path_thickness : Float32)
Source
start_color
Source
start_color=(start_color : RL::Color)
Source
to_s(io : IO) : Nil

String representation

Source
toggle

Toggles debug rendering

Source
visited_color
Source
visited_color=(visited_color : RL::Color)
Source
walkable_color

Colors

Source
walkable_color=(walkable_color : RL::Color)

Colors

Source
waypoint_radius
Source
waypoint_radius=(waypoint_radius : Float32)
Source