by ViktorS » Wed Dec 26, 2012 2:40 am
I didn't really play the game, but from screenshots - it's a simple platformer. So:
1) Box2d - yes, I would definetly recommend using it.
2) Simple(one fixture) single body for character. Simple single bodies for enemies. Single complex(multi-fixture) body for ground. Character and enemy bodies are dynamic ground is static. Character and enemy bodies should be set to fixed rotation, so they don't turn. For more controll over character movement I suggest setting linear damping to 0. Not necessary, but easier to calculate jumps and such.
3) Set(or Apply) linear velocity. To move or jump. Linear velocity is set by 2 values x and y. For simple movement set x to predefined value and 0 y, for jumps set both to some value. Also I found it easier to change friction to 0 when moving and then change it to 100(or any other suitable value) when stopping. This makes it harder to manage, but again, easier to calculate precise movement.
P.S. making single-fixture single body for character and enemies is easier, but not always the best decision, if you find the behaviour not suitable try reading on some peoples sugestions for better multi-fixture bodies. I personaly like the idea of capsule like body it is guaranteed not to get stuck on edges.(Especially with friction set to 0)
Enjoy