Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I've been reading some literature that explains both separation and obstacle avoidance. On first sight, they both seem very similar in what they are supposed to do: keeping objects apart form each other. If that is the case, why would I need to have both behaviors? Is separation sort of wrapping obstacle avoidance, and adding to it?

share|improve this question
    
I'm not familiar with the terms "separation" and "obstacle avoidance" as they're being used here - could you edit the question to elaborate on how they're defined in the books you're looking at? –  Nathan Reed Nov 17 '11 at 20:57
2  
You should really work on your acceptance rate. –  Trevor Powell Nov 17 '11 at 23:11
    
I'd like to know what literature you read that had this. If it's what I think it is, then it may be talking about separation with regards to flocking which is a slightly different thing than Jonathan's answer. –  Ray Dey Nov 18 '11 at 13:20
    
I would have thought it referred to the canonical source: red3d.com/cwr/steer –  Kylotan Nov 18 '11 at 14:02
    
@Kylotan That's what I thought, where separation is essentially the same as obstacle avoidance, just the obstacles are your local flockmates. Jonathan's answer to me seems like collision resolution rather than "steer to avoid crowding local flockmates". –  Ray Dey Nov 19 '11 at 18:06
add comment

1 Answer 1

up vote 7 down vote accepted

Avoidance

This makes an object avoid obstacles that may be hindering it while it navigates to a goal. Perfect avoidance would never allow objects to overlap.

Separation

This deals with the situation when avoidance fails to keep objects apart. This often occurs 'between frames': an object can move into a new position that overlaps other objects because the precise time of collision happened between the last frame and the current one (or some other condition such as momentum). Separation will seek to move the object so that it no longer collides.

Are They The Same Thing?

They are not really the same, but they are related - in a system which contains both separation is only there because avoidance would need to multisample (and hence impact performance) to avoid collisions between frames. Thus, we simply allow the overlap to occur from the perspective of avoidance and IMMEDIATELY resolve it using separation.

Note that separation can exist alone in a system: for example when the movement of an object is controlled by physics and not by AI. I do not think the inverse (avoidance alone) would be found alone in any serious implementation.

share|improve this answer
1  
Drats. I answered before I noticed his accept rate. –  Jonathan Dickinson Nov 17 '11 at 22:31
    
I will work on the accept rate, I promise –  user802232 Nov 18 '11 at 5:43
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.