Collision Detection

279 views
Skip to first unread message

Cameron Heikkinen

unread,
Oct 15, 2012, 11:15:29 AM10/15/12
to fla...@googlegroups.com
Is there anyway to do simple collision detection between two objects with Flambe?

Bruno Garcia

unread,
Oct 15, 2012, 3:04:40 PM10/15/12
to fla...@googlegroups.com
Afraid not, you'll have to work out the math yourself. If your objects
don't rotate it should be fairly simple.

Bruno

Paul Hastings

unread,
Feb 21, 2015, 3:32:47 PM2/21/15
to fla...@googlegroups.com, b...@aduros.com
Since this thread is a little old I'm wondering if there has been any updates to Flambe that include collision detection(something like colide() seen in other frameworks)?  If not is there a preferred method people use.

Anyone have experience with this?(https://github.com/underscorediscovery/hxcollision)

or one of these methods(https://www.youtube.com/watch?v=nqnb5173fww)

?

Lazer Starr

unread,
Feb 22, 2015, 1:48:10 PM2/22/15
to fla...@googlegroups.com, b...@aduros.com
There is a simple collision detection embedded in the shmup example. It´s based on radiuses of objects.
I guess you could use the libs you mentioned.
You could also use Nape (physics engine) which also has collision detection of course.
Would probably not make much sense if you don´t want to use physics, though ;)

What to use depends pretty much on what objects you have and how accurate the detection has to be.

Kipp Ashford

unread,
Feb 24, 2015, 11:47:02 AM2/24/15
to fla...@googlegroups.com, b...@aduros.com
Hi Paul,
We use hxcollision in most of our projects if we don't need a full physics engine like Nape. If you have many (close to 30) objects moving and scaling, you'll run into a performance hit pretty quick. I would also reccomend that you stick to polygon -> polygon collisions or circle -> circle collisions and not mix the two because of the extra math involved. It does work great out of the box and when I get some time I'll contribute my performance optimizations back to hxcollision.
-Kipp
Reply all
Reply to author
Forward
0 new messages