2009/11/20

Engine Screen 05

Finally, some real progress! :)

I've started adding collision detection to the engine. Collision detection is harder than I expected, but not too hard.

So far I've implemented simple circle collisions and capsule collisions, which you can see in the screen shot above. But there's still a long way to go. I still have to take into account the effect of friction and restitution forces. I also have to make sure objects don't pass through each other when they are going really fast, which is probably the biggest problem at this point.

And then of course there's the issue of efficiency. Right now the engine is using a simple brute-force approach to find colliding objects, but that's going to be really slow with a hundred objects on the screen at once. I'm planning on using the Sweep and Prune algorithm to speed that up.

I'll post the next prototype soon. It's already fun to play with. :)

No comments:

Post a Comment