Page 2 of 2

Re: a super fast AABB collision detection ( Minkowski Sums )

Posted: Fri Sep 20, 2019 8:08 pm
by D0NM
ivan wrote: Thu Sep 19, 2019 6:21 am
I'm migrating from the Bump and HC collision detection libs. (they are a bottle neck in my project. they take ~40% of CPU)
Physics and collisions are almost never a bottleneck in my games, 99% of the time it's love.draw or when I'm blatantly misusing another library.
:megagrin:
I use some Pie Profiler... I suppose it might alter the real results.
Also the profiler uses love2 GFX extensively.
I might misused the brilliant libs Bump and HC which I personally recommend to everyone.

My main problem that our project needed a 3D collision detection. So I had to add extra checks for another dimension.
Now I made some funcs to check all collisions of combinations of dimensions I need.
Our game has not much entities. I even split enemy batches. So the simple approach looks more clean and
the main thing:
It doesn't use extra RAM and GC calls.
ivan wrote: Thu Sep 19, 2019 6:21 am That's why I use and recommend Box2D aka love.physics.
I wish I started with Box2D. :cool:

Re: a super fast AABB collision detection ( Minkowski Sums )

Posted: Fri Sep 20, 2019 11:05 pm
by pgimeno
D0NM wrote: Fri Sep 20, 2019 8:08 pm My main problem that our project needed a 3D collision detection. So I had to add extra checks for another dimension.
Now I made some funcs to check all collisions of combinations of dimensions I need.
Our game has not much entities. I even split enemy batches. So the simple approach looks more clean and
the main thing:
It doesn't use extra RAM and GC calls.
Sounds like you might benefit from this project:

https://github.com/oniietzschan/bump-3dpd

It's a fork of bump, prepared to work with 3D. There is also a 2d branch: https://github.com/oniietzschan/bump-3dpd/tree/2d with reduced memory consumption and garbage generation with respect to original bump, judging by this partial list of commits: https://github.com/oniietzschan/bump-3d ... a4de05c4ff

Re: a super fast AABB collision detection ( Minkowski Sums )

Posted: Wed Sep 25, 2019 9:56 am
by D0NM
pgimeno wrote: Fri Sep 20, 2019 11:05 pm Sounds like you might benefit from this project:

https://github.com/oniietzschan/bump-3dpd

It's a fork of bump, prepared to work with 3D. There is also a 2d branch: https://github.com/oniietzschan/bump-3dpd/tree/2d with reduced memory consumption and garbage generation with respect to original bump, judging by this partial list of commits: https://github.com/oniietzschan/bump-3d ... a4de05c4ff
Thank you very much for a nice find!!!

Re: a super fast AABB collision detection ( Minkowski Sums )

Posted: Thu Sep 26, 2019 1:53 pm
by MrFariator
I can vouch for the reduced memory footprint and garbage generation with oniietzschan's edits. My game doesn't have a huge number of physical objects, but the smaller memory footprint was immediately noticeable from minor testing when I took his changes few months ago.