Grid Pathfinding for Godot 4
A downloadable tool
Grid Pathfinding for Godot 4 is a lightweight and reusable pathfinding addon designed for grid-based projects using Vector2i coordinates.
Built to integrate with the Grid Utility addon, it provides A* pathfinding and reachable-area helpers without making gameplay assumptions. The logic is fully decoupled and suitable for a wide range of grid-based games and tools.
This addon is intended for developers who want reliable, flexible grid navigation without introducing unnecessary complexity or engine-level constraints.
Key Features
-
A* pathfinding on grid-based layouts
-
Support for 4-way and 8-way movement
-
Optional control over diagonal corner cutting
-
Reachable-area and movement-range queries
-
Custom walkability and cost callbacks
-
Game-agnostic design suitable for multiple genres
Installation Instructions
Requirements
***This addon requires the Grid Utility plugin - sold separately or as bundle.***
The project must have the following autoload enabled:
-
Name:
Grid -
Script:
res://addons/grid_utility/Grid.gd
Grid Utility can be installed separately or via the bundled Grid Toolkit.
Installation Steps
-
Copy the addon folder into your project:
res://addons/grid_pathfinding/
-
Enable the plugin:
-
Open Project → Project Settings → Plugins
-
Locate Grid Pathfinding
-
Set it to On
-
-
Ensure Grid Utility is also enabled so the
Gridautoload exists.
Basic Usage Example
var pf := GridPath.new()
var is_walkable := func(cell: Vector2i) -> bool:
return true
var path := pf.find_path(
start_cell,
goal_cell,
is_walkable
)
The returned path is an array of Vector2i cells from start to goal (inclusive).
If no valid path exists, the array is empty.
Reachable Areas (Movement Range)
var result := pf.reachable(
start_cell,
is_walkable,
Callable(),
{ "max_cost": 8 }
)
var reachable_cells := result["cells"]
var cost_map := result["cost"]
This can be used for movement ranges, flood-fill logic, influence maps, and AI decision systems.
Recommended Uses
-
Tactics & turn-based games
-
Roguelikes / dungeon crawlers
-
Puzzle games with grid movement
-
AI movement & decision systems
-
Grid-based tool editors and utilities
Included Demo Controls
-
Left Click — set START cell
-
Right Click — set GOAL cell
-
Middle Click — toggle obstacle
-
M — toggle 4-way / 8-way movement
-
C — toggle diagonal cutting
-
R — toggle reachable range visualization
Demo
An interactive demo scene is included with the download:
res://demo/PathfindingDemo.tscn
The demo showcases obstacle placement, pathfinding, movement modes, and reachable-area visualization.
License
MIT License.
Author
Height Gaming
| Published | 12 hours ago |
| Status | Released |
| Category | Tool |
| Author | Height Gaming |
| Tags | a-star, Godot, godot-4, godot-addon, grid, indie-dev, pathfinding, tactics, tools, Turn-based |
Download
Click download now to get access to the following files:

Leave a comment
Log in with itch.io to leave a comment.