click anywhere. it should find a path to the first green point that it touches. [turbo mode recommended(press green flag while holding shift key)] want it even faster? https://turbowarp.org/726870172/fullscreen?fps=250&turbo if it goes through walls, the size of the pathfinding sprite should be made bigger. if it gets stuck(when the walls are too close together), turn the size and the resolution down
its the scratch version of a simple path-finding thing. idk if its the shortest path, but it think it is, tell me when I'm wrong and ill delete this sentence. its slow, but its 100% by me. the path-finding sprite is 100% pen. i know there are better ones, but when i started it, I didn't really intend to publish this. i used similar things in a mod for a minecraft-like game to fill things(like caves) with blocks. (But i always only used the first half of this). I started making this project to see if it works in scratch too. But then i got the idea that it could also be used for pathfinding. i found out that its possible and it worked better than expected. so i published it. Sorry for this long text. how it works: –it starts searching for blank spots around the starting point. –it adds the resulting positions to a list (and the direction from where it came to another list[needed later]). –Then it searches the next point in that list and the next and does that until it reaches the end of the list(=>no solution) or it touches the green dot. –if it touched the green point, it looks from which direction it came and searches from which direction that point came and does that until it reaches the first element of the list(=>complete path found) or it detects a loop(it already visited that dot. that would create a never ending loop. =>incomplete path is displayed)