[-]
Shout:
Click Refresh to load shouts.

Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Delphi] Path-Finding (A*)
02-24-2009, 04:05 PM (This post was last modified: 02-24-2009 04:11 PM by megano0body. Edit Reason: )
Post: #1
[Delphi] Path-Finding (A*)
[ATTACH]631[/ATTACH]
< the path legend is wrong, the path is Aqua color >

When i did this i was with anything to do... (2 hours wasted from my life Tongue)


Well, this is the AStar function that i made, to use:

Code:
var
rPath: array of TPoint {unit variable}
Code:
var
  Start, Target: TPoint;
  Start.X := 0;
  Start.Y := 0;
  Target.X := 1000;
  Target.Y := 1000;
  if AStar(Start, Target) then
      { You have the rPath variable with the generated path }
[COLOR="Red"]
This has a interface for testing, the function AStar() is easy to edit and to improve...


[SIZE="4"]This version of A* don't have any smoothing and any anti-collision, you can find some addons for the algorithms in many locations.[/SIZE]
[/COLOR]

http://rapidshare.com/files/202121830/AStar_Testing.rar
You can find this algorithm in many websites and many versions, this i wrote is one-function only simple algorithm.
Find all posts by this user
Quote this message in a reply
02-24-2009, 04:25 PM
Post: #2
[Delphi] Path-Finding (A*)
I'll take a look at making this VB.net

Thanks Big Grin

Find all posts by this user
Quote this message in a reply
Post Reply 



Contact UsTProgrammingReturn to TopReturn to ContentLite (Archive) ModeRSS Syndication