|
problems with collision algorithm |
Loki66
Member #17,089
May 2019
|
Hi everybody |
Edgar Reynaldo
Major Reynaldo
May 2007
|
I will try your program when I get time. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Elias
Member #358
May 2000
|
The easiest way to do this may be to use a third-party library like Chipmunk or Box2D. They are completely free to use like Allegro and already solve this (surprisingly involving) problem - and they likely solve it in a way that's way more performant than what any of us could come up with from scratch (you can have 1000ds of circles collide with no problem at all). They also provide a lot more things but you can just ignore those (that's how I used Chipmunk before myself, just circle-circle and circle-line collision). You can also read their source code and just steal the algorithm - the license allows it -- |
|