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

Username:   Password: 
 RegisterRegister   
 Pong Game Help (collisions)
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Coog03




PostPosted: Thu Mar 06, 2003 10:04 am   Post subject: Pong Game Help (collisions)

I am trying to program a pong game in Turing. I have the paddel movement right, but I need some help with the collison detection. I'm trying to use a small square instead of a ball. With a ball it worked but now with the square it won't. Also I am looking for a good way to make the ball bouncing off the edges of the screen more real instead of the ball repeating the same path over and over.

Thanks in Advance
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Thu Mar 06, 2003 10:23 am   Post subject: (No subject)

check out tutorial section for [tutorial] collision detection for some different ways of collision detection algorythms and [trig] so you're making a pool game for an example (well idea... needs some editing) on realistic bounce of objects on collision.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Hurukan




PostPosted: Thu Mar 06, 2003 9:30 pm   Post subject: (No subject)

Change the paddle bounces and make it so that theyre specific to separate parts of the paddle... so if you hit the top of the paddle the ball moves at an upward course.. its actually easy just fix your x,y increase values for the ball movement (ie. instead of reversing x movement add in increased y movement) this really helps with the gameplay.. or it did in my pong i just finished Smile

Btw.. why do you use a square? an oval is easier to write in, and looks better... also its easier to arrange the collision detection for it- i mean im working with a picture of a ball now and its a pain in my ass~~ anyways cyas
Dan




PostPosted: Thu Mar 06, 2003 9:54 pm   Post subject: add

i whode just like to add that if the swat ftp site (ftp://swat@www.danco.no-ip.com) is wroking you can download some pong progames form that for exapmles.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
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: