Advertisement

Techniques of dodging/path planning

Started by September 16, 2006 03:45 AM
14 comments, last by Nice Coder 18 years, 2 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 jollyjeffers
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.


Yep, that's because: Problem's imply Solutions.
given problem X
solution = !X
Add this to FAQ?
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.
Advertisement
Do the structures exist before the game runs, or are they dynamically placed by the user?

-me
OFF Topic

Quote: Original post by Timkin
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. ;)


Ok, you've got a good point there.
Even so, I think that a large portion of those limited classes of problems, tend to be the kind that (forgive the term) newbies ask a lot of. Hence the merit of adding it to a faq.

for example: 'I'm building a terrain with a vehicle driving across it but it keeps falling through the floor, what do I do?'(real past example)

answer: Program it to NOT go thorough the floor. (It's blunt, and rude, but it's also very true, a simple 'if below floor, then go above floor', totally suffices and follows directly from the advice)

I think it's really a question of confidence, too many people with problems like this forget that They are the Programmer, and don't take the time to think about what solutions their problem might imply...


Sorry for the OffTopic
but if you look at what I said and clean it up to be less arrogant and rude it *might* have a valid point to be remembered
END
ON Topic

Are all your obstacles convex? -no dents or 'pockets' that your character might walk into and get trapped?

If everything's convex you can just get away with walking right into stuff and sliding around to one side.

To make it look less 'dumb' you can even make those obstacles invisibly larger and slide around that invisible border instead, so it looks like an intelligent early avoidance.
OFF TOPIC

TheAdmiral, what about muon catlzed fusion.....
lol i know thats not what u were refering to.

This topic is closed to new replies.

Advertisement