Pathfinding using A* Search Algorithm

,

Heres my daily dose of 2 dimensional game development!

Currently developing a Pathfinding module for 2d games, for all your npc pathfinding needs! This took me about 4 hours to make!

Heres what I have achieved as yet. The yellow line is the shortest path between The top left corner of the grid and the bottom right corner of the grid. The Black boxes are obstacles through which the path can’t go through!

I achieved this by using a well known path finding algorithm known as A* Search Algorithm, usually used in many games and even apps. Google maps uses the the Dijkstra algorithm which is quite similar to A*.


Any form of feedback will be highly appreciated.

See you soon in #resources:community-resources!

5 Likes

This looks great!
I made my own version of this for cars about a month ago.

2 Likes