Hi all, new to LOVE and Lua, looking to start some cool gaming projects.
Before I start, can anybody tell me what algorithms LOVE uses for collision detection? and how about performance?
This has always been the major roadblock when I have worked on previous projects, so I want to get this information up-front.
Cheers,
Caleb
Collision detection performance
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Collision detection performance
Hubo is currently writing a blog about how to make a physics engine, which of course covers collision detection and handling.
Link: http://hugobdesigner.blogspot.com.br/20 ... ngine.html
For performane it's best to try and optimize the collision detection as much as possible, and try to not have it even try to detect it if it's not possible.
Link: http://hugobdesigner.blogspot.com.br/20 ... ngine.html
For performane it's best to try and optimize the collision detection as much as possible, and try to not have it even try to detect it if it's not possible.
-
- Prole
- Posts: 2
- Joined: Wed Oct 22, 2014 6:10 pm
Re: Collision detection performance
Thanks for the link!
But did I misinterpret what functionality LOVE has? I understand it implements collision callbacks, but it must be using some algorithm for deciding which entities to check against each other for possible collision?
EDIT: If someone could point me to the code that implements the above, I could definitely do a complexity analysis myself.
Cheers
But did I misinterpret what functionality LOVE has? I understand it implements collision callbacks, but it must be using some algorithm for deciding which entities to check against each other for possible collision?
EDIT: If someone could point me to the code that implements the above, I could definitely do a complexity analysis myself.
Cheers
Re: Collision detection performance
The physics module in Love is Box2D: http://box2d.org/
Box2D uses space partitioning to reduce the number of collision checks.
I'm not sure but you can set collision filters which MIGHT improve performance a little bit.
For example you can set collision filters that will ignore collisions between bullets in your game.
Box2D uses space partitioning to reduce the number of collision checks.
I'm not sure but you can set collision filters which MIGHT improve performance a little bit.
For example you can set collision filters that will ignore collisions between bullets in your game.
Re: Collision detection performance
LOVE has the love.physics module, which implements Box2d. This module can be used for collision detection. However, if you are going for a really simple game, then you should rather implement collision detection yourself or use one of the libraries made by community members (HardonCollider and bump). These libraries have less overhead and can be expected to be faster, if they fit your needs.
Check out my blog on gamedev
Who is online
Users browsing this forum: Google [Bot] and 6 guests