Cocos2D: Recognize multiple tiles next to each other

78 views Asked by At

I'm currently building a platformer in cocos2d-x and therefore i'm using a tmxtiledmap and chipmunk physics. My problem is that in the moment EACH tile of the map gets its own physics body which obviously isnt really memory saving:D Is there any method to "recognize" that multiple tiles are next to each other and therefore only need one physics body?

Greets FreezZl

1

There are 1 answers

2
TheDevilsFire On

How are you creating the physics bodies?I dont use chipmunk, but had used box2d with Tiled and created a single Physics body for each platform by assigning an object to the whole platform in tiled and using that to create the physics body.