Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Array Question
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Mr. T




PostPosted: Tue Oct 25, 2005 9:18 pm   Post subject: Array Question

Is it possible that if you have collision detection for a ball bouncing off an array of walls, that the ball will not collide with some walls near the end of the array because the for loop can simply not loop through all the elements of the array fast enough when a collision occurs?
Sponsor
Sponsor
Sponsor
sponsor
beard0




PostPosted: Tue Oct 25, 2005 10:11 pm   Post subject: (No subject)

Not if you do your collision detection right. :D

Just make sure that you check for all possible collisions before you allow the ball to make each move. As long as you are not using processes, this should not be a problem that you need to really worry about.
Mr. T




PostPosted: Tue Oct 25, 2005 10:14 pm   Post subject: Alex's Opinion

Ya, it was my collision detection. I fixed it now, though. Thanks. Rolling Eyes
codemage




PostPosted: Wed Oct 26, 2005 11:49 am   Post subject: (No subject)

That would only happen if you were doing movement and collision detection in parallel - which would be a really bad idea in Turing.
Mr. T




PostPosted: Wed Oct 26, 2005 10:33 pm   Post subject: Alex's Opinion

codemage wrote:
That would only happen if you were doing movement and collision detection in parallel - which would be a really bad idea in Turing.

Lol, that's what beard0 just said. Wink
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: