Collision Avoidance / Steering behaviors plans

0 favourites
  • 3 posts
  • Hello,

    Ashley

    Are there any plans for collision avoidance/steering behaviors officially? May be in C3? Pathfinding is ok for some of the cases, but not when you need fluid organic motion behaviors of single/multiple entities.

    Something similar to algorithms described in this articles:

    http://buildnewgames.com/vector-field-c ... avoidance/

    https://andrewfray.wordpress.com/2013/0 ... -to-share/

  • This is the kind of thing you could probably write a PhD on. I've tried this a couple of times in other projects, and it feels like a semi-impossible problem.

    The real difficulty is not so much in the collision avoidance - it's relatively straightforward to come up with some mechanisms to either make objects steer around each other, or plot paths that are less likely to overlap other object's paths. The real problems start when inevitably something unpredictable happens and everything queues up in to a traffic jam. Then you need algorithms that can unpick the traffic jam without getting other objects stuck or making things worse - while all the time other stuff is happening around it. This is super difficult to do without making objects either get permanently stuck somewhere, or end up with ridiculous results like a line of 10 objects waiting for 1 object to get out the way, but that object is waiting for another object to get out the way, which is waiting for one of the 10 objects to get out of the way, so nothing ever moves even though any one of them could break it by doing something "wrong" like steering away from their destination.

    Then when you throw in various types of movements like: can objects pivot while stopped or must they accelerate? Can they reverse? How fast is their acceleration? Are the objects using box or circle collision masks? All of this has a huge impact on the way these algorithms work out.

    So I'm pretty doubtful this is something where we can feasibly build a reasonably general-purpose solution.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Ashley

    Yes, I understand the problem - there's no clear solution to this, e.g. something like pathfinding, but for collision avoidance. I was able to achieve some "interesting" results with simple vector math and forces, but it only works for objects of regular shapes like squares, circles, triangles and they stuck in corners, don't que, and so on.

    https://www.dropbox.com/s/wl1hdnub24kqtyx/col_avoid.capx?dl=0

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)