Tuesday, December 8, 2009

Picking up some momentum

Things are slowly starting to take shape for my latest game.
I now have a fairly complete physics engine that manages collisions and their associated effects between combinations of solid and soft body objects.

I still need to go through my code and do some cleaning up to make it faster... Also, I should probably lower the dot-count for my deformable bodies; right now it's at around 200 points... Which is more than I need.

Anyways, here is what my work looks like thus far:

Press space bar to fire bullets.

I know that the collision detection is less than perfect - sometimes is passes straight through some of the narrow parts of the tree if the ball is moving fast. It'll just take some basic parameter tweaking to get it right (I.e. Limit the speed to a reliable rate and maybe make less air resistance so that it doesn't slow down too fast).

To save myself some time, I used Corey O'Neil's AS3 collision detection kit:

It's based on ideas by Skinner.

It records some useful data about collisions including the objects involved and angle of impact - this was a BIG time-saver.

No comments:

Post a Comment