Computer Science Canada Need Help With My Brick Breaker Turing Game |
| Author: | Coult.49 [ Tue Jun 03, 2014 7:50 am ] | ||
| Post subject: | Need Help With My Brick Breaker Turing Game | ||
What is it you are trying to achieve? i am trying to make it so when the ball hits red bricks they disappear What is the problem you are having? when the ball hits the red bricks they do not disapear and everything still stays the same Describe what you have tried to solve this problem i have tried to implement a collision detection between the red bricks and the ball 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: | Srlancelot39 [ Tue Jun 03, 2014 10:48 am ] |
| Post subject: | Re: Need Help With My Brick Breaker Turing Game |
Since you are using whatdotcolour to detect collisions, you should be able to solve the issue by simply drawing over the brick with white. I noticed you have vertical redirection implemented, but make sure you add detection for horizontal as well for when the ball hits the side of a block. |
|
| Author: | Tony [ Tue Jun 03, 2014 12:03 pm ] |
| Post subject: | RE:Need Help With My Brick Breaker Turing Game |
If I'm reading this correctly, then only blocks (5, 1) and (5, 2) are. As Srlancelot39 points out, if the blocks are not cleared from the screen, the collision check would still determine that something is there. |
|
| Author: | way2smrt [ Wed Jun 04, 2014 6:41 pm ] |
| Post subject: | Re: Need Help With My Brick Breaker Turing Game |
Just going to point out that you can reduce lag in your game by using View.Update. Just open a window, and have ;offscreenonly in the setup string. http://compsci.ca/holtsoft/doc/window_open.html Then when you want to update what you drew to the screen, just call View.Update |
|