c++ astar pathfinding implementation
- From: Xecutor <konstantin.stupnik@xxxxxxxxx>
- Date: Thu, 11 Dec 2008 09:33:06 -0800 (PST)
When I was going to add pathfinding to game I found thru google
implementation by Justin Heyes-Jones, tested it a little, and decided
to use,
without digging into it too much.
However when I added 'non-deterministic pathfinding' to the game,
this implementation started to hang in an ininite loop time to time.
While I was trying to fix this I studied library a little deeper and
found a few things that I didn't like.
One of this things - linear search.
My mind of mathematician and programmer rejected this even as
suboptimal solution.
However after several tests I found that I was somewhat wrong...
When I simply replaced arrays with associative containers,
I got worse performance, especially in case of small distance between
start and goal.
Containers and optimizations is my speciality at work, so ...
I suspended development of rl for two weeks, but managed to make
special containers and memory management that surpasses
original implementation. Especially in case of big distances- can be
up to 10 times faster.
If anyone interested - here is original and improved implementations:
http://max.eyeline.mobi/skv/astarnew.zip
I didn't understand how to send message to Justin Heyes-Jones thru
google code,
where his implementation is hosted :(
.
- Follow-Ups:
- Re: c++ astar pathfinding implementation
- From: Xecutor
- Re: c++ astar pathfinding implementation
- From: corremn
- Re: c++ astar pathfinding implementation
- From: Gerry Quinn
- Re: c++ astar pathfinding implementation
- From: Gelatinous Mutant Coconut
- Re: c++ astar pathfinding implementation
- Prev by Date: Re: Animating monster moves?
- Next by Date: Re: Animating monster moves?
- Previous by thread: IDs versus references
- Next by thread: Re: c++ astar pathfinding implementation
- Index(es):
Relevant Pages
|
Loading