Raised This Month: $ Target: $400
 0% 

A* Pathfinding API


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   General Purpose       
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Upplands Väsby, Sweden
Old 06-15-2014 , 18:21   A* Pathfinding API
Reply With Quote #1

A* Pathfinding API
Pathfinding API which will (hopefully) find a walkable path between two points. Usable for NPCs without waypoints for every map.


This is highly experimental and should not be used for publically released plugins.
I do encourage that you try it out with the debug mode and help me finding new methods of doing certain checks.


Include (functions)


Example code


Example result image


Changelog


Additional notes:
The best would probably be to make it a module. Feel free to do so (I can't write code in C). You have my permission to use any of this code in that project.
I'm always open to suggestions, feedback and criticism. Please share your thoughts.
Attached Files
File Type: sma Get Plugin or Get Source (astar.sma - 1559 views - 16.8 KB)
File Type: inc astar.inc (3.8 KB, 708 views)
__________________

Last edited by Black Rose; 07-24-2017 at 11:43.
Black Rose is offline
GuskiS
Veteran Member
Join Date: Aug 2007
Location: Latvia
Old 06-16-2014 , 08:53   Re: A* Pathfinding
Reply With Quote #2

I don't quite understand what it does. Doest it look for suitable movement path? If so, this could be amazing for NPC's making them walk around the map just by giving coords :O
__________________
Finished mods:
Trouble in Terrorist Town
MurderMod
The Hidden
Cowboys vs Indians
JailBreak Supreme
Survival Madness
GuskiS is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Upplands Väsby, Sweden
Old 06-16-2014 , 08:58   Re: A* Pathfinding
Reply With Quote #3

Yes, that is what it does.
__________________
Black Rose is offline
UchihaMadara
Junior Member
Join Date: Jun 2014
Location: The South
Old 06-16-2014 , 09:04   Re: A* Pathfinding
Reply With Quote #4

It's cool, where did you take it?
And this one should be posted in Code Snippets/Tutorials

Last edited by UchihaMadara; 06-16-2014 at 09:10.
UchihaMadara is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Upplands Väsby, Sweden
Old 06-16-2014 , 09:14   Re: A* Pathfinding
Reply With Quote #5

I didn't take it. I made it.
Mostly from psuedocode on the Wikipedia page on A*. The rest is my work.
__________________
Black Rose is offline
Backstabnoob
Veteran Member
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 06-16-2014 , 09:17   Re: A* Pathfinding
Reply With Quote #6

Quote:
Originally Posted by UchihaMadara View Post
It's cool, where did you take it?
And this one should be posted in Code Snippets/Tutorials
No it shouldn't. It's a plugin like any other, this one is an API so it might not be suited for you, but it's suited for others.
__________________
Currently busy working on a very large scale anime database project.
Backstabnoob is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 06-16-2014 , 09:23   Re: A* Pathfinding
Reply With Quote #7

Wow, awesome, will definitely try this out!
<VeCo> is offline
Phant
Veteran Member
Join Date: Sep 2009
Location: Belarus
Old 06-16-2014 , 09:24   Re: A* Pathfinding
Reply With Quote #8

Very interesting.
It would be nice to see how this algorithm calculate long path, for example, from T spawn on de_aztec to CT spawn.
Or on some big Half-Life map, for example, "bounce".
Phant is offline
Send a message via ICQ to Phant
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 06-16-2014 , 10:30   Re: A* Pathfinding
Reply With Quote #9

This seems pretty neat, good job.
__________________
hleV is offline
4554
Senior Member
Join Date: Aug 2009
Old 06-16-2014 , 11:42   Re: A* Pathfinding
Reply With Quote #10

very cool!
4554 is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:44.


Powered by vBulletin®
Copyright ©2000 - 2022, vBulletin Solutions, Inc.
Theme made by Freecode