Computer Science Canada Pong help |
Author: | Thuged_Out_G [ Sat Jan 17, 2004 12:51 pm ] | ||
Post subject: | Pong help | ||
sometimes the ball gets stuck to the paddles, and the points just keep going up here...here is my code, if someone could give me a solution, id appreciate it
|
Author: | Cervantes [ Sat Jan 17, 2004 1:03 pm ] | ||||
Post subject: | |||||
as kickass as whatdotcolour is i wouldn't recommend it here. instead of
try something like
I haven't tested that at all and you'd have to input your own values... |
Author: | Andy [ Sat Jan 17, 2004 1:05 pm ] |
Post subject: | |
if you dont totally understand how to use whatdotcolor plz dont use it... u'll simply inviting ppl like tony and dan to insult it... if u were to use whatdotcolor for ur problem, you have to check the step ahead of time. instead of checking the x and y location, check the x+xdir and y+ydir so that your ball wont go beyond the paddle |
Author: | Thuged_Out_G [ Sat Jan 17, 2004 1:11 pm ] |
Post subject: | |
i used whatdotcolor because it made the code alot sorter....and it works fine, the only problem is when the ball hits on the very edge of the paddle, it sometimes kinda sticks to it....and i also cant seem to get the players paddle to stop flickering without slowing down the hole program |
Author: | Cervantes [ Sat Jan 17, 2004 1:15 pm ] |
Post subject: | |
I noticed you used Window.Update instead of View.Update... never heard of Window.Update before, iuno why but maybe thats why its flickering... never flickers for me when I use View.Update.. dodge, that's cool, never thought of that before.. does that work flawlessly?? |
Author: | Thuged_Out_G [ Sat Jan 17, 2004 1:16 pm ] |
Post subject: | |
i used window.update because i am opening my own window, when i used view.update though i had the same problem ![]() |
Author: | shorthair [ Sat Jan 17, 2004 1:22 pm ] |
Post subject: | |
use hte brand spanking new view.updatearea , |
Author: | Andy [ Sat Jan 17, 2004 2:23 pm ] |
Post subject: | |
yepp, thats the way, makes your program so much faster |
Author: | Cervantes [ Sat Jan 17, 2004 4:41 pm ] |
Post subject: | |
is that in Turing 4.5 ? or is it 4.05... whatever, the new version? |
Author: | Andy [ Sat Jan 17, 2004 7:26 pm ] |
Post subject: | |
4.05 its in there... however they did lie about Window.UpdateArea |
Author: | Cervantes [ Sat Jan 17, 2004 7:32 pm ] |
Post subject: | |
its non-existant? |
Author: | AsianSensation [ Sat Jan 17, 2004 7:54 pm ] |
Post subject: | |
Thuged_Out_G wrote: i used window.update because i am opening my own window, when i used view.update though i had the same problem
![]() you could always go Window.Select, and then View.Update. I know it worked for my game. |
Author: | Andy [ Sun Jan 18, 2004 6:13 pm ] |
Post subject: | |
no there is Window.UpdateArea... its just not documented in the help |