Computer Science Canada Brick Breaker... Please Help |
| Author: | miller6 [ Tue Jan 26, 2010 7:49 pm ] | ||
| Post subject: | Brick Breaker... Please Help | ||
What is it you are trying to achieve? Making the game Brick Breaker in Turing. What is the problem you are having? Getting two pictures to move at once (the sliding box and bouncing ball) Describe what you have tried to solve this problem EVERYTHING Post any relevant code (You may choose to attach the file instead of posting the code if it is too long) <Answer Here>
Please specify what version of Turing you are using 4.1.1 |
|||
| Author: | ProgrammingFun [ Wed Jan 27, 2010 9:40 am ] |
| Post subject: | RE:Brick Breaker... Please Help |
You could go offscreenonly then specify new coordinates for the pics and then View.Update. |
|
| Author: | TheGuardian001 [ Wed Jan 27, 2010 10:38 am ] | ||||
| Post subject: | Re: RE:Brick Breaker... Please Help | ||||
ProgrammingFun @ Wed Jan 27, 2010 9:40 am wrote: You could go offscreenonly then specify new coordinates for the pics and then View.Update.
That's what they're doing now... Is there a reason that you're drawing the pic "box" 3 times inside of a single loop, and the pic "pic" twice? You should only be drawing each of these once per repetition. Drawing more than once will either be pointless (if they're all in the same position), or create multiple images (if they aren't.) In your code:
You do a similar thing with the other image (draw move draw). You also draw the images at completely different times. Although this generally won't make a difference (since you're using offscreenonly,) however it's still a good idea to group that stuff together wherever possible, IE
However I'd assume the main problem is a combined lack of cls outside of an if and the fact that you drew each image multiple times. Look into those. |
|||||