Tell me more ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm building a simple OpenGL game and I was looking for some simple collision detection library for objects like squares, triangles and circles. Any suggestions?

PS: Preferably a library that is very well documented and provide examples of 2D collision detections.

share|improve this question

2 Answers

up vote 4 down vote accepted

Box2D is very popular and well documented with lots of examples. Of course it's a full on physics library so it'll give you a good amount of flexibility for expanding later if you want. But you don't need to use those features if you don't want them.

For learning more about the algorithms and how to implement them yourself you can check this out.

Additionally this is a nice resource for showing how to detect intersections between various shapes. Which plays an important role in collision detection.

share|improve this answer

I think box2d is best 2d physic engine. Which can easily provide collision detection.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.