bluatigro
Jul 23, 2010
''version 21 23 jul 2010
' ''gordons Joy1x and Joy1y changed by Gordon fix put into this to
WindowWidth = DisplayWidth
WindowHeight = DisplayHeight
global winx , winy
winx = WindowWidth
winy = WindowHeight
global px , py , pst , lastkey$ , pi , q , d , joyYN$ , firetel
global points , lives , state , ufohasfired , level , ufost
global true , false
global sndPlayerFire$ , sndPlayerWasHit$ , sndRockWasHit$
global sndUfoWasHit$ , sndUfoFlie$
global notjetactif , flies , washit
notjetactif = 0
flies = 1
washit = 2
global rockmax , ufomax
dim rockdx( 8 ) , rockdy( 8 ) , rockst( 8 )
false = 0
true = not( false )
pi = atn( 1 ) * 4
level = 0
for i = 0 to 31
loadbmp"p";i "p";i , DefaultDir$ + "\BMP\player" "\BMP\player" + nr$( i ) + ".bmp" ".bmp"
anim$ = anim$ +" p";i " p";i
next i
loadbmp"fire" "fire" , DefaultDir$ + "\BMP\dot.bmp" "\BMP\dot.bmp"
loadbmp"rock" "rock" , DefaultDir$ + "\BMP\rock.bmp" "\BMP\rock.bmp"
loadbmp"ufo" "ufo" , DefaultDir$ + "\BMP\ufo.bmp" "\BMP\ufo.bmp"
loadbmp"star" "star" , DefaultDir$ + "\BMP\star.bmp" "\BMP\star.bmp"
notice chr$( 13 ) _
+"Blua "Blua tigro presents :" :" + chr$( 13 ) _
+"ASTERIODS ." "ASTERIODS ." + chr$( 13 ) _
+"use "use cursor keys" keys" + chr$( 13 ) _
+"to "to move your ship" ship" + chr$( 13 ) _
+"spacebar "spacebar : fire ." ." + chr$( 13 ) _
+"[esc] "[esc] : quit game ." ." + chr$( 13 ) _
+"rock "rock : 2 points ." ." + chr$( 13 ) _
+"ufo "ufo : 7 points ." ."
readjoystick 1
if Joy1x > 2 then
confirm chr$( 13 ) _
+"Joystick "Joystick detected . " " + chr$( 13 ) _
+"Use "Use joystick ?" ?" ; joyYN$
end if
''graphicbox #m.g , 0 , 0 , winx , winy
nomainwin
open"asteriods" "asteriods" for graphics as #m
#m"trapclose [quit]" #m "when "trapclose [quit]"
#m "when characterInput[key]" #m "fill black" #m "backcolor white" #m "color white" #m "getbmp [key]"
#m "fill black"
#m "backcolor white"
#m "color white"
#m "getbmp back 0 0" " ; winx ; " " " " ; winy
#m"background back" "background back"
for i = 0 to 100
#m"addsprite star" ; i ; " star" #m "spritexy star"; i ; " " "addsprite star" ; i ; " star"
#m "spritexy star"; i ; " " _
; rnd( 0 ) * winx ;" " " " ; rnd( 0 ) * winy
#m"spritescale star"; i ; " " "spritescale star"; i ; " " ; rnd( 0 ) ^ 3 * 100
#m"spritemovexy star" ; i ; " 0 1" "spritemovexy star" ; i ; " 0 1"
next i
for i = 0 to 4
#m"addsprite live" ; i ; " p" ; 0 #m "spritexy live" ; i ; " " "addsprite live" ; i ; " p" ; 0
#m "spritexy live" ; i ; " " ; i * 50 ;" " " " ; winy - 50
#m"spritescale live"; i ; " 50" "spritescale live"; i ; " 50"
next i
for i = 0 to 20
#m"addsprite playerfire" ; i ; " fire" #m "spritexy playerfire" ; i ; " "addsprite playerfire" ; i ; " fire"
#m "spritexy playerfire" ; i ; " -100-100" -100"
next i
for i = 0 to 7
#m"addsprite rock" ; i ; " rock" "addsprite rock" ; i ; " rock"
next i
#m"spritescale "spritescale rock0 100" #m "spritescale 100"
#m "spritescale rock170" #m "spritescale 70"
#m "spritescale rock270" #m "spritescale 70"
#m "spritescale rock350" #m "spritescale 50"
#m "spritescale rock450" #m "spritescale 50"
#m "spritescale rock550" #m "spritescale 50"
#m "spritescale rock650" #m "addsprite 50"
#m "addsprite ufoufo" #m "addsprite ufo"
#m "addsprite ufofirefire" #m "setfocus" #m "addsprite fire"
#m "setfocus"
#m "addsprite player" " ; anim$
#m"spritexy "spritexy player " " ; px ; " " " " ; py
call resetgame
call nextlevel
call drawpoints
timer 40 , [tmr]
wait
function nr$( no )
nr$ = right$("00" "00" + str$( no ) , 2 )
end function
[tmr]
q = q - 1
if q < 0 then
q = int( rnd( 0 ) * 20 )
d = int( rnd( 0 ) * 3 )
end if
if joyYN$ = "yes" if JoyYN$ = "yes" then
if Joy1x < 256 * 256 / 3 then
pst = ( pst + 1 )
if pst > 31 then pst = 0
end if
if Joy1x > 256 * 256 * 2 / 3 then
pst = ( pst - 1 )
if pst < 0 then pst = 31
end if
if Joy1y < 256 * 256 / 3 then
px = ( px - sin( strad( pst ) ) * 5 )
if px < -100 then px = winx
if px > winx then px = -100
py = ( py - cos( strad( pst ) ) * 5 )
if py < -100 then py = winy
if py > winy then py = -100
end if
if Joy1y > 256 * 256 * 2 / 3 then
''here i wil place a hyperjump in the furture
end if
else
select case lower$( lastkey$ )
case chr$( _VK_LEFT )
pst = ( pst + 1 )
if pst > 32 then pst = 0
case chr$( _VK_RIGHT )
pst = ( pst - 1 )
if pst < 0 then pst = 32
case chr$( _VK_UP )
px = ( px - sin( strad( pst ) ) * 5 )
if px < -100 then px = winx
if px > winx then px = -100
py = ( py - cos( strad( pst ) ) * 5 )
if py < -100 then py = winy
if py > winy then py = -100
case chr$( _VK_DOWN )
''hyperjump
case chr$( 27 ) ''escape
goto [quit]
wait
case" " #m "spritexy playerfire" " "
#m "spritexy playerfire" ; firetel ;" " " " _
; px - 16 - sin( strad( pst ) ) * 45 ;" " " " _
; py - 16 - cos( strad( pst ) ) * 45
#m"spritemovexy playerfire" "spritemovexy playerfire" ; firetel ; " " " " _
; sin( strad( pst ) ) * -6 ;" " " " _
; cos( strad( pst ) ) * -6
firetel = firetel + 1
if firetel > 20 then firetel = 0
end select
end if
lastkey$ ="" #m "spritexy ""
#m "spritexy player" " ; px - 50 ; " " " " ; py - 50
#m"spriteimage "spriteimage player p" p" ; pst
for i = 0 to 10
#m"spritexy? playerfire" ; i ; " "spritexy? playerfire" ; i ; " x y" y"
if x < -100 or x > winx + 100 _
or y < -100 or y > winy + 100 then
#m"spritemovexy playerfire" ; i ; " 0 0" "spritemovexy playerfire" ; i ; " 0 0"
end if
next i
#m"spritexy? "spritexy? ufo ufox ufoy" ufoy"
if ufox < -100 then
ufox = winx
ufohasfired = false
state = rnd( 0 ) * ( winx / 2 ) + winx / 4 - 35
end if
state = state - 1
if state < 0 and not( ufohasfired ) then
ufohasfired = true
dx = px - ufox
dy = py - ufoy
af = sqr( dx ^ 2 + dy ^ 2 ) + 1
#m"spritexy "spritexy ufofire " " ; ufox ; " " " " ; ufoy
#m"spritemovexy "spritemovexy ufofire " " ; dx / af * 6 ; " " " " ; dy / af * 6
end if
#m"spritexy? "spritexy? ufofire x y" y"
if x < -100 then #m"spritemovexy "spritemovexy ufofire 0 0" 0"
if x > winx then #m"spritemovexy "spritemovexy ufofire 0 0" 0"
if y < -100 then #m"spritemovexy "spritemovexy ufofire 0 0" 0"
if y > winy then #m"spritemovexy "spritemovexy ufofire 0 0" #m "spritexy 0"
#m "spritexy ufo" " ; ufox ; " " " " ; ufoy
for i = 0 to 6
#m"spritexy? rock"; i ; " "spritexy? rock"; i ; " x y" y"
if x < -100 then x = winx
if x > winx then x = -100
if y < -100 then y = winy
if y > winy then y = -100
#m"spritexy rock" ; i ; " " "spritexy rock" ; i ; " " ; x ; " " " " ; y
next i
''colisiondetecion and respons
#m"spritecollides "spritecollides player playerhit$" playerhit$"
if instr( playerhit$ ,"rock" "rock" ) <> 0 _
or instr( playerhit$ ,"ufo" "ufo" ) <> 0 then
lives = lives - 1
if lives < 0 then
call gameover goto [gameover]
wait
else
call resetscene
end if
end if
#m"spritecollides "spritecollides rock0 rockhit$" rockhit$"
if instr( rockhit$ ,"playerfire" "playerfire" ) _
and rockst( 0 ) = flies then
point = point call removefire
points = points + 1
call drawpoints
call rocksplit 0 , 1 , 2
end if
for i = 1 to 2
#m"spritecollides rock" ; i ; " rockhit$" "spritecollides rock" ; i ; " rockhit$"
if instr( rockhit$ ,"playerfire" "playerfire" ) _
and rockst( i ) = flies then
point = point call removefire
points = points + 2
call drawpoints
if i = 1 then
call rocksplit 1 , 3 , 4
else
call rocksplit 2 , 5 , 6
end if
end if
next i
for i = 3 to 6
#m"spritecollides rock" ; i ; " rockhit$" "spritecollides rock" ; i ; " rockhit$"
if instr( rockhit$ ,"playerfire" "playerfire" ) _
and rockst(0 i ) = flies then
point = point call removefire
points = points + 4
call drawpoints
rockst( i ) = washit
#m"spritexy rock" ; i ; " "spritexy rock" ; i ; " -100 -100" #m "spritemove rock" ; i ; " 0 0" -100"
#m "spritemovexy rock" ; i ; " 0 0"
end if
next i
#m"spritecollides "spritecollides ufo ufohit$" ufohit$"
if instr( ufohit$ ,"playerfire" "playerfire" ) then
points = points + 7
#m"spritexy "spritexy ufo " " ; winx ; " " " " _
; rnd( 0 ) * ( winy / 2 ) + winy / 4 - 50
state = rnd( 0 ) * ( winx / 2 ) + winx / 4
ufohasfired = false
call drawpoints
end if
for i = 0 to 100
#m"spritexy? star" ; i ; " "spritexy? star" ; i ; " x y" y"
if y > winy then
#m"spritexy star" ; i ; " " "spritexy star" ; i ; " " ; rnd( 0 ) * winx ; " " " " ; -30
#m"spritescale star" ; i ; " " "spritescale star" ; i ; " " _
; rnd( 0 ) ^ 3 * 100
end if
next i
allwashit = true
if ufost <> washit then allwashit = false
for i = 0 to 6
if rock( i ) <> washit then allwashit = false
next i
if allwashit then call nextlevel
#m"drawsprites" "drawsprites"
wait
sub removefire
for i = 0 to 20
#m "spritexy playerfire" ; i ; " -100 -100"
#m "spritemovexy playerfire" ; i ; " 0 0"
next i
end sub
sub resetgame
level = 0
lives = 3
points = 0
ufohasfired = false
state = rnd( 0 ) * ( winx / 2 ) + winx / 4
call resetscene
end sub
sub resetscene
timer 0
call drawpoints
for i = 1 to 4
#m"spritexy live" ; i ; " " "spritexy live" ; i ; " " ; i * 50 ; " " " " ; winy - 50
next i
for i = 0 to 20
#m"spritexy playerfire" ; i ; " "spritexy playerfire" ; i ; " -100 -100" -100"
next i
#m"spritexy "spritexy ufofire -100 -100" -100"
px = winx / 2
py = winy / 2
#m"spritexy "spritexy player " " ; px ; " " " " ; py
timer 40 , [tmr]
end sub
sub nextlevel
for i = 0 to 7
rockst( i ) = notjetactif
#m "spritexy rock" ; i ; " -100 -100"
#m "spritemovexy rock" ; i ; " 0 0"
next i
rockst( 0 ) = flies
#m"spritexy "spritexy rock0 -100 " " ; rnd( 0 ) * winy - 50
#m "spritemovexy x = 0 : y = 0
while abs( x ) = 0 or abs( y ) = 0
x = int( rnd( 0 ) * 7 - 3 )
y = int( rnd( 0 ) * 7 - 3 )
wend
#m "spritemovexy rock0" " ; x ; " " " " ; y
ufost = flies
level = level + 1
state = rnd( 0 ) * winx / 2 + winx / 2 - 50
#m"spritexy "spritexy ufo " " ; winx ; " " " " ; rnd(0) * winy/2 + winy/4 - 35
call resetscene
end subsub gameover notice chr$( 13 ) _ + "GAME OVER !!!" goto [quit] end sub
sub rocksplit no , a , b
dx = rockdx( no )
dy = rockdy( no )
rockst( no ) = washit
#m"spritexy? rock" "spritexy? rock" ; no ; " " x y" #m "spritexy rock" y"
#m "spritexy rock" ; no ;" " -100 -100" #m "spritemovexy rock" -100"
#m "spritemovexy rock" ; no ;" 0 0" #m "spritexy rock" " 0 0"
#m "spritexy rock" ; a ;" " " " ; x ; " " " " ; y
rockst( a ) = flies
'' call rotate dx , dy , 120
#m "spritemove rock" ; dx = 0 : dy = 0
while dx = 0 or dy = 0
dx = int( rnd( 0 ) * 5 - 2 )
dy = int( rnd( 0 ) * 5 - 2 )
wend
rockdx( a; " " ; ) = dx ; " " ; : rockdy( a ) = dy
#m"spritexy rock" "spritemovexy rock" ; a ; " " ; dx ; " " ; dy
#m "spritexy rock" ; b ;" " " " ; x ; " " " " ; y
rockst( b ) = flies
'' call rotate dx , dy , 120
#m "spritemove rock" ; dx = 0 : dy = 0
while dx = 0 or dy = 0
dx = int( rnd( 0 ) * 5 - 2 )
dy = int( rnd( 0 ) * 5 - 2 )
wend
rockdx( b; " " ; ) = dx ; " " ; : rockdy( b ) = dy
#m "spritemovexy rock" ; b ; " " ; dx ; " " ; dy
end sub
sub rotate byref k , byref l , deg
s = sin( deg * pi / 180 )
c = cos( deg * pi / 180 )
hk = k * c - l * s
hl = l * s + l * c
k = hk : l = lh
end sub
sub drawpoints
#m"fill black" #m "font "fill black"
#m "font Corier_New 50bold" #m "color green" #m "backcolor black" #m "goto 0 50" #m "\POINTS bold"
#m "color green"
#m "backcolor black"
#m "goto 0 50"
#m "\POINTS :" " ; right$( " " " " + str$( points ) , 8 )
#m"goto 200 100" #m "\LEVEL "goto 0 " ; winy - 100
#m "\LEVEL :" " ; level
#m"getbmp "getbmp back 0 0 " " ; winx ; " " " " ; winy
#m"background back" "background back"
for i = 0 to lives
#m"spritexy live" ; i ; " " "spritexy live" ; i ; " " ; i * 50 ; " " " " ; 50
next i
for i = lives to 3
#m"spritexy live" ; i ; " "spritexy live" ; i ; " -100 -100" -100"
next i
end sub
function strad( st )
strad = st * pi / 16
end function
[key]
lastkey$ = right$( Inkey$ , 1 )
wait
[gameover]
notice chr$( 13 ) _
+ "points : " + str$( points ) + chr$( 13 ) _
+ "GAME OVER !!!"
[quit]
unloadbmp"fire" "fire"
unloadbmp"ufo" "ufo"
unloadbmp"star" "star"
unloadbmp "rock"
for i = 0 to 31
unloadbmp"p" "p" ; i
next i
close #m
end
WindowWidth = DisplayWidth
WindowHeight = DisplayHeight
global winx , winy
winx = WindowWidth
winy = WindowHeight
global px , py , pst , lastkey$ , pi , q , d , joyYN$ , firetel
global points , lives , state , ufohasfired , level , ufost
global true , false
global sndPlayerFire$ , sndPlayerWasHit$ , sndRockWasHit$
global sndUfoWasHit$ , sndUfoFlie$
global notjetactif , flies , washit
notjetactif = 0
flies = 1
washit = 2
global rockmax , ufomax
dim rockdx( 8 ) , rockdy( 8 ) , rockst( 8 )
false = 0
true = not( false )
pi = atn( 1 ) * 4
level = 0
for i = 0 to 31
loadbmp
anim$ = anim$ +
next i
loadbmp
loadbmp
loadbmp
loadbmp
notice chr$( 13 ) _
+
+
+
+
+
+
+
+
readjoystick 1
if Joy1x > 2 then
confirm chr$( 13 ) _
+
+
end if
''graphicbox #m.g , 0 , 0 , winx , winy
nomainwin
open
#m
#m "when characterInput
#m "fill black"
#m "backcolor white"
#m "color white"
#m "getbmp back 0 0
#m
for i = 0 to 100
#m
#m "spritexy star"; i ; " " _
; rnd( 0 ) * winx ;
#m
#m
next i
for i = 0 to 4
#m
#m "spritexy live" ; i ; " " ; i * 50 ;
#m
next i
for i = 0 to 20
#m
#m "spritexy playerfire" ; i ; " -100
next i
for i = 0 to 7
#m
next i
#m
#m "spritescale rock1
#m "spritescale rock2
#m "spritescale rock3
#m "spritescale rock4
#m "spritescale rock5
#m "spritescale rock6
#m "addsprite ufo
#m "addsprite ufofire
#m "setfocus"
#m "addsprite player
#m
call resetgame
call nextlevel
call drawpoints
timer 40 , [tmr]
wait
function nr$( no )
nr$ = right$(
end function
[tmr]
q = q - 1
if q < 0 then
q = int( rnd( 0 ) * 20 )
d = int( rnd( 0 ) * 3 )
end if
if Joy1x < 256 * 256 / 3 then
pst = ( pst + 1 )
if pst > 31 then pst = 0
end if
if Joy1x > 256 * 256 * 2 / 3 then
pst = ( pst - 1 )
if pst < 0 then pst = 31
end if
if Joy1y < 256 * 256 / 3 then
px = ( px - sin( strad( pst ) ) * 5 )
if px < -100 then px = winx
if px > winx then px = -100
py = ( py - cos( strad( pst ) ) * 5 )
if py < -100 then py = winy
if py > winy then py = -100
end if
if Joy1y > 256 * 256 * 2 / 3 then
''here i wil place a hyperjump in the furture
end if
else
select case lower$( lastkey$ )
case chr$( _VK_LEFT )
pst = ( pst + 1 )
if pst > 32 then pst = 0
case chr$( _VK_RIGHT )
pst = ( pst - 1 )
if pst < 0 then pst = 32
case chr$( _VK_UP )
px = ( px - sin( strad( pst ) ) * 5 )
if px < -100 then px = winx
if px > winx then px = -100
py = ( py - cos( strad( pst ) ) * 5 )
if py < -100 then py = winy
if py > winy then py = -100
case chr$( _VK_DOWN )
''hyperjump
case chr$( 27 ) ''escape
goto [quit]
wait
case
#m "spritexy playerfire" ; firetel ;
; px - 16 - sin( strad( pst ) ) * 45 ;
; py - 16 - cos( strad( pst ) ) * 45
#m
; sin( strad( pst ) ) * -6 ;
; cos( strad( pst ) ) * -6
firetel = firetel + 1
if firetel > 20 then firetel = 0
end select
end if
lastkey$ =
#m "spritexy player
#m
for i = 0 to 10
#m
if x < -100 or x > winx + 100 _
or y < -100 or y > winy + 100 then
#m
end if
next i
#m
if ufox < -100 then
ufox = winx
ufohasfired = false
state = rnd( 0 ) * ( winx / 2 ) + winx / 4 - 35
end if
state = state - 1
if state < 0 and not( ufohasfired ) then
ufohasfired = true
dx = px - ufox
dy = py - ufoy
af = sqr( dx ^ 2 + dy ^ 2 ) + 1
#m
#m
end if
#m
if x < -100 then #m
if x > winx then #m
if y < -100 then #m
if y > winy then #m
#m "spritexy ufo
for i = 0 to 6
#m
if x < -100 then x = winx
if x > winx then x = -100
if y < -100 then y = winy
if y > winy then y = -100
#m
next i
''colisiondetecion and respons
#m
if instr( playerhit$ ,
or instr( playerhit$ ,
lives = lives - 1
if lives < 0 then
wait
else
call resetscene
end if
end if
#m
if instr( rockhit$ ,
and rockst( 0 ) = flies then
points = points + 1
call drawpoints
call rocksplit 0 , 1 , 2
end if
for i = 1 to 2
#m
if instr( rockhit$ ,
and rockst( i ) = flies then
points = points + 2
call drawpoints
if i = 1 then
call rocksplit 1 , 3 , 4
else
call rocksplit 2 , 5 , 6
end if
end if
next i
for i = 3 to 6
#m
if instr( rockhit$ ,
and rockst(
points = points + 4
call drawpoints
rockst( i ) = washit
#m
#m "spritemovexy rock" ; i ; " 0 0"
end if
next i
#m
if instr( ufohit$ ,
points = points + 7
#m
; rnd( 0 ) * ( winy / 2 ) + winy / 4 - 50
state = rnd( 0 ) * ( winx / 2 ) + winx / 4
ufohasfired = false
call drawpoints
end if
for i = 0 to 100
#m
if y > winy then
#m
#m
; rnd( 0 ) ^ 3 * 100
end if
next i
allwashit = true
if ufost <> washit then allwashit = false
for i = 0 to 6
if rock( i ) <> washit then allwashit = false
next i
if allwashit then call nextlevel
#m
wait
sub removefire
for i = 0 to 20
#m "spritexy playerfire" ; i ; " -100 -100"
#m "spritemovexy playerfire" ; i ; " 0 0"
next i
end sub
sub resetgame
level = 0
lives = 3
points = 0
ufohasfired = false
state = rnd( 0 ) * ( winx / 2 ) + winx / 4
call resetscene
end sub
sub resetscene
timer 0
call drawpoints
for i = 1 to 4
#m
next i
for i = 0 to 20
#m
next i
#m
px = winx / 2
py = winy / 2
#m
timer 40 , [tmr]
end sub
sub nextlevel
for i = 0 to 7
rockst( i ) = notjetactif
#m "spritexy rock" ; i ; " -100 -100"
#m "spritemovexy rock" ; i ; " 0 0"
next i
rockst( 0 ) = flies
#m
while abs( x ) = 0 or abs( y ) = 0
x = int( rnd( 0 ) * 7 - 3 )
y = int( rnd( 0 ) * 7 - 3 )
wend
#m "spritemovexy rock0
ufost = flies
level = level + 1
state = rnd( 0 ) * winx / 2 + winx / 2 - 50
#m
call resetscene
end sub
sub rocksplit no , a , b
dx = rockdx( no )
dy = rockdy( no )
rockst( no ) = washit
#m
#m "spritexy rock" ; no ;
#m "spritemovexy rock" ; no ;
#m "spritexy rock" ; a ;
rockst( a ) = flies
'' call rotate dx , dy , 120
while dx = 0 or dy = 0
dx = int( rnd( 0 ) * 5 - 2 )
dy = int( rnd( 0 ) * 5 - 2 )
wend
rockdx( a
#m
#m "spritexy rock" ; b ;
rockst( b ) = flies
'' call rotate dx , dy , 120
while dx = 0 or dy = 0
dx = int( rnd( 0 ) * 5 - 2 )
dy = int( rnd( 0 ) * 5 - 2 )
wend
rockdx( b
#m "spritemovexy rock" ; b ; " " ; dx ; " " ; dy
end sub
sub rotate byref k , byref l , deg
s = sin( deg * pi / 180 )
c = cos( deg * pi / 180 )
hk = k * c - l * s
hl = l * s + l * c
k = hk : l = lh
end sub
sub drawpoints
#m
#m "font Corier_New 50
#m "color green"
#m "backcolor black"
#m "goto 0 50"
#m "\POINTS :
#m
#m "\LEVEL :
#m
#m
for i = 0 to lives
#m
next i
for i = lives to 3
#m
next i
end sub
function strad( st )
strad = st * pi / 16
end function
[key]
lastkey$ = right$( Inkey$ , 1 )
wait
[gameover]
notice chr$( 13 ) _
+ "points : " + str$( points ) + chr$( 13 ) _
+ "GAME OVER !!!"
[quit]
unloadbmp
unloadbmp
unloadbmp
unloadbmp "rock"
for i = 0 to 31
unloadbmp
next i
close #m
end