Using the AStarGrid2D class in Godot 4

Published: 19 December 2022
on channel: The Shaggy Dev
27,257
1k

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: https://shaggydev.com/2022/12/19/godo...

Sample code: https://github.com/theshaggydev/the-s...

AStarGrid2D documentation: https://docs.godotengine.org/en/lates...

Introduction to A*: https://www.redblobgames.com/pathfind...

A* Heuristics: https://theory.stanford.edu/~amitp/Ga...