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.

Is there a high level wrapper around Box2D out there?

I know that the library isn't exactly very low level as-is, but in my opinion some things in the library could be made more intuitive at the cost of a little bit of performance. For example, instead of creating a body, a shape and a fixture to join them together, the same could be done with a wrapper class that works somewhat like this:

b2foo::Box2DObject obj = b2foo::CreateBox2DDefaultRectangle(position,width,height,world);

Managing joints, user-specific collision callback, more than one b2World and bodies transitioning between them (for really big worlds), scaling between pixel-world coordinates and box2d coordinates, and other stuff could probably be made more simplified and intuitive in a similar manner.

Does such a wrapper around Box2D exist for C++?

share|improve this question
3  
Generally this is the level of abstraction you might handle in your own application, as the "typical" usage varies greatly between users. – Daniel Dec 15 '11 at 20:19
1  
Yeah, I generally keep track of what I find myself repeating a lot and just start refactoring it into it's own file like Box2DUtils.[ch]pp, which I can reuse any place I'm working with Box2D in my game. – Alex Ames Dec 15 '11 at 20:29

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.