Computer Science Canada Need some more breakout help... |
Author: | Ryft [ Wed Jun 01, 2005 4:17 pm ] | ||
Post subject: | Need some more breakout help... | ||
Alright since, my game is at school atm I'm going to explain my situtaion the best I can. I'm making breakout for finalsummative evaluation. I've got pretty much everything down pat EXCEPT my problem with which bricks get deleted when the ball touches them. As of right now, when my ball touches one of the 30 bricks all get deleted. I tried using arrays but they didn;t help me much. From memory right now I just know that I used a for statement like this for my bricks:
Other then this, I used View.Update inside loop to make evrything else work. Thanks for any help. |
Author: | illu45 [ Wed Jun 01, 2005 5:25 pm ] |
Post subject: | |
hmm... I would suggest redrawing the brick in white... For instance: if ballx+ballradius = brickx+brickwidth and bally+ballradiu = bricky+bricklength then drawfillbox (brickx, bricky, brickwidth, bricklength, white) bricks(brickx,bricky) := 0 The last line is if you have an array (which would be good to have, IMO), it should delete the brick from that array, so that the ball can go through that space... The array should be a 5x6 array, housing 1's and 0's, 1 = brick, 0= blank... Or you could do it some other way... Up to you. |
Author: | Ryft [ Wed Jun 01, 2005 5:35 pm ] |
Post subject: | |
Hmmm. I'll try it your way and tell you my results... |
Author: | Naveg [ Wed Jun 01, 2005 6:45 pm ] |
Post subject: | |
there are many topics of this nature authored by mike200015, you can PM him for help if you want. |
Author: | Ryft [ Wed Jun 01, 2005 10:56 pm ] |
Post subject: | |
Alrigght, well that solved my problem, but another one was created ![]() |