This game is for Dark Basic Pro. Havent tried it in DB, but it just might work. Please play it in 640,480 windowed mode, fullscreen makes it run slow for some reason. Thats all, See how far you can get and enjoy!
Ohh forgot to tell you the controls..
arrow keys to move
space bar to fire.
sync on:sync rate 200:randomize rnd(2000):global x as integer:global y as integer:global score as integer:global level as integer:global lives as integer:x=420:y=300:score=0:level=0:lives=5:global invisibility as integer:invisibility=400:global anothercounter as integer
dim bullets(100):dim bulletsx(100):dim bulletsy(100):dim enemybullet(100):dim enemybulletx(100):dim enemybullety(100):dim enemy(100):dim enemyx(100):dim enemyy(100):newlevel():do:tempclick=0:invisibility=invisibility-1:if click=2 :click=0:ENDIF:if spacekey()=1 and click=0 then click=1:tempclick=5: else if click=1 and spacekey()=0 then click=2
text 0,0,"Score:"+str$(score):text 0,30,"Level:"+str$(level):text 0,60,"Lives:"+str$(lives):if upkey()=1 and y>300:y=y-1:ENDIF:if downkey()=1 and y<460:y=y+1:ENDIF:if rightkey()=1 and x<590:x=x+1:ENDIF:if leftkey()=1 and x>30:x=x-1:ENDIF:if tempclick=5 then fire()
for xxx=1 to 100:if bullets(xxx)=1 then bulletsy(xxx)=bulletsy(xxx)-2:ink RGB(255,255,0),0:circle bulletsx(xxx),bulletsy(xxx),1:ink RGB(255,255,255),0:if bulletsy(xxx)<1 then bullets(xxx)=0
if enemy(xxx)>0:temp1=enemyx(xxx)+rnd(8)-4:ENDIF:if temp1>64 and temp1<562:enemyx(xxx)=temp1:ENDIF:if enemy(xxx)>0:temp2=enemyy(xxx)+rnd(8)-4:ENDIF:if temp2>64 and temp2<225:enemyy(xxx)=temp2:ENDIF:randomnum=rnd(200):if enemy(xxx)>0 and enemybullet(xxx)=0 and randomnum=52 then enemybullet(xxx)=1:enemybulletx(xxx)=enemyx(xxx):enemybullety(xxx)=enemyy(xxx):
if enemybullet(xxx)=1 then enemybullety(xxx)=enemybullety(xxx)+2:ink RGB(255,0,0),0:circle enemybulletx(xxx),enemybullety(xxx),1:ink RGB(255,255,255),0:if enemybullety(xxx)>480 then enemybullet(xxx)=0
if enemybulletx(xxx)>x-13 and enemybulletx(xxx)<x+25 and enemybullety(xxx)>y-6 and enemybullety(xxx)<y+12 and invisibility<1 then lives=lives-1:if lives>0 then cls:sync:center text 320,240,"HAHAHAHAHA":sync:wait 2000:center text 320,260,"READY?":sync:wait 2000:center text 320,280,"GO!!":sync:wait 1500:invisibility=400:else:goto YOUJUSTDIED
for yyy=1 to 20 : if bullets(yyy)=1 and cordcheck(bulletsx(yyy),bulletsy(yyy),enemyx(xxx),enemyy(xxx))=1:enemy(xxx)=0:score=score+100:enemyx(xxx)=-10000:enemyy(xxx)=-10000:bullets(yyy)=0:bulletsx(yyy)=-10000:bulletsy(yyy)=-10000:ENDIF:next yyy : next xxx:for xxx=1 to 100 :if enemy(xxx)>0:goto getmeouttahere4:ENDIF:next xxx:newlevel()
getmeouttahere4:drawenemy():drawship(x,y):sync:cls 0:loop
function newenemy():for xxx=1 to 100:if enemy(xxx)=0 :enemy(xxx)=rnd(2)+1:enemyx(xxx)=rnd(500)+60:enemyy(xxx)=rnd(170)+50:goto getmeouttahere3:ENDIF:next xxx
getmeouttahere3:endfunction:function drawenemy():for xxx=1 to 100:randomx=rnd(255):randomy=rnd(255):randomz=rnd(255):if enemy(xxx)=1 :ink rgb(randomx,randomy,randomz),0:circle enemyx(xxx),enemyy(xxx),15:circle enemyx(xxx)-6,enemyy(xxx)-3,3:circle enemyx(xxx)+6,enemyy(xxx)-3,3:circle enemyx(xxx),enemyy(xxx)+5,5:ink rgb(255,255,255),0:ENDIF:if enemy(xxx)=2:drawsquare(enemyx(xxx),enemyy(xxx)): ink rgb(randomx,randomy,randomz),0:circle enemyx(xxx)+6-15,enemyy(xxx)+6-15,3: circle enemyx(xxx)+24-15,enemyy(xxx)+6-15,3:line enemyx(xxx)+3-15,enemyy(xxx)+25-15,enemyx(xxx)+27-15,enemyy(xxx)+25-15:ENDIF
ink rgb(255,255,255),0:if enemy(xxx)=3 :ink RGB(randomx,randomy,randomz),0:line enemyx(xxx),enemyy(xxx),enemyx(xxx)+15,enemyy(xxx)+30:line enemyx(xxx)+15,enemyy(xxx)+30,enemyx(xxx)-15,enemyy(xxx)+30:line enemyx(xxx)-15,enemyy(xxx)+30,enemyx(xxx),enemyy(xxx):circle enemyx(xxx)-3,enemyy(xxx)+10,3:circle enemyx(xxx)+3,enemyy(xxx)+10,3:circle enemyx(xxx),enemyy(xxx)+23,5:ENDIF:next xxx
endfunction:function drawsquare(a,b):ink rgb(rnd(255),rnd(255),rnd(255)),0:line a-15,b-15,a+30-15,b-15:line a+30-15,b-15,a+30-15,b+30-15:line a+30-15,b+30-15,a-15,b+30-15:line a-15,b+30-15,a-15,b-15:ink RGB(255,255,255),0
endfunction:function drawship(a,b):if invisibility>0 then ink RGB(rnd(255),rnd(255),0),0:line a,b,a+6,b-6:line a+6,b-6,a+12,b:line a+12,b,a+25,b+12:line a+25,b+12,a-13,b+12:line a-13,b+12,a,b:ink rgb(255,255,255),0 :else ink rgb(255,255,255),0:line a,b,a+6,b-6:line a+6,b-6,a+12,b:line a+12,b,a+25,b+12:line a+25,b+12,a-13,b+12:line a-13,b+12,a,b:ink rgb(255,255,255),0
endfunction:function fire():for xx=1 to 20:if bullets(xx)=0 :bulletsx(xx)=x+6:bulletsy(xx)=y-6 :bullets(xx)=1 :goto getmeouttahere : ENDIF:next xx
getmeouttahere:endfunction:function cordcheck(a,b,c,d):thevalue=0:if a>=c-15 and a<=c+15 and b>=d-15 and b<=d+15 then thevalue=1
endfunction thevalue:function newlevel() :level=level+1:anothercounter=anothercounter+1:invisibility=400:for xxx=1 to 100 : bullets(xxx)=0 : next xxx:ink RGB(255,255,255),0
for yyyy=0 to 239:line 0,yyyy,639,yyyy:line 0,479-yyyy,639,479-yyyy:sync:next yyyy:ink 0,0:for yyyy=239 to 0 step -1:line 0,yyyy,639,yyyy:line 0,479-yyyy,639,479-yyyy:sync:next yyyy:ink RGB(255,255,255),0:for xxx=1 to level+3:newenemy():next xxx:if anothercounter=5 then anothercounter=0:lives=lives+1
endfunction
YOUJUSTDIED:cls:center text 320,240,"AWWWWW GAME OVER DUDE!!!!!":sync:wait 2000:center text 320,260,"YOU REACHED LEVEL "+str$(level)+", GNARLY!!!":sync:wait 2000:center text 320,280,"GOOD JOB YOU SCORED "+str$(score)+" Points!!!! MONDO DUDE!!!!!":sync:wait 3000:end