Jump to content


Photo

Pathfinding routine


  • Please log in to reply
4 replies to this topic

#1 Czar

Czar
  • Members
  • 165 posts

Posted 08 August 2017 - 12:14 AM

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 :)

Attached Files



#2 Jørn E. Angeltveit

Jørn E. Angeltveit
  • Administrators
  • 299 posts
  • LocationNorway

Posted 08 August 2017 - 01:13 PM

Did you see this: https://www.delphito...-to-javascript/
  • Czar likes this

#3 Czar

Czar
  • Members
  • 165 posts

Posted 08 August 2017 - 08:13 PM

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.

#4 Laksekjønn

Laksekjønn
  • Members
  • 455 posts

Posted 08 August 2017 - 10:23 PM

We have two maze based project with sources @http://forums.smartm...-showcase-area/

#5 Laksekjønn

Laksekjønn
  • Members
  • 455 posts

Posted 08 August 2017 - 11:09 PM

Preview MazeSolver Project

https://rawgit.com/s.../www/index.html
User click in a maze specific place and it will auto seeks the target


Download project - compiler ver 2.2.2.4543
https://raw.github.c.../MazeSolver.rar
  • Czar likes this




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users