. It's quite alright. I really wish it had a global friction that I could set. Because my bodies are all "floating" (no gravity to pull them to the bottom of the screen) there's no way to slow them down once they start moving. Well ... there is, but it's a ridiculous hack. I set the damping value to an extremely small number, and it quickly reduces velocities to zero without continuous force to propel the bodies. The problem is that it takes an equally ridiculous amount of force to move the bodies when the damping is set so low. So when two shapes collide at what appears to be a very low velocity, the force of the impact is very high (because of the high forces required to move the bodies) causing the other body to fly off at an INCREDIBLE rate. So far that the high damping won't even slow them down before they pass through every other shape in the space, and disappear from sight.
The only fix for not rocketing shapes away when they are touched is to give one body infinite mass. That means it can never move, solving the problem. But it creates a new problem: those bodies can NEVER move! Say goodbye to AI!
So much for using damping the wrong way, I guess. I'll have to shoehorn a different solution to the missing-global friction problem. Probably setting counter forces or directly reducing the velocities every frame. Either way, it is going to be a lot of work to find the sweet spot.
Yeah, other than that, Chipmunk is awesome! I get very fast (and accurate) collision detection against arbitrary shapes (with arbitrary rotations), and also accurate reaction forces. It will seriously kick ass when I go to implement particle effects for collectible items.
Oh, there is one other peculiarity that I found today... When two shapes share an edge, Chipmunk freaks out and fills the console log so fast, it makes my Chrome debugger unresponsive. And unfortunately, that's very easy to do by accident, using Snap-To-Grid when placing objects. Easy to workaround , though; just move the shapes a bit.
If you're not following my blog, you probably should be.
I got a hell of a lot done in the last two days. That's because I have been awake for 34 hours, with all but maybe 4(?) spent working on the game. I'll try to get to sleep around 1 or 2 am tomorrow morning (that sounds so odd). Until then, I'll be working on today's snapshot. Well, I told you I was fucking serious.