You are a spaceship in an asteroid field. Try to collect the gold. But try NOT to touch those big asteroids.
First time I used sprites. I wonder why its slow (20fps) with 7 sprites :S
set display mode 640,480,32 : hide mouse : sync on : sync rate 0 : create bitmap 1,30,10 : set current bitmap 1 : ink rgb(200,200,200),0 : box 0,0,29,9
ink rgb(155,155,200),0 : box 20,0,29,3 : ink 0,0 : line 3,0,19,0 : line 4,1,19,1 : dot 28,0 : dot 20,0 : get image 1,0,0,29,9 : delete bitmap 1 : create bitmap 1,60,60
set current bitmap 1 : ink rgb(200,200,200),0 : for a=1 to 30 : circle 30,30,a : next a : get image 3,0,0,59,59 : delete bitmap 1 : create bitmap 1,6,6 : set current bitmap 1 : ink rgb(255,255,0),0
circle 2,2,2 : circle 2,2,3 : get image 4,0,0,5,5 : delete bitmap 1 : set current bitmap 0 : ink rgb(230,230,255),0 : for a=0 to 200 : dot rnd(640),rnd(480) : next a
create bitmap 1,7,100 : create bitmap 2,7,100 : set current bitmap 1 : ink rgb(0,255,0),0 : box 0,0,6,99 : get image 1000,0,0,6,99 : set current bitmap 2 : ink rgb(255,0,0),0
box 0,0,6,99 : get image 1001,0,0,6,99 : delete bitmap 1 : delete bitmap 2 : set current bitmap 0 : player_x=120 : player_y=240 : life=100 : dim laser_beam(50,2)
randomize timer() : for a=0 to 5 : laser_beam(a,1)=220+rnd(420) : laser_beam(a,2)=int(a*(480/5)) : next a : do : inc time : if life<0 : cls : for a=1 to 200 : center text 320,230,"YOU DIED" : next a
end : endif : sprite 1001,5,0,1001 : sprite 1000,5,100-life,1000 : stretch sprite 1000,100,life : sprite 1,player_x,player_y,1 : if upkey()=1 then player_y=player_y-2
if downkey()=1 : player_y=player_y+2 : endif : if leftkey()=1 : player_x=player_x-2 : endif : if rightkey()=1 : player_x=player_x+2 : endif : for a=0 to 5
if a<>5 : laser_x=laser_beam(a,1)-6 : else : laser_x=laser_beam(a,1)-3 : endif : laser_beam(a,1)=laser_x : if laser_x<10 : laser_beam(a,1)=640 : endif
laser_y=laser_beam(a,2)+sin((time*2)+(a^3))*100 : if a<>5 : sprite a+5,laser_x,laser_y,3 : else : sprite a+5,laser_x,laser_y,4 : endif : next a
hit=sprite collision(1,0) : if hit=>5 and hit<>10 : dec life : endif : if hit=10 then laser_beam(5,2)=int(sqrt(rnd(480)*rnd(480))) : laser_beam(5,1)=640 : score=score+100
if player_x<0 : player_x=0 : endif : if player_x>610 : player_x=610 : endif : if player_y<0 : player_y=0 : endif : if player_y>630 : player_y=630 : endif : ink 0,0 : box 1,450,120,479 : ink rgb(255,255,255),0
text 1,465,"SCORE: "+str$(score) : sync : loop
Quote: "
Amd 2500+ | 1024mb pc2700 | A7N8X-X | Geforce4 ti 4200 128mb"