Here's a really nasty problem I've been trying to figure out. I'm writing atop-down spaceship game, and I'm getting stumped with the collisiondetection. The problem is that the "game cycle" is 60 frames per second.Unfortunately, in 1/60th of a second, ships can move FAST. What I want to beable to do is, given the start position, a vector (the direction and speedthe ship is going), and a radius for two ships, determine if and where theyintersect. The method I'm currently using is "find the distance between thetwo locations, if it's less than firstradius+secondradius then they just hiteach other". This won't work for very high speeds - the ships could passstraight through each other and out the other side in the time of one tick.

Just to give an idea of the things that may happen . . .

Two ships, traveling at huge speeds, missing each other by a very smalldistanceOne ship traveling at huge speeds hitting a ship at a virtual standstillTwo ships racing towards each other at huge speedsHere's a nasty one: two ships in formation, one directly behind the other,traveling at high speedAnd a similar case where the rear ship is traveling fast enough to hit andpass through the front ship . . .

Now, if this isn't hard enough . . .

Make an option for the circles to be empty. (These circles represent theships' shields, btw). One ship could conceivably drop its shields, thesecond ship flys in, and the first ship raises its shield again. We assumethe second ship is much smaller, so it *can* fit in the space between thelarger ship and its shields. They will not intersect (unless one makes acourse correction and the other one doesn't, of course.)

Now, if this isn't hard enough . . .

The circles should be somewhat deformable. Nothing major - I'd be inputtinga "height", a "width", and an "angle", and then doing whatever calculationswould be necessary to make this into more useful data for the game. A longsleek ship is NOT going to have a shield shaped like a perfect circle.Everything mentioned above will still apply.

Now, if this isn't hard enough . . .

Add arbitrary polygons, quite possibly concave (something has to happen whenthe shields get blown away, right? at the moment the ship explodes when theshield goes down.) Once again, everything above applies, except these shapeswould be solid (though a toggle would be nice).

Now, if this isn't hard enough . . .

I also will need the ability for laser weapon intersection. I'd need to getback a list of what it hits in what order. Actually, I need this for all theships (so they only hit the first target and then bounce). Naturally, thiswould just be a line. This one actually shouldn't be too hard, especiallyconsidering that only the laser entity needs to get an "intersection"message.