Advertisement

Techniques of dodging/path planning

Started by September 16, 2006 03:45 AM
14 comments, last by Nice Coder 18 years, 4 months ago
Hi, If I have an infrastructure in the scene, there are poles and racking systems and many others, how do I ensure that say the worker won't walk into the poles and stuff like that? Thanks a lot Jack
hmm... Wrong forum I think - I'll punt this over to AI for you [smile]

You'll need to be more specific about what information you have - solving these problems is usually much simpler once you clearly and precisely define the problem space.

At a guess, some sort of graph based approach might be sufficient. If you can pre-process your scene to generate a graph of where workers can/can't move then you're most of the way there. You can add one of the many path-finding algorithms (e.g. A*) on top of that in order to get your workers to move around obstacles accordingly.

hth
Jack

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

Advertisement
If the obstacles are small enough when compared to the free space around them,
you can ignore them in the pathfinding, then use simple collision-avoidance behavior when following the path.
Quote:
Original post by Anonymous Poster
Yep, that's because: Problem's imply Solutions.
given problem X
solution = !X
Add this to FAQ?


I think you meant to say something like:
given problem X and constraints C, find a solution X-1 such that
X-1X=C

Of course, that would only be possible for a very limited class of problems. ;)
Off topic:

I don't think that fits in the FAQ [rolleyes].
Solutions imply problems (it's not a solution if it doesn't solve a problem), but problems don't necessarily imply solutions. Cold fusion is a problem, but there aren't and will be no solutions... Unless some major revelations come out.
Also, the solution to a problem isn't simply 'not the problem'. Given a question, anybody can negate it, but not everybody can solve it. It's much closer to what Timkin said.

On Topic:

Some form of collision detection is necessary for this. The simplest, but most CPU-intensive method would be determining mesh intersections. Usually some constraints can be laid out so that the collisions can be projected to fewer dimensions. In this case, a new way of representing the environment would be useful. Tell us more if you're still around.

Regards
Admiral
Ring3 Circus - Diary of a programmer, journal of a hacker.
Do the structures exist before the game runs, or are they dynamically placed by the user?

-me
Advertisement
Thanks to everyone for the inputs.
For now, I just searching google for 3d pathfinding
I only got pathengine from the results which is commercial
It doesn't seem to be a corresponding source found in the open source community
Thanks
Jack
Steering behaviours help with small obstacles. I believe there is an OpenSteer library available for you.
if you want path finding then try the A* algorithm.
if you want a demo of it go to www.gametutorials.com and it's in one of their windows examples.

However, if you want a cheap n cheerful path finding then try my own very special brand:


at way point 1. Want to go to way point z.
get yaw required from pt1 to ptz. Choose the waypoint connected to pt1 that is closest to this yaw - call this pt2. Go to this pt2.
Then repeat the above:
get yaw required from pt2 to ptz. Choose the waypoint connected to pt2 that is closest to this yaw (but don't choose pt 1 unless there are no other connections)- call this pt3
Then repeat the above:
get yaw required from pt3 to ptz. Choose the waypoint connected to pt3 that is closest to this yaw (but don't choose pt 2 unless there are no other connections)- call this pt4
repeat until you get to point z.


By the way - this is efficient but not too good when there are dead ends.


cheers

Dear,
Seems good. But I am worrying about the load of the GPU.
Because I have a fair bit of objects to implmement at the same time
Can your approach apply to multi-objects scenrio?
Thanks
Jack

This topic is closed to new replies.

Advertisement