Path finding

Thoughts on the further development of Haven & Hearth? Feel free to opine!
User avatar
theTrav
Posts: 3464
Joined: Fri May 29, 2009 11:25 pm

Path finding

Post by theTrav »

Just curious as to where you guys (J&L) are currently at with path-finding, what you're finding difficult and what you're thinking in terms of resolving it.
User avatar
kaka
Posts: 673
Joined: Fri Apr 03, 2009 8:31 am
Location: Château de Gâteau

Re: Path finding

Post by kaka »

From what Loftar told me, he has the algorithm worked out and what's left is to implement it.
It's hard to tell how long that will take, though...
User avatar
loftar
Posts: 9096
Joined: Fri Apr 03, 2009 7:05 am
Location: Your character database

Re: Path finding

Post by loftar »

To be more precise, it's been a little hard to figure out a good algorithm. Obviously, I can't use a normal graph-searching algorithm (like A*) for pathfinding, since I have no graph to search (even if I could use the game objects as locative nodes directly and had a complete list of them, which I don't, I would still have no neighbor list or anything related). Therefore, I've had to figure out an algorithm that does wihout it. I think I've figured out a reasonable algorithm now which uses object corners as locative nodes and then find new nodes (lazily) in the process of trying to trace a path towards the goal.

As kaka says, I now only have to actually implement it. And then I have to re-implement players and animals a bit to be able to actually follow paths. I don't think I'll have to worry much about moving objects, however (in the way that RTS games often have to do), since collisions with moving objects will probably be comparatively rare.
"Object-oriented design is the roman numerals of computing." -- Rob Pike
User avatar
Ferinex
Posts: 1040
Joined: Sun May 31, 2009 9:05 am
Location: Miami

Re: Path finding

Post by Ferinex »

loftar wrote:since collisions with moving objects will probably be comparatively rare.
*horrified by rats and chickens and rabbits and toads*
i guess they never miss huh

Return to “Critique & Ideas”