Saturday, May 5, 2007

Collision Detection Hmmmmm

Well after all the effort I made in trying to thread the collision detection system it worked out to be pointless. In the end the actual thread was doing nothing more than looping and waiting, my original idea was to thread the actual collision checks so that it would check parallel to the renderer, but I found it was doubling or tripling up on the checks and causing more collisions than their really was. I want to be able to do something with it though, possibly have the cell purging and moving threaded, that might reduce the load, or should I thread the whole update process? leaving the engine just to render as is? Hmmmm I was thinking of slowing the thread to the frame rate (usually 60fps) but without testing it I cant be sure it would give accurate results.

I think I'll just dump it for now, so that way collisions are accurate. The only problem I'm having now is that some objects (notably the player ship) isn't colliding with some asteroids as expected. I think we will have to look into the collision detection much deeper to find the hole in our code.

No comments: