>>21393
Well, I had a bit more time to take a look at things. I'm going to have to implement some sort of A* pathfinding myself sometime soon, so why the hell not, eh? Your results for a clear, uniform field aren't entirely odd, though the third one is a little more random than I was expecting. It could be that A* acts a little less consistently on a hex grid, but the odd shape of the northeast side of the searched area is... odd. The resulting path was optimal enough due to symmetry of movement.
I'm used to the terminology used on wikipedia's explanation and pseudocode, so my questions are going to use that terminology.
Why are you concerned about 3D? All I see here is a 2D hex grid. While there are technically three dimensions of movement on a hex grid, that's not at all important to implementing a search. The only thing that is important is to know what any hex's neighbors are.
You're using the variable name dsp_Frontier... is that equivalent to the open set? I think it is, but I want to be certain.
What represents the closed set? arr_Visited?
Is the use of CombinedString your way of keeping track of the parent of a hex? I'm pretty sure that's the case, but again, wanna be certain. I don't think this is causing speed problems, but I would not at all do this this way. I'd use ds_map_create to create a map to store this data. From the warnings in the GML documentation, though, it sounds like their implementation of maps is inefficient, but I bet you'd not notice that except maybe on full map crossings if you can fix the major slowdown.
In your section commented with "New path is shorter, replace old path", you don't actually replace the priority of the value, you actually are adding a new value/priority pair to the priority queue without removing the old one. Not sure if this will cause issues (in fact, I suspect it wouldn't do anything but maybe slow things down a bit), but if you ever need to squeeze every last bit of speed out of things, fixing this might help.
I still think scr_SearchInArray is your biggest problem. If anything I would suggest creating three maps (ds_map_create); one to which you add closed hexes (things that are in the closed set), one to which you add hexes that are in the open set, and one final one which would store the parent of the hexes (rather than using your combined string approach). Doing this, might just solve the last two issues, also. Again, it sounds like GM's map data structure implementation isn't quite efficient, but I'd still wager to say this would be the better way to do things. It might be worth it to see if there is a better map data structure implementation available as an extension to GM.
Finaly, one thing that bugged me, When you are testing to see if the previous path is shorter, you can instead test if the previous path is longer and get rid of that empty { } code block. I have no idea if GML will optimize that empty code block away, and I kinda doubt that it would.basically, change:
if TotalMCost >= arr_Visited[ 2, var_ArrayY] {/*Previous path was shorter, do nothing.*/}
else
with
if TotalMCost < arr_Visited[ 2, var_ArrayY]