## Simple breakout in Hollywood

The place for any Hollywood tutorials

### Simple breakout in Hollywood

Hello,

I post this small code, good fun...
Code: Select all
`@VERSION 4,0@DISPLAY{WIDTH=320,HEIGHT=256}CreateBrush(1,8,8,#GREEN)CreateBrush(2,4,4,#RED)CreateBrush(3,40,8,#BLUE)CreateBrush(4,2,2,#WHITE)CreateBrush(5,40,2,#WHITE)CreateBrush(6,1,8,#WHITE)CreateBrush(7,8,1,#WHITE)MixBrush(1,6,128)MixBrush(1,7,128)MixBrush(2,4,128)MixBrush(3,5,128)Local XBarre=0Local XBall=0Local YBall=128Local Vie=3Local Score=0Local XSens=1Local YSens=-1 Local Renvoie=False Local Casse=False /*Attention, Tableau, le premier chiffre est la coordonnée X des briques*//*Le Deuxième Chiffre ET le Numéro de Brush, 1 étant la Brush Brique*/LIGNE={}LIGNE={0,1,8,1,16,1,24,1,32,1,40,1,48,1,56,1,64,1,72,1,80,1,88,1,96,1,104,1,112,1,120,1,128,1,136,1,144,1,152,1,160,1,168,1,176,1,184,1,192,1,200,1,208,1,216,1,224,1,232,1,240,1,248,1,256,1,264,1,272,1,280,1,288,1,296,1,304,1,312,1,320,1}Function Ball()XBall=XBall+XSensYBall=Yball+YSensIf XBall=312 Then XSens=-1 If XBall=0 Then XSens=1If YBall=10 Then YSens=1 Renvoie=Collision(#BRUSH,3,XBarre,248,2,XBall,YBall)For x=1 To 81 Step 2   If ligne[x]<>1 Then ligne[x-1]=-50   Casse=Collision(#BRUSH,2,XBall,yball,1,Ligne[x-1],20)   If Casse=True      Ysens=1      Ligne[x]=4      Score=Score+10   EndIfNextIf Renvoie=True Then Ysens=-1If YBall=256   Ysens=-1   Vie=Vie-1EndIfDisplayBrush(2,XBall,Yball)EndFunctionFunction Ecran()For x=1 To 81 Step 2   DisplayBrush(Ligne[x],Ligne[x-1],20)NextTextOut(0,0,"Score : ")TextOut(80,0,Score)TextOut(260,0,"Vie : ")TextOut(310,0,Vie)EndFunction`

Respect

Posts: 431
Joined: Mon Nov 01, 2010 11:37 am
Location: Albert - France

### Re: Simple breakout in Hollywood

Excellent
mjnurney

Posts: 8
Joined: Sun Nov 29, 2015 11:41 pm

### Re: Simple breakout in Hollywood

I post this small code, good fun...

Can't get it to run? Is all the code attached? seems something is missing?
_____________________________________
Hollywood 6.1

fjudde

Posts: 20
Joined: Tue Dec 01, 2015 3:59 pm
Location: Stockholm, Sweden