• Register
Post news RSS Nikki's "Realistic" Movement Physics (Chipmunk)

A comment on how we handle movement physics in Nikki and the Robots.

Posted by on

Nikki's Chipmunk Bounding Boxes

We were recently asked by James Harriman how we handled movement physics in Nikki and the Robots.

James Harriman:I wondered how you handled the movement of Nikki in your game. Did you make him/her a kinematic body and allow her to be pushed by certain objects? Or is she a dynamic rigid body with enough constraints to keep her from bouncing around?

Sönke, main programmer of Nikki and the Robots:Well, I am kind of an autodidact when it comes to physics engines so I am not to sure about the terminology. What's the difference between a kinematic and a dynamic rigid body?

But to give some overview: Nikki is just a normal physics object in the scene and interacts with the other objects much like every other object.

The Nikki object does not change its shape. To ensure that Nikki does not rotate, the rotational mass is set to infinity. Controlling of Nikki works through applying forces (or -- in case of jumping -- a momentum) on the object. We consciously refrained from manipulating the velocity or position directly. We hope that Nikki's movements integrate better with the physics and feel much more natural that way. Also, it helps to prevent weird behavior in the physics scene. The downside of this is that you don't have full control over Nikki's movements, i. e. you cannot work with traditional animations.

Generally, this was one of the more challenging things that we programmed for our game. Working on this also really changed my perception of other platformers. In most other platformers, the movements of the protagonist are animated and don't feel really physically natural. Well, at least if you spent some months trying to do it differently. ;)

Please feel free to let us know about what implementations of movement physics you have worked with and which you prefer!

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.