Computer Science Canada

Collision Detection...Read Tutorial ...confused..

Author:  hello [ Wed May 07, 2003 6:56 pm ]
Post subject:  Collision Detection...Read Tutorial ...confused..

i read the collision detection help
but im confused still
my attempts for collision is having a a boundary like a rectangle
if enemyx>5 and enemy<10 and enemyy>45 and enemyy<55 then
[stuff happens]
end if

but this is a rectangle and most of our ships are not rectangular
so i need to to have a circular boundary or one that is around the picture of the spaceship.

thx thx if u are helping me
and please dont just post a source code please explain it to me Very Happy

Author:  Tony [ Wed May 07, 2003 7:39 pm ]
Post subject: 

how many times did I say this already?! Scroll down to first reply of the collision detection. It explains circular collision detection

you should read the whole post (like text effects for example... source codes are scattered throughout the disussion because lots of people submit stuff). Same with every other post. Read the whole thread.

if you dont want, use SEARCH (link found on top /\ ) and find posts containing keyword you're looking for

Author:  William Hui Xue [ Thu May 08, 2003 10:33 am ]
Post subject: 

Surprised Sad Smile Very Happy Shocked Confused 8) Laughing Crying or Very sad Embarassed Razz Mad Evil or Very Mad Twisted Evil Wink Exclamation Question Idea Arrow Mr. Green

Hello this is William, hi Hang. I am here to sooth your soul and councel you. Please do not feel that everyone is against you. You know that some loves you like your parents and I and our Christian brothers. Do not be bothered with such matter Hang. Instead forgive them, and show your light to the world.

Sincerely William Hui Xue

Author:  Prince [ Thu May 08, 2003 10:37 am ]
Post subject: 

Rolling Eyes

Author:  Tony [ Thu May 08, 2003 10:38 am ]
Post subject: 

sorry if I appear edgy... its just that it gets annoying when the same question is asked over and over and over again and noone bothers to look up the anwers already posted.

Author:  ThunderChuncky [ Thu May 08, 2003 11:53 am ]
Post subject: 

Nobody blames u, tony. <pat on back>

Author:  naoki [ Sat May 10, 2003 2:46 pm ]
Post subject: 

sorry if hello's been on everyone's nerves .... he's just a demanding guy

so obviously he'd be on everyone if his work wasn't progressing well

Author:  Homer_simpson [ Sat May 10, 2003 4:25 pm ]
Post subject: 

hmmm... the guy said that he wanted collision detection for his ship and i dont think his ship is circular so he has to use another way to detect collision...

Author:  Tony [ Sat May 10, 2003 4:39 pm ]
Post subject: 

well you could break the ship down into couple of boxes... would be somewhat accurate

Author:  naoki [ Sat May 10, 2003 5:21 pm ]
Post subject: 

the ship is triangular in shape, and so a circle would at least shave off unnecessary hotspots from the detection system.

Author:  Homer_simpson [ Sat May 10, 2003 5:43 pm ]
Post subject: 

tony wrote:
well you could break the ship down into couple of boxes... would be somewhat accurate

yeah that what i was thinking of too... it's a good idea but i dont think boxes would do we could just cut the ship to lines and check it that way...

Author:  Catalyst [ Sun May 11, 2003 12:03 am ]
Post subject: 

theres a way to check if a point is inside a polygon (cant remeber exactly)
that would be an accurate way

Author:  Homer_simpson [ Sun May 11, 2003 10:44 am ]
Post subject: 

that would be the faster way both ways work fine....

Author:  hello [ Sun May 11, 2003 1:03 pm ]
Post subject:  hello

we have many ships some are rectangular so thats easy but we want like a basic way to detect if the projectile is hitting the enemy and vice versa also we need to check if the enemy ship is crashing into the main ship

Author:  Tony [ Sun May 11, 2003 1:12 pm ]
Post subject: 

you can consider the projectile to be a dot so you can just check if that dot is inside rectangle/circle/triangle to determine if collision has occured or not.

As for the collision between ships... well its easy to determine that if both are circles. If they're rectangles I think it would be enough to just check if any of the corners of the ship is inside the rectangle of another.

Author:  void [ Mon May 12, 2003 5:20 pm ]
Post subject: 

IM i was surprised no one suggested whatdotcolor.....color detection (personally) is the most versatile and widely used collision detection....its really easy for beginner programers to understand...much easier than trying to understand polygonal collision detection.....just my suggestion....

Author:  void [ Mon May 12, 2003 5:23 pm ]
Post subject: 

is it just me...or do two player games not work well on turing...its soooooooo GAYY....honestly...who asked for such a crappy lang to program in....?!?!!?....i tried to make a game with submarines that shot torpedoes at each other... and it worked...but it was sooooo laggy...i shot the torpedo...went out for an ice cap...and a donut...and came back..and my friend was waiting for his torpedo to get past halfway......

Author:  Dan [ Mon May 12, 2003 8:49 pm ]
Post subject: 

yes, turing is nto great for multy player via net or keyborad. may whont to try one player on keyborad and one with joy stick or one with mouse and with keyborad.