Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am currently doing some work in cocos2d-x and am thinking about using their box2d implementation for things like collision detection (but not necessarily response), range detection, and other things like that, which are not strictly physics based.

Is it worth doing this? or would I be better off just writing a simple system that does checks based on location/size of my objects?

share|improve this question

Seems like a decent idea to me; I've done a very similar thing in a few projects (although with different APIs).

If functionality and performance is acceptable, and it saves you from having to write all that boring collision detection code and focus instead on something that makes your game unique and cool, then I'd say go for it.

share|improve this answer
I would probably agree, only it may help you in the long run to implement the detection yourself. If your needs as simple as range detection, sphere collision and AABB's it may be worth the extra day of development. Plus, even if you use Box2D afterwards, you may have a better understanding of how it works. If you need complex detection and compount colliders though, I'd go for Box2D. – Jonathan Connell Jun 17 '11 at 8:25

Your Answer


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.