Questions about Chimpmunk Physics + Platform Games

Official forum for the Chipmunk2D Physics Library.
Post Reply
Alec
Posts: 1
Joined: Mon May 12, 2008 8:38 pm
Contact:

Questions about Chimpmunk Physics + Platform Games

Post by Alec »

Hi all! My brother and I were messing around trying to make a game using chimpmunk physics. We ran into a few problems and we'd greatly appreciate it if you folks had any suggestions about ways to get around them.

Basically we wanted to make a type of "platform game" that allows the player to move around (essentially slide along the ground), come to a rest and be able to stick to surfaces.

We started out with the player being a circle, but quickly discovered that circles roll down slopes very easily. Rectangles also seem to roll fairly easily. I noticed that changing the mass on the moment of inertia made things roll less, but also made them hard to move. (they move by rolling so far) The only place simple left and right movement works is on a totally flat, level surface.

I realize this may be using the physics engine in a way it wasn't really intended, and therefore it might be really difficult to get simple platform movement to work. (another option is to use some kind of hybrid solution, but I imagine that comes with its own problems)
maximile
Posts: 157
Joined: Mon Aug 20, 2007 12:53 pm
Location: London, UK
Contact:

Re: Questions about Chimpmunk Physics + Platform Games

Post by maximile »

The method that usually gets recommended is to have something like a square, and then use the surface velocity property to move it around.
Michael Buckley
Posts: 46
Joined: Tue Aug 21, 2007 10:30 am
Contact:

Re: Questions about Chimpmunk Physics + Platform Games

Post by Michael Buckley »

I've gotten a simple platformer demo to work by setting the angular mass for each object to INFINITY, and then applying a large force to get them to move. The only drawback is that the things will never roll.

EDIT: Must not post early in the morning.
Post Reply

Who is online

Users browsing this forum: No registered users and 19 guests