Adventure game pathfinding.
I''m going to be making an adventure game engine soon here. To define where a player can and cannot walk will be determined by an image imported. It will be an image with pure white being impassable. (You''d just draw over the original image with pure white and import it. So now I have this 320x240 array of pixels that can or cannot be walked on. I want a believable pathfinding algorithm that will help me move the character from one point to another, pixel perfect, or as close as you can get.
Ps, what I mean by believable is I don''t want them to hug the wall just because that''s the "fastest" route if you know what I mean.
Someone wise once told me this:
"If you ever fall of the sears tower, just go real limp and someone might think you are a dummy and save you cause, hey, free dummy.
When determining the path, take into account both the distance to the target and the distance from a wall/obstruction in the huristic and play with it until it looks right.
karg
karg
You could try a priority queue to find which "tile" is the most favorable
The nightmare travels across the cosmos with his burning mane. The trail of ash that is produced.
?Have a nice day!?
December 02, 2002 10:55 PM
Someone wise once told me this:
"If you ever fall of the sears tower, just go real limp and someone might think you are a dummy and save you cause, hey, free dummy.
Is that from Jack Handy. It sounds like one from the ''Deep Thoughts'' series.
"If you ever fall of the sears tower, just go real limp and someone might think you are a dummy and save you cause, hey, free dummy.
Is that from Jack Handy. It sounds like one from the ''Deep Thoughts'' series.
read some book about graphs and algorithms ... there should be described how to generate a graph and finding the shortest way in it.
[ps]
graph= a number of corners + connections between them (optional: + values for each corner or point)
[ps]
graph= a number of corners + connections between them (optional: + values for each corner or point)
---- sig coming soon
I was more goin for.. an algorithm that would work well. Thanks!
Someone wise once told me this:
"In theory, there''s no difference between practice and theory. But in practice there is."
Someone wise once told me this:
"In theory, there''s no difference between practice and theory. But in practice there is."
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement