Pathfinding in a 3d point'n'click adventure?

Blitz3D Forums/Blitz3D Programming/Pathfinding in a 3d point'n'click adventure?

JustLuke(Posted 2005) [#1]
I'm hoping that one of you Blitz gurus out there might be able to help me out with some pathfinding advice.

What do you think would be the best way to implement pathfinding for a traditional point'n'click adventure game (think Monkey Island or King's Quest) which uses real-time 3d backgrounds and models? Sort of like Bone: Out From Boneville (visit http://www.telltalegames.com/home to see what I mean).

I've never developed a pathfinding system that I've been happy with. I have heard many general ideas. People often mention A* algorithms, waypoints etc. Unfortunately I seem to have a mental block when it comes to pathfinding, so pathfinding theory is useless to me. Could anyone here give me more specific and practical advice on implementing pathfinding in this particular case?

Simply put, I want to be able to click on a spot and have a character walk to it and avoid obstacles in it's way.


C'mon guys! Show me that great Blitz community spirit and help a poor guy out here! :)


jfk EO-11110(Posted 2005) [#2]
For this case I would sugest to use 2D A Star pathfinding.

This means it won't be possible to have the character explore multiple levels (of a building) with the same pathfinding obstacles information. If you want him to walk on multiple levels, you need to use multiple layers of obstacle information.

First you need to put the obstacles information into an array or Type construnct to make it accessible by the A-Star Algorithm. I would do this with a Linepick System that would detect any obstacles.

Then you would have to implement the A-Star Algorithm in a way that allows to apply the resutlting route to the character.

Here's some A-Star code:

http://www.blitzcoder.com/cgi-bin/showcase/showcase_showentry.pl?id=turtle177604062002002208&comments=no

http://www.blitzcoder.com/cgi-bin/showcase/showcase_showentry.pl?id=morduun12202002081940&comments=no

http://geocities.com/joepitto/RpgRealm.html

http://www.blitzcoder.com/cgi-bin/showcase/showcase_showentry.pl?id=suremapper02182005162911&comments=no

But: Implementing the thing you want is not easy, so don't underestimate it. If you are not familar with Blitz3Ds commands and their usage, first learn them. If you don't know how to use Linepicks to create an array of obstacles, then you need to learn the basics first.