This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Best method you have found for collision detection with eVB


Best method you have found for collision detection with eVB

Postby Jarin » Mar 28, 2003 @ 6:03pm

Jarin
 


Postby James S » Mar 28, 2003 @ 6:26pm

TechMage will know for sure on this one.
<img src="http://home.comcast.net/~sonne/james/tag.gif">
James S
pm Insider
 
Posts: 17064
Joined: Jan 12, 2002 @ 2:33pm
Location: Lexington, KY


Postby Guest » Mar 29, 2003 @ 2:59am

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
Guest
 


Postby damian » Mar 29, 2003 @ 4:49am

Yes, square-rooting is fairly clock-intensive. If your game runs fast already, though, there's nothing to worry about.
damian
pm Insider
 
Posts: 3960
Joined: Sep 3, 2002 @ 7:59pm
Location: Acton, MA (home), NYC (school)


Postby Dan East » Mar 29, 2003 @ 5:15am

User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Postby Jarin » Mar 29, 2003 @ 7:28am

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
Jarin
 


Postby TechMage » Mar 29, 2003 @ 3:33pm

User avatar
TechMage
pm Insider
 
Posts: 2223
Joined: Sep 16, 2001 @ 5:40pm
Location: In Your Head


Postby TechMage » Mar 30, 2003 @ 4:43am

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.
User avatar
TechMage
pm Insider
 
Posts: 2223
Joined: Sep 16, 2001 @ 5:40pm
Location: In Your Head


Return to Windows Mobile


Sort


Forum Description

A discussion forum for mobile device developers on the Windows Mobile platform. Any platform specific topics are welcome.

Moderators:

Dan East, sponge, Digby, David Horn, Kevin Gelso, RICoder

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum