Page 1 of 1
Collision program
Posted: Fri Jan 20, 2006 12:28 pm
by Anonymous
I need help making my program exit when to rectangles collide. thanks for any help
Archived topic from Iceteks, old topic ID:4123, old post ID:33693
Collision program
Posted: Fri Jan 20, 2006 2:23 pm
by Death
Graham wrote: I need help making my program exit when to rectangles collide. thanks for any help
lol okay. Can you explain this a bit more in detail? Are the rectangles racing? Are they bouncing around the screen?
Archived topic from Iceteks, old topic ID:4123, old post ID:33700
Collision program
Posted: Mon Jan 23, 2006 2:01 pm
by Anonymous
its a racing game but like frogger and there is 3 lanes when the car touch i want it to exit
Archived topic from Iceteks, old topic ID:4123, old post ID:33728
Collision program
Posted: Tue Jan 24, 2006 1:40 pm
by Death
Okay, I know what you mean now. This is waaaaaay too difficult to explain without confusing anyone. I wrote 2 huge paragraphs but was unable to make it sound easier. I can't explain is in depth but all I can say is you need to set boundaries for your car and test to make sure that your car's co-ordinates aren't the same as another car's. If the coordinates are the same, that means they've collided. But it's much more complex than that because you car will have more than one coordinate. It'll have a range of co-ordinates because it's not a single dot you're checking. So you might be checking to make sure that car 1's x value isn't surpassing car 2's x value from the range of 1 to 100 (because your car is going to be taking up enough space). It's too difficult to explain without showing you in the actual editor. Your best bet is to ask your teacher or the class wiz for help.
Archived topic from Iceteks, old topic ID:4123, old post ID:33744