Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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

1 Answer 1

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

 
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.