GB2ShapeCache for cocos2d-x-2.0

GB2ShapeCache for cocos2d-x-2.0
0.0 0


Hi All,

I have updated the GB2ShapeCache reader class to work with the newest branch of cocos2d-x, 2.0. The class is designed to load the .plist file generated by PhysicsEditor, the tool designed by Andreas Loew (found at: The .plist file allows you to create the Box2D shapes in PhysicsEditor and attach them to your object with the code below.

This update handles the deprecation of CCMutableDictionary and CCMutableArray. Check out the project page on my site for download or links to the source on github:

A quick summary of how to use:

Add the shapes into the ShapeCache:

GB2ShapeCache::sharedGB2ShapeCache()->addShapesWithFile((name + ".plist").c_str());

Load shape from shapename and add to Box2D body:

GB2ShapeCache *shapeCache = GB2ShapeCache::sharedGB2ShapeCache(); shapeCache->addFixturesToBody(_body, shapeName->getCString());

You can also find the source here on GitHub:

-Chris Hannon


Chris Hannon,

You’ve done a great work!
Unfortunately this doesn’t apply for Chipmunk or Does it? If it does please point me to a link with example? Thanks in advance! I’m following this thread as well.


hey buddy i am not able to download ur code.