An A* Pathfinding Algorithm IN SCRATCH! WITH ONLY 243 BLOCKS!* Some controls: Hold [-] when pressing flag to remove all points Press [A] to add a point Press [C] to connect two points (bi-directionality is whether or not the connection goes both ways, or just from, say, A to B and not B to A) Press [P] to pathfind from one point to another; The "shortest" path will be highlighted in green (the heuristic estimate is currently the Euclidian distance between the two point's physical coordinates on the stage) Credits: Computer Science Lessons on YT (https://scratch.mit.edu/discuss/youtube/eSOJ3ARN5FM/ ) and Amit Patel on from Red Blob Games (https://www.redblobgames.com/pathfinding/a-star/introduction.html ) for explanations on how the A* algorithm works I made this because I kinda wanted to make a platformer AI that could properly follow the player but the Godot tutorial I decided to use required Godot's built-in A* pathfinding. Here's a follow-up implementation: https://scratch.mit.edu/projects/785774856/ UPDATE: connecting points now automatically calculates the distance between them the same way the heuristic estimate is calculated, so pathfinding results should be better #pathfinding #astar *disclaimer: block count does not include the blocks required to setup the graph of points to pathfind through, or the blocks used to delay the pathfinding so it becomes animated