| Author | Message |
|---|---|
| shoobyman |
Post Posted: Thu Jan 12, 2006 9:32 am Post subject: brick program help??
|
| please help me with my brick program, i need to make the blocks at the top of the game and make the ball hit it and then the block disaapers and wen the ball hits the bottom, it seys the number of lives and once the number of lives r dun make it sey game over :
PLEASE I DUNT KNOW HOW TO DO IT AT ALL var x, y, button : int var paddleHEIGHT: int:=5 var objectVX, objectVY, x2, y2 : int objectVY := 10 objectVX := 10 x2 := maxx div 2 y2 := maxy div 2 const ballRad : int := 5 setscreen ("offscreenonly") loop delay (30) cls mousewhere (x, y, button) drawfillbox (x,13,x+60,paddleHEIGHT,black) drawfilloval (x2, y2, ballRad, ballRad, black) x2 += objectVX y2 += objectVY if x2 > maxx - 5 then objectVX := -objectVX elsif x2 < 5 then objectVX := -objectVX elsif y2 > maxy - 5 then objectVY := -objectVY elsif y2 < 5 then objectVY := -objectVY end if if x2 > x and x2 < x + 60 and y2 < 13 then y2 := -y2 end if View.Update end loop |
|