Page 1 of 1

Best method you have found for collision detection with eVB

PostPosted: Mar 28, 2003 @ 6:03pm
by Jarin

PostPosted: Mar 28, 2003 @ 6:26pm
by James S
TechMage will know for sure on this one.

PostPosted: Mar 29, 2003 @ 2:59am
by Guest
I am also toying with the idea of using Pythagoras therom, as I think the above hit detection would do strange things at wierd angles,

DIST=((XS-XP)^2+(YS-YP)^2)^0.5
IF DIST<15 THEN
collision!
ELSE { move again }

DIST=distance from object using pythagoras theorem
XS,YS=shot coords, XP,YP=Enemy coords.
15 = size of object

Since that uses the radius of the object I reckon that would be angle independant.

Would that use to much clock cycles?

- Jarin

PostPosted: Mar 29, 2003 @ 4:49am
by damian
Yes, square-rooting is fairly clock-intensive. If your game runs fast already, though, there's nothing to worry about.

PostPosted: Mar 29, 2003 @ 5:15am
by Dan East

PostPosted: Mar 29, 2003 @ 7:28am
by Jarin
Thanks guys for your great responses!

Dan, good advice on that square root, never thought of that DOH! :)

Thanks again guys that was great advice.

Just toying with evb atm, to get the fram work of the game going then move to evc for the real deal :twisted:

- Jarin

PostPosted: Mar 29, 2003 @ 3:33pm
by TechMage

PostPosted: Mar 30, 2003 @ 4:43am
by TechMage
Well speak of the devil. ASpriteCE is now freeware. You can get it at

I payed 30 bucks for this control just a few months ago. If you're making eVB games, this is a must have.