A simple breakout for the coffeebreaks (or colabreaks, or whatever break you fancy

).
set display mode 800,600,32:hide mouse:set global collision on:dim brick(15,5):objBat = 1000:objBall = 1001:lives = 3
objBorderleft= 1002: objBordertop = 1003:objBorderright = 1004: ballspeed = 5: balldirx# = 1.5:balldiry = 1:bx# = 0:by = 12.5:counter = 5000:for bricky = 1 to 5:for brickx = 1 to 15:counter = counter + 1:brick(brickx,bricky) = counter
make object box brick(brickx,bricky),32,20,5:position object brick(brickx,bricky),brickx*40,bricky*34+300,0:color object brick(brickx,bricky),rgb(rnd(255),rnd(255),rnd(255)):next brickx:next bricky
make object box objBorderleft,10,500,5:make object box objBorderright,10,500,5:make object box objBordertop,660,10,5
position object objBorderleft,-5,250,0:position object objBorderright,645,250,0:position object objBordertop,320,505,0
make object box objBat,64,10,5:make object sphere objBall,6:position object objBall,bx#,by,0:color object objBall,rgb(255,0,255)
set object light objBall,0:position camera 320,300,-500:rotate camera 5,0,0:started = 0:sync rate 200:sync on
starttime = timer():while exitgame = 0 and lives > 0 and win = 0:if escapekey() then exitgame = 1
if started = 1:bx# = bx# + balldirx#:if bx# <0 or bx# >640:balldirx#=0-balldirx#:endif:by = by + balldiry:if by>500:balldiry=0-balldiry:endif
position object objBall,bx#,by,0:else: bx# = object position x(objBat):position object objBall,bx#,by,0:if mouseclick() = 1 then started = 1
endif:x = object position x(objBat) + mousemovex():position object objBat,x,0,0:if x < 0 then position object objBat,0,object position y(objBat),object position z(objBat):if x > 640 then position object objBat,640,object position y(objBat),object position z(objBat)
if object collision(objBat,objBall) = 1 and object position y(objBall) > object position y(objBat)+5:ballx = object position x(objBall):batx = object position x(objBat):balldirx# = (ballx-batx)/8
if balldirx# < 0.3 and balldirx# > -0.3:if balldir# < 0 then balldirx# = -0.5:if balldir# >= 0 then balldirx# = 0.5
endif:balldiry = 0-balldiry:by=by+balldiry:endif:for y = 1 to 5:for x = 1 to 15:if object exist(brick(x,y)):if object collision(objBall,brick(x,y)):countdestroy = countdestroy + 1:delete object brick(x,y):balldiry = 0-balldiry:by=by+balldiry:if countdestroy = 75 then win = 1
endif:endif
if object exist(brick(x,y)):rotate object brick(x,y),wrapvalue(object angle x(brick(x,y))+1),object angle y(brick(x,y)),object angle z(brick(x,y)):endif: next x:next y
if object position y(objBall) < -230:lives = lives - 1:started = 0:by = 12.5:ballspeed = 5:balldirx# = 1.5:balldiry = 1
endif:text 0,0,"lives: "+str$(lives):text 0,16,"Playingtime: "+str$((timer()-starttime)/1000)+" seconds":sync:endwhile
if lives = 0:while not escapekey(): cls:text 0,0,"You loose!!":text 0,16,"Press escape to exit breakout.": sync:endwhile
endif:if win = 1:wintime = (timer()-starttime)/1000:while not escapekey():cls:text 0,0,"You win!!":text 0,16,"You won in "+str$(wintime)+" seconds!!":text 0,32,"Press escape to exit breakout.":sync:endwhile:endif:end