jfk,
Sorry, just making sure we were on the same page. I'm working out how your adjacent nodes are created in the algo. This appears to take place in the evalNeighbors() Functions. Here is where we will determine the horizontal/vertical (10) and diagonal nodes(14). My node check is similar, but,I use a single loop with a DATA statement store adjacent offsets and gcost. The initial gcost is automatically associated with the node offset.
;You do this
For ckX=-1 To 1
For ckY=-1 To 1
For ckZ=-1 To 1
....
Next
Next
Next
;I do this
Restore Neighbors
For loop = 1 to 26
Read ckX, ckY, ckZ, ckG
...
Next
.Neighbors
;... x, y, z, gcost
Data 0, 0, 1, 10
Data -1, 0, 0, 10
Data 0, 0, -1, 10
Data 1, 0, 0, 10
Data 0, -1, 0, 10
Data 0, 1, 0, 10
Data -1, 0, 1, 14
Data -1, 0, -1, 14
Data 1, 0, -1, 14
Data 1, 0, 1, 14
Data 0, -1, 1, 14
Data -1, -1, 0, 14
Data 0, -1, -1, 14
Data 1, -1, 0, 14
Data 0, 1, 1, 14
Data -1, 1, 0, 14
Data 0, 1, -1, 14
Data 1, 1, 0, 14
Data -1, -1, 1, 14
Data -1, -1, -1, 14
Data 1, -1, -1, 14
Data 1, -1, 1, 14
Data -1, 1, 1, 14
Data -1, 1, -1, 14
Data 1, 1, -1, 14
Data 1, 1, 1, 14
I hope this helps. The really neat feature about this setup is that you can make all types node offset patterns with 4-24 node offsets. I didn't realize this feature until after it was implemented.
Frank, your socalled 3D A* Code produces an "Object does not exist" runtime error when I press 1, byside the fact that it actually is 2D A*, displayed in 3D graphicsmode, using a 2D Grid of Cubes.
Oops, I did find a wierd bug, that produced that error on other pcs, but, not my own. It was an illegal character in the text of the code. I believe I have corrected it. Additionally the demo is only setup to run the algo once otherwise it will produce that error as well. I'm still fine tuning and debugging.
It is true my A* operates in 2D on X/Z planes, with the Y plane controlled by gravity (set at 0 in the demo), however, it is still 3D.