🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Source code for collision avoidance?

Started by
1 comment, last by ApochPiQ 13 years ago
Hello,
Basically, I've my pathfinding code implemented. The problem however is to have multiple objects doing that simultaneously in the scene. Everybody is tunneling through each other. I don't need very fancy techniques, just a simple one with collision avoidance is enough. Could anyone please show me a place for source code I can take a look at? On the other hand, I am interested in other state-of-the-art techniques in use today. Just want to have a look. What other web sites have this kind of info?
Thanks
Jack
Advertisement
Well pathfinding is great to find out how to get from point A to point B, however, it does not automatically evaluate moving objects, it can be made to though.

What you need to keep in mind in this case is that the initial path found is the static path, while you are traveling that path you may want to either perform shorter path finds to avoid moving obstacles or check if the next step is free before you advance towards it.
My approach would be a combination of both, do a full path find to find the static path, perform a collision test on close future positions to detect if a new moving obstacle has occupied them and in a positive case, perform a short range pathfind to figure out how to skip that obstacle and return to your originally planned path.


Game making is godlike

LinkedIn profile: http://ar.linkedin.com/pub/andres-ricardo-chamarra/2a/28a/272


Path planning (aka pathfinding) and path execution are separate problems.

Solving the latter generally involves steering behaviours. The Craig Reynolds paper is pretty much the gold standard reference on the subject.

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

This topic is closed to new replies.

Advertisement