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

Username:   Password: 
 RegisterRegister   
 Need some help ... (please reply ASAP)
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
poseidon




PostPosted: Tue Mar 25, 2003 10:07 pm   Post subject: Need some help ... (please reply ASAP)

I'm doing this smiley bouncing program for my comp sci class rite now ...

and I'm trying to get an aspect of it working properly ...

the assignment is as follows:

---------------
two smiley faces (a circle w/ two dots as eyes and an arc as a mouth) bounces around the output window...

the bouncing action occurs when the outer boundary of the oval hits any boundary int he output window.

ok, tats the easy part, which i have already completed .... but the thing tats got my mind boggled (as well as my classmates) is tat whenever the smileys hit one another ...

each smiley will rebound in the opposite direction they were originally moving at.

(eg. one smiley is initially moving down in a diagonal slant and after a rebonud w/ the other smiley it moves up w/ the same diagonal slant)

in addition ... whenever the two smileys hit (each other or any boundaries) their face changes from a smile to a frown
------------------

I have already completed the prog up to the interaction between the two smileys .... I'm jsut really trying to get the rebound action to wrk ...

I would appreciate any help u guys can offer ...

but plz ... reply soon (b4 wednesday nite), for the assignment is due on thursday

thx
Sponsor
Sponsor
Sponsor
sponsor
azndragon




PostPosted: Tue Mar 25, 2003 10:35 pm   Post subject: (No subject)

First of all, you will need some good knowledge of physics. Second of all, there is already a tutorial about making a pool game that sounds like the same problem as yours. The tutorial should help you a lot.
Asok




PostPosted: Tue Mar 25, 2003 11:27 pm   Post subject: (No subject)

The tutorial is located here: http://www.compsci.ca/bbs/viewtopic.php?t=129
poseidon




PostPosted: Wed Mar 26, 2003 6:26 pm   Post subject: hey thx

jsut wanted to say, thx for the help ...

tat one simple math distance formula did it all
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  [ 4 Posts ]
Jump to:   


Style:  
Search: