Could anyone tell me how I could set up a cocos2d-x 3.x project with Box2D? I want to try it out on a new project and see which one works better for me.
In 3.8 (I don’t know for older version) creating a new projects add automatically cocos2d-x at the solution (for MSVC project) for android make sure you have a line : LOCAL_WHOLE_STATIC_LIBRARIES += box2d_static in the Android.mk file in the jni directory.
In the programming side, I use box2d with my own implementation, I have a PhyObject than have a cocos2d::Sprite and a b2Body, you to apply transformation of b2Body for the corresponding Sprite on each update and you’re done. You’ll have to create a b2World instance by the way. If you’re familiar with box2d, it will be very easy to do it.
Try to read this tutorial it will help you get an idea :
http://www.cocos2d-x.org/wiki/Box2D
Okay thanks for the info, but do you also know how to set up Box2D for iOS?
No but I think the process is the same, in XCode project add the include path to box2d and link to the box2d lib file (.a or .so extension I think, not sure).