Posted: 9th May 2003 0:03
I`ve found a lot of A-star example codes alround the net but I couldn`t find a Dark Basic one... I`ve just finished my own so here it goes:

ps. sorry for the mess in the code
Posted: 9th May 2003 0:36
Very good! Even holding down shift (solve path) and drawing walls, the shortest path is calc'd in almost real time!
Posted: 9th May 2003 2:54
Thanks and it can get even faster... I just need to find a sorting system to the open list... but for now it`s good for turn based games
Posted: 9th May 2003 16:11
Bearing in mind that I don't know how your code works yet, how would you want your openlist to be sorted?

I have an array dll on my site that has an array sort function that maybe could do what you want if I tweak it. For example an ascending sort on 'f' is possible, and fairly easy if it is made the first field in the tile type.
Posted: 9th May 2003 23:28
It would be sorted like you said Ascending 'f's

right now i`m making a turn-based game so speed isn`t quite needed but if anyone is trying to make a rts than I think that would help...
thanks
Posted: 9th May 2003 23:38
Thank-you so much! x-d

I have just started programming some A-star pathfinding code in the last week and have got stuck multiple times! This is just what I need, thanks again.

I am making a 3d rts game, so IF(!) it ever gets finished, I will make sure you are credited for this.

Thanks, david
Posted: 10th May 2003 4:54
nice work!
Posted: 10th May 2003 6:14
Thanks guys & davidt hope it helps you in your rts