I'm having a few problems with my game. The physics are great, but could be more playable. It's kind of hard to explain, so here is release 0.0.000001 of Stack (name not final:)): .
See below for the problems.
Instructions: try to stack to falling shapes. Right now there are three.
Small Square (mass 5)
Big Square (mass 10)
Triangle (mass 7.5)
(Paddle mass is infinite)
Mouse - Move the paddle
Q - Gravity -5 W - Gravity +5
A - Friction -0.01 S - Friction +0.01
Z - Elasticity -0.01 X - Elasticity +0.01 (probably won't need to change this)
The defaults for gravity, friction and elasticity respectively are 200, 1 and 0. When you change one of these, it will print the value to stdout.txt, and any errors will be put in stderr.txt.
There are two major problems, and 2 minor:
When shapes land, they are slightly crooked. After printing the value of a, the value is around 0.0001 or less. I'm guessing this is because the gravity is pushing against the paddle, which with it's infinite mass, won't budge, so it bounces back. However, I'm not sure why it does this on an angle, as it happens when both shapes are perfectly straight. A solution I can think of is rounding the angle to 3 decimal places, but it shouldn't be needed and I don't know what it would do to the underlying physics.
The second problem is that the collisions... kinda... collide to much. If you don't get it, try landing a shape, then landing shape on top of it to the side. It will bounce straight off. I think this is because all the energy is retained. What would be better is if some (or alot) of the energy is absorbed. That would make is easier and better.
The first minor problem is that when you have more than one square top each other, or you increase the friction to around 1.4, when moving left and right, instead of sliding the squares tilt to the side. Triangles don't do this.
The last problem is extremely minor, and in the end I might not even do it. Is there a way to have a constant gravity? EG. instead of having it as an acceleration, just as a constant velocity? I think you could just add a set amount to all the object's y velocity before spacing the step. Would that work?
Any ideas you have that I could put in the final game or to make the physics better, just say.
Anyway, I seem to be complaining alot, so I just want to say that chipmunk is unbelievable! I never would have been able to dream of what I was doing now without it!
This is released under the GPL, so if you want the source, email me at lucaslevin [at] gmail [d0t] com