#### Archived

This topic is now archived and is closed to further replies.

This topic is 5799 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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.

##### Share on other sites
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

##### Share on other sites
You could try a priority queue to find which "tile" is the most favorable

##### Share on other sites
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.

##### Share on other sites
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)

##### Share on other sites
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."

##### Share on other sites
Someone told me the Dijkstra is a good one to use. I''m wanting to look for a tutorial on how to implement, but I can''t find anything good. Also, I''d like to use automatic-node creation, however I do that. Because I don''t want the game maker to figure it out. Thanks

1. 1
Rutin
44
2. 2
3. 3
4. 4
5. 5

• 11
• 9
• 12
• 10
• 13
• ### Forum Statistics

• Total Topics
632983
• Total Posts
3009714
• ### Who's Online (See full list)

There are no registered users currently online

×