Raised This Month: $ Target: $400
 0% 

A* Pathfinding API


Post New Thread Reply   
 
Thread Tools Display Modes
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 06-17-2014 , 08:16   Re: A* Pathfinding
Reply With Quote #11

Nice job, I consider using it in my next works.
__________________
Kia is offline
4554
Senior Member
Join Date: Aug 2009
Old 06-18-2014 , 15:06   Re: A* Pathfinding
Reply With Quote #12

Quote:

L 06/19/2014 - 03:042: Invalid trie handle provided (2)
L 06/19/2014 - 03:042: [AMXX] Run time error 10 (plugin "astar.amxx") (native "TrieSetArray") - debug not enabled!
L 06/19/2014 - 03:042: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 06/19/2014 - 03:042: Unhandled dynamic native error
L 06/19/2014 - 03:042: [AMXX] Run time error 10 (plugin "astar_example.amxx") (native "AStar") - debug not enabled!
L 06/19/2014 - 03:042: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
I got this error when I use your example

please help, thanks
4554 is offline
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 06-18-2014 , 15:25   Re: A* Pathfinding
Reply With Quote #13

Debug it, how the amxmodx says. We can't know where the error exactly is.
__________________
Flick3rR is offline
Send a message via Skype™ to Flick3rR
Baws
Veteran Member
Join Date: Oct 2012
Old 06-18-2014 , 21:22   Re: A* Pathfinding
Reply With Quote #14

Type 'debug' after the plugins name and then send the errors.
__________________
Like my clean plugins and work?

Last edited by Baws; 06-18-2014 at 21:22.
Baws is offline
4554
Senior Member
Join Date: Aug 2009
Old 06-19-2014 , 01:10   Re: A* Pathfinding
Reply With Quote #15

Quote:

L 06/19/2014 - 13:09:26: Invalid trie handle provided (2)
L 06/19/2014 - 13:09:26: [AMXX] Displaying debug trace (plugin "astar.amxx")
L 06/19/2014 - 13:09:26: [AMXX] Run time error 10: native error (native "TrieSetArray")
L 06/19/2014 - 13:09:26: [AMXX] [0] astar.sma::native_AStar (line 92)
L 06/19/2014 - 13:09:26: Unhandled dynamic native error
L 06/19/2014 - 13:09:26: [AMXX] Displaying debug trace (plugin "astar_ex.amxx")
L 06/19/2014 - 13:09:26: [AMXX] Run time error 10: native error (native "AStar")
L 06/19/2014 - 13:09:26: [AMXX] [0] astar_ex.sma::testfunc (line 159)
4554 is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Upplands Väsby, Sweden
Old 06-19-2014 , 17:46   Re: A* Pathfinding
Reply With Quote #16

I'm working on:
1. Fixing that error.
2. Finding out why it doesn't always give me a path even thought it is completely obvious it should.
3. "Threading" it.
__________________

Last edited by Black Rose; 06-20-2014 at 23:27.
Black Rose is offline
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 06-20-2014 , 00:56   Re: A* Pathfinding
Reply With Quote #17

Didn't have any problems with this test plugin, everything worked fine.
__________________
Kia is offline
GordonFreeman (RU)
Veteran Member
Join Date: Jan 2010
Location: Uzbekistan
Old 06-20-2014 , 01:08   Re: A* Pathfinding
Reply With Quote #18

Quote:
Originally Posted by 4554 View Post
L 06/19/2014 - 13:09:26: [AMXX] Run time error 10: native error (native "TrieSetArray")
You need to use AMXX 1.8.2hg26 or higher.
There is bug with TrieSetArray native on older versions.
__________________
The functional way is the right way
GordonFreeman (RU) is offline
4554
Senior Member
Join Date: Aug 2009
Old 06-20-2014 , 06:51   Re: A* Pathfinding
Reply With Quote #19

Quote:
Originally Posted by GordonFreeman (RU) View Post
You need to use AMXX 1.8.2hg26 or higher.
There is bug with TrieSetArray native on older versions.
Thanks, the problem is fixed
4554 is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Upplands Väsby, Sweden
Old 06-20-2014 , 23:40   Re: A* Pathfinding
Reply With Quote #20

Shameless plug for the new version with "threaded" paths.
Here are some examples on de_aztec using threaded and non-threaded calls.
I used all the standard parameters of the natives. increasing StepSize will increase the performance. Heuristic will too, but will create a suboptimal path. (It will look like someone placed a magnet on the end position and dragged most points towards it.)

Spoiler

Non-threaded:
Code:
Start: -3030, 360, -325. End: 2480, -288, -277. Distance: 5548 units.
Execution time: 13s 533ms (88715 nodes, 46858 validated, 12902 successful)
Distance of path: 9248 units, 258 steps.
"Threaded":
Code:
Start: -3030, 360, -325. End: 2480, -288, -277. Distance: 5548 units.
Execution time: 14s 185ms (88715 nodes, 46858 validated, 12902 successful)
Distance of path: 9248 units, 258 steps.
Spoiler

Non-threaded:
Code:
Start: -3073, -925, -213. End: 2480, -288, -277. Distance: 5590 units.
Execution time: 1s 901ms (26951 nodes, 14084 validated, 4114 successful)
Distance of path: 7335 units, 221 steps.
"Threaded":
Code:
Start: -3073, -925, -213. End: 2480, -288, -277. Distance: 5590 units.
Execution time: 2s 115ms (26951 nodes, 14084 validated, 4114 successful)
Distance of path: 7335 units, 221 steps.
As you can see, there's a huge difference in just the starting position.
__________________

Last edited by Black Rose; 06-21-2014 at 10:21.
Black Rose 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 00:35.


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