Chipmunk Autogeometry in Cocos2d-x for tilemap

Hey,

I’m creating a game based on a tilemap where you can dig down (imagine like minecraft in 2D). I’m using the built in physics to simulate gravity. Here comes the age old question about physics and 2D games. How do I create a physics body based on my tilemap. I can’t just create a new physics box for every single tile. I want to find the edges and draw a polygon around my tilemap, which is recalculated everytime I make a step.

I read that the physics engine is based on Chipmunk. I found a tutorial on their webpage how to use the autogenerate feature. However, I can’t find anything similar to the sampler in Cocos2d-x V3:

ChipmunkBlockSampler *sampler = [[ChipmunkBlockSampler alloc] initWithBlock:^(cpVect point){...

The only thing I found which comes close is the Auto Polygon from an image file…

Is there a way to use the autogeometry feature solely with the cocos implementation of the chipmunk engine?

Hello,
AFAIK you can’t use auto-geometry feature of chipmunk with current implementation of engine, Auto-geometry feature is implemented in chipmunk 7.0, whose bindings are still missing in the engine, there was a pull request for the same but its been postponed till 3.11