🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

"Pathfinding" in adventuregames

Started by
1 comment, last by GameDev.net 24 years, 6 months ago
__When you wrote "point to point line funtion" a wonderful idea dawned on me. Actually two:
__First, you could pre-make a series of "waypoints" (WPs) and describe lines that would logically connect them.
Example: You enter a cave with two other exits so that the shape of the path is a "Y". Obviously you can't walk through the cave wall to either exit. Instead there would be four WPs. One for each exit and a third at the center of the "Y".
Each exit point would have only one path, to the center. The center point would have three points, one for each exit. Simply have the character follow the paths, at each point, by determining which ones bring it closer to where the player clicked.
__Second, you could have the computer analyze the terrain as a series of decision trees at each major junction of paths. This would require the program to be able to recognize what a path is and would be substantially harder to program. (They probably have a whole semester course on this at M.I.T.) The advantage is that courses wouldn't have to be pre-made and could prevent the character from midlessly triggering an event that the player didn't intend to.
__Personally I'd go with the previous; it will require more time in level design, but the time saved in programming would more than make up for it.

[This message has been edited by SonicSilcion (edited December 31, 1999).]

Advertisement
Hi there !
I'm writing an adventure in the old Lucas Arts Style but :
How is the "pathfinding" done in such games (like "The Dig")? At the moment I am using an simple "point to point line function" that the character works along. But with that I can't uses more complex environments.
Anybody ever made an adventure or other tips ?

[This message has been edited by Open (edited December 31, 1999).]

A while ago, I read a solution that seems good - haven't tried it myself though.

You split the screen up into 'bounding' rectangles. They can be various sizes, big enough to cover walkable areas.

Now, setup a table that says how to get from one 'bounding' area to another. For instance, to get from area A to area D, you'd have to first go from A to B, then B to D.

Just use standard pathfinding inside an area to get to the next area, then process the new area to get to the target area.

If you split the screen up into enough 'bounding' areas, then the pathfinding part is very minimal.

Jim Adams

This topic is closed to new replies.

Advertisement