Thursday, April 2, 2009

Research

I've been spending the last few days just researching - reading up on Flash forums and the Box2D common issues. I've learned quite a few things and have a better grip on how I'm going to implement this now.

One bug that Fantastic Contraption has always had, is the "Collision skipping." When an object moves too quickly, it will clip right through another object without triggering the collision detection. Box2D has a feature to prevent this - flagging your objects as "Bullets" will instead sweep the object and halt the simulation at the first collision intersection, then continue on with the new vector.

I imagine it reduces performance, as each collision requires a new step in the physics process, but my benchmarking tests on my game don't seem to have a large effect. I think I'll keep it in. :)

No comments:

Post a Comment