The Daily Click ::. Downloads ::. Miscellaneous ::. Dcrew's A* Pathfinding Pack [6 Examples] [v2.4 Re]
 

Dcrew's A* Pathfinding Pack [6 Examples] [v2.4 Re]
Author: Dean James Reynolds Submitted: 22nd September, 2011 Favourites:1
Genre: Miscellaneous Downloads: 158
Rated:


Edited By Dean James Reynolds on 9/26/2011

v5 (2.3) RELEASED!

version 5 (2.3) just got released! With all bugs fixed, no known bugs with this.

aha!!! Here we go folks! An update. Excited? You should be, v4 (2.2) is a much
much more stabalized version of v3 (2.1), v3 (2.1) was more buggy than v2.0. But v4 (2.2)
fixes not just the bugs in v3 (2.1) but a major bug in both v2.0 and v3 (2.1). So...
what are you waiting for? Download it!

v4 (2.2) Major Note (READ!!): v4 (2.2) still consists of a bug that existed in v2.0 and v3 (2.1)
but is still much improved. so enjoy it!

All these pathfinding examples I made completely myself, they use
no complex stuff at-all, unlike other pathfinders. they're hard to
implement because they're too hard to understand. where-as my pathfinders
are all about math (v2.0 and v3 (2.1))! They are not hard to understand.

Infact there is nothing to understand except: the blue square is the
player/bot.. the red square is it's target to find it's pathway!

v1 Sucks, wouldn't use it! Was my first ever try at pathfinding!
v2.0 and v3 (2.1) pwn, I recommend v2.0, it sounds silly!! I know.. but v3 (2.1) may use
less stuff (CPU and Events) than v2.0 but v3 (2.1) is also a-bit more buggy than v2.0,
like sometimes.. v3 (2.1) can be completely retarded and take a long route to
it's target. where-as v2.0 will ALWAYS take the shortest route to it's target.
If you don't mind v3 (2.1) sometimes taking the long route and you would rather
use the leasts CPU and Events then go ahead and use v3 (2.1).

This is 3 projects, v1 took me 4-5 hours and was a while ago when I made it.
v2.0 and v3 (2.1) we're made together (v3 (2.1) is a less CPU and Events usage than v2.0)
but is slightly more buggy. Have a-look at them and see which works best.
v2.0 and v3 (2.1) took me 2 days to make. because of all the math.

Enjoy, oh and please please please provide credits to Dcrew (me). Thanks!


Version 1:
- Uses alot of CPU
- Would lag your game to hell with 5+ of these


Version 2:
- Uses hardly any CPU at-all
- Uses a real load of mathematics
- Takes up 96 Events


Version 3:
- Uses the least of any pathfinding memory
- Uses alot of math
- Takes up 46 Events


Version 4:
- Uses the least of any pathfinding memory
- Uses alot of math
- Takes up 52 Events


Version 5:
- Uses the least of any pathfinding memory
- Uses alot of math
- Takes up 58 Events


Version 6:
- Uses the least of any pathfinding memory
- Uses alot of math
- Takes up 62 Events

Review This Download



 


http://uppit.com/zt6dnahcao95/Dcrew's_Pathfinding_Pack.rar (127kb )



Posted by danjo 23rd September, 2011

not bad effort. BUT, its quite easy to get it stuck (on v2) place the blue bot at bottom left corner. it will get stuck when it hits a blocked up & right path
 
Posted by Dean James Reynolds 23rd September, 2011

@danjo I know, I'm trying my very best for v4, to get it perfect with no bugs and use the least events. thanks for using, would you recommend it? do ya think it's worth using? I hope so, thanks again for using it!
 
Posted by danjo 24th September, 2011

what i'd do, is have at each step, add to a list the available directions. your moving toward the target is fine, but if it gets stuck like it does, it will have to back track, and flag the route it come from as invalid so it doesnt resume back down that path. to do that, you'll have to add something like a dynamic array or list, so if you do go backward, it can find the "next" best way to the target.
i admire your task at trying to do this the manual way
 
Posted by Dean James Reynolds 24th September, 2011

@danjo thanks very much, but in fact I figured out a way to resolve the bugs without using pathfinding, currently when it get's stuck. It can get stuck in 3 directions and It doesn't check the 3rd otherwise it would go the 4th available.

While v4 will have this fixed, that means this pathfinding will almost be perfect. the only problem would be that it sometimes takes long routes to it's target, which tbh is fine by me, but enjoy it anyway!
 
Posted by Dave C 25th September, 2011

it still gets stuck in both version 4 and 5. several times I made the AI just walk backwards and forwards in a 2-4 square circle.
 
Posted by Dean James Reynolds 25th September, 2011

@Dave_C It really shouldn't do that, I'll take a look and if I catch a bug then I'll fix it
 
Posted by Dean James Reynolds 26th September, 2011

v2.4 Updates! 0 Bugs Found!!!
 
Posted by chrilley 28th September, 2011

It seems it still gets stuck a lot (version 5), one specific route where it fails that I can reproduce is going from the low-left corner to the top-right corner.
Comment edited by chrilley on 9/28/2011
 
Posted by Dean James Reynolds 28th September, 2011

@chrilley Try version 6 (2.4) it fixes the "stuck" bugs.
 
Posted by chrilley 28th September, 2011

Yeah, that one works much better. I still manage to mess it up often though. It keeps going around in circles.

http://img696.imageshack.us/img696/8544/pathfind.png

It then stops when you assign a new target position.
 
Posted by chrilley 28th September, 2011

It stops going around in circles that is, moving to its new target.
 
Posted by Dean James Reynolds 28th September, 2011

@chrilley I see, I spotted that when I used to use the "Manhatten" formula for the direction calculation. Now in v2 it uses the "Euclidean" formula, I don't understand why it seems to calculate (in your given picture) it chooses right over down. I'll have a look.
 
Posted by Riptide 23rd October, 2013

Could you reupload this one please the link is broken, thanks a lot dude, this will make my day ! ;D
 
Posted by MEHRDAD 16th May, 2014

I want it too.
Comment edited by MEHRDAD on 16/05/2014
 

 



Author

Favourite



Advertisement

Worth A Click