a super fast AABB collision detection ( Minkowski Sums )

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
User avatar
D0NM
Party member
Posts: 245
Joined: Mon Feb 08, 2016 10:35 am
Location: Zabuyaki
Contact:

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

Post by D0NM » Fri Sep 20, 2019 8:08 pm

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:
Our LÖVE Gamedev blog Zabuyaki (an open source retro beat 'em up game). Twitter: @Zabuyaki.
:joker: LÖVE & Lua Video Lessons in Russian / Видео уроки по LÖVE и Lua :joker:

User avatar
pgimeno
Party member
Posts: 2484
Joined: Sun Oct 18, 2015 2:58 pm

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

Post by pgimeno » Fri Sep 20, 2019 11:05 pm

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

User avatar
D0NM
Party member
Posts: 245
Joined: Mon Feb 08, 2016 10:35 am
Location: Zabuyaki
Contact:

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

Post by D0NM » Wed Sep 25, 2019 9:56 am

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!!!
Our LÖVE Gamedev blog Zabuyaki (an open source retro beat 'em up game). Twitter: @Zabuyaki.
:joker: LÖVE & Lua Video Lessons in Russian / Видео уроки по LÖVE и Lua :joker:

MrFariator
Party member
Posts: 216
Joined: Wed Oct 05, 2016 11:53 am

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

Post by MrFariator » Thu Sep 26, 2019 1:53 pm

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 53 guests