Jump to content

Pathfinding routine

Recommended Posts

I needed a path finding routine for my little Rebelstar game project. I thought I could simply use pathfinding code already written in pascal for the job. This turned out to be more difficult that expected. Hassles with multidimensional dynamic arrays, binary heaps and other oddities that I could easily get working. I finally managed a simple routine working. I don't know who to credit for the original source code as there was no name provided.


The code is provided as is. I do not think that it is very quick. There is no cost for different terrain or diagonals implemented. However, that should not be too hard to add. Also there is no fancy interface to draw walls etc it is just bare bones.


I looked at some of the javascript libraries and they are pretty cool, so if some one wants a challenge. It would be awesome to have a routine that is fed a two dimensional array with rules for walls and costs and a path is returned :)


Share this post

Link to post
Share on other sites

No, that looks interesting. This really highlights the need to centralise code, examples and information. Thanks for the heads-up I will take a proper look later today.


Share this post

Link to post
Share on other sites

Preview MazeSolver Project



User click in a maze specific place and it will auto seeks the target


Download project - compiler ver


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now