Platformer Physics

Hi everyone

So I have been making a small platform game with Box2D in C# using the Farseer wrapper. Its going quite well, and to do maps I am using a tile based version, which I am loading from a small image file and then creating static rectangular bodies for each pixel of a certain colour. It works well.

However when my player moves over them there are a couple of issues. Using a rectangular collider, the player gets snagged on the tiles. After researching the issue, I tried out a capsule collider, which when moving over the tiles seemed to "bob" very irregularly.

I am not sure quite how I would go about merging two touching bodies into one and then still drawing them individually.

Anyhelp is greatly appreciated.
You can solve this problem with edge shapes. What I did is generate edge shapes for all edges of tiles that were next to open tiles, creating an outline of edges. Then I did a query on every edge point to find the other edge and connect them together. Little tricky, check the box2d manual for more details.

To see a 48 game contest game in action using this method, try this out:

http://www.wolverinesoft.org/game/207/wraith-dungeon

Need an analog joystick to play.

Original thread: https://box2d.org/forum/viewtopic.php?t=8234