#### Archived

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

# Pathfinding

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

## Recommended Posts

Does anyone have a web page, or source of a simpel pathfinding demo, say to have models walk around in a bsp level. well, not even worried bout the bsp level part, just walking randomly i guess. just how it is set up and such thanks much Code makes the man

##### Share on other sites
You haven''t looked at the resource section, have you ?

##### Share on other sites
check out my engine

www.geocities.com/scene3d (click on "demo program" then "files")

www.geocities.com/bpj1138/shortest_path.html

--bart

##### Share on other sites
One night I was thinking about it, and it really is very very simple. Although a* may be faster, you should be able to do just about any pathfinding you want by writing an algorithm to do something like this:
a) draw a line (not on the screen, obviously!) from your charachter to target, ignoring all obstacles to getr the shortest route to target.
b) for all the obstacles, move to the closest vacant tile to your target.

Am I missing something? I just cant see how this could fail, and why pathfinding is hyped up as so hard and complicated.

##### Share on other sites
droplet, you are so, so wrong.

let me show you an example where your system
doesnt work.

0 0 0 0 0 0 0 0
0 X - - 0 - Y 0
0 - - - 0 - - 0
0 - - 0 0 - - 0
0 - - - - - - 0
0 0 0 0 0 0 0 0

X - starting point
Y - Ending point
0 - block tile
- - passable tile

you said that each step where you cant go straight
in the line you drew (X->Y) you go to the next closest
vacant "tile" to the target.

then cause youre blocked youll go down, cause its the closest,
and then up, cause its the closest? then down, up, down...

also, your solution didnt give the best path, if its not stuck
by an example ive demostrated or any other like that.

pathfinding process should be quick enough so that everytime
that you click on a target, you comp wont stall for more that
number of miliseconds or else the user will get aggrevated.

Gil

Gil Zussman
gil@gilzu.com
http://www.gilzu.com

1. 1
Rutin
24
2. 2
3. 3
JoeJ
18
4. 4
5. 5

• 13
• 38
• 23
• 13
• 13
• ### Forum Statistics

• Total Topics
631714
• Total Posts
3001861
×