Using the AStarGrid2D class in Godot 4 @TheShaggyDev
Using the AStarGrid2D class in Godot 4  @TheShaggyDev
Uploaded December 2022 | Updated November 2026, 3 hours ago
New to Godot 4, the AStarGrid2D class makes solving grid-based layouts a lot easier than the existing AStar2D class while also adding some performance improvements and control for how that pass is found.

Basic usage: 00:00
Customizing the heuristic: 01:26
Using diagonals: 02:24
Jumping: 02:58

Text version: shaggydev.com/2022/12/19/godot-astargrid2d

Sample code: github.com/theshaggydev/the-shaggy-dev-projects/tree/main/projects/godot-4/astargrid2d

AStarGrid2D documentation: docs.godotengine.org/en/latest/classes/class_astargrid2d.html

Introduction to A*: redblobgames.com/pathfinding/a-star/introduction.html

A* Heuristics: https://theory.stanford.edu/~amitp/GameProgramming/Heuristics.html
Using the AStarGrid2D class in Godot 4Unit AI in my tactical rogueliteHow I do screen shake in GodotThe navigation system of my tactical rogueliteCustom cursors in GodotMaking a customizable turn-based combat game in two weeksEasy in-engine screenshots in Godot 4Communicating between game objects with the observer patternSetter and getter functions in Godot 3 with setgetHow unit selection works in my tactical strategy gameCreating volume sliders in Godot 4Advanced state machine techniques in Godot 4
The Shaggy Dev |

Using the AStarGrid2D class in Godot 4

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER