Well, as you all now Unity pulled out one of my kit 'Corel Reef PlayMaker Kit' from the asset store because it used Astar pathfinding FREE of arongranberg.com. They advised me to develop my own pathfinding before hitting the store.

I think it will be pretty complex to integrate into other projects with any flexibility if we're using no custom actions or scripting. We'll see.. Got a few ideas floating through my head for it but I moved away from projects requiring heavy pathfinding simply because its a hassle until I can get a better grasp on it.

First version : Setting up the arrays and Calculating F score of Top middle cell.

Path Scoring :

The key to determining which squares to use when figuring out the path is the following equation:

F = G + H

where

G = the movement cost to move from the starting point A to a given square on the grid, following the path generated to get there. H = the estimated movement cost to move from that given square on the grid to the final destination, point B. This is often referred to as the heuristic, which can be a bit confusing. The reason why it is called that is because it is a guess. We really don’t know the actual distance until we find the path, because all sorts of things can be in the way (walls, water, etc.). You are given one way to calculate H in this tutorial, but there are many others that you can find in other articles on the web.

This looks like a nice start, you've got the cell's dropping and defining as walkable/unwalkable nice and clean

This is all new to me, definitely looking into it more. I'm surprised at the density of the system already, didn't realize it would be this heavy.

I don't really understand how building the path works, do you get all the nearest squares, then the lowest value, then build toward the target and continue picking the lowest value? That would be weird if the start was in a U shape and the end was right outside the U shape, the most expensive route would be the actual cheapest and it would have to calc all of the possible routes until it got to the successful one. The manhattan method I guess is what throws me off.

It seems like its in phases, if we project toward the target and begin scanning in some direction for a way around obstacles until we eventually get a solution we have to build the optimal path separate from the pattern we used to scan for it.

They mention Open List and Closed list. It seems like we need to calculate nodal pattern based on Manahttan so it can choose the lowest available H score, store the scores in each node while its running the path scan, but when it gets to the destination node it builds needs to build a path based on the tile scores?

They get into parenting and some stuff, but I didn't have time to really dig into it, looks like you can use it to build a line of cheapest node costs and then build the actual path backward from the destination through the cheapest connecting parents after one of the nodes makes contact with the "destination" node.

I did some harder routes and stuff for it. It blew right through them with no issue. I suppose next you need to encapsulate it into kit form so you can define the grid area and build the route with an input and destination of choice.

Are the final waypoints dumped into an array that you could use to have something follow them? Planning on working in any local avoidance or rebuilding partially?

Man.. It's so great to see this all in FSM form. I wonder how the load is on larger grids and with multiple paths being built during gameplay. Wish I had more time to look into it, just been swamped lately.