Post by
MaxFNPower »
https://forums.nicoclub.com/maxfnpower-u86168.html
Sat Apr 19, 2008 11:24 pm
****Dark Basic***`setupset display mode 800,600,32cls#include enemy.dbahide mouseEnable TnLSET Emulation OFFsync onsync rate 100backdrop oncolor backdrop rgb(100,100,100)hide mouse`load soundsload sound "explode2.wav",1load sound "tone.wav",2`load imagesload image "ship1.jpg",1load image "ship2.jpg",2load image "bullet.bmp",1000load image "smallbullet.bmp",1050load image "alien2.bmp",500load image "stars.bmp",65000`load musicload music "Overclocked.mid",1`sprites yay`shipsprite 1,100,100,1`enemysprite 2,400,300,500`ammosprite 3,2000,2000,1000set sprite 1,1,1set sprite 2,1,1`int settexture backdrop 65000play music 1shipx=200shipy=300shipxd=50shipyd=100 shipimg=1shipspeed=3shot=0bulletlittle=1`bullet delay varbd=12rem do loopdorem externals ********************************************************enemy()
`***********************************************************************debug()sync`ship managmentif shipimg=2 then shipimg=1 else shipimg=2if shipx>740 then shipstopright=1 else shipstopright=0if shipy>565 then shipstopdown=1 else shipstopdown=0 if shipx<0 then shipstopleft=1 else shipstopleft=0if shipy<0 then shipstopup=1 else shipstopup=0sprite 1,shipx,shipy,shipimg `ship controls
`Little gun sprite number 4-20`Control`Bullet 1if controlkey()=1 and bulletlittle1life=0 and bulletlittle=1 and littledelay=0bulletlittle1x=shipx+60bulletlittle1y=shipy+10bulletlittle1life=1bulletlittle=2play sound 2littledelay=bdendif`Bullet 2if controlkey()=1 and bulletlittle2life=0 and bulletlittle=2 and littledelay=0bulletlittle2x=shipx+60bulletlittle2y=shipy+10bulletlittle2life=1bulletlittle=3play sound 2littledelay=bdendif`Bullet 3if controlkey()=1 and bulletlittle3life=0 and bulletlittle=3 and littledelay=0bulletlittle3x=shipx+60bulletlittle3y=shipy+10bulletlittle3life=1bulletlittle=4play sound 2littledelay=bdendif`Bullet 4if controlkey()=1 and bulletlittle4life=0 and bulletlittle=4 and littledelay=0bulletlittle4x=shipx+60bulletlittle4y=shipy+10bulletlittle4life=1bulletlittle=5play sound 2littledelay=bdendif`Bullet 5if controlkey()=1 and bulletlittle5life=0 and bulletlittle=5 and littledelay=0bulletlittle5x=shipx+60bulletlittle5y=shipy+10bulletlittle5life=1bulletlittle=6play sound 2littledelay=bdendif`Bullet 6if controlkey()=1 and bulletlittle6life=0 and bulletlittle=6 and littledelay=0bulletlittle6x=shipx+60bulletlittle6y=shipy+10bulletlittle6life=1bulletlittle=7play sound 2littledelay=bdendif`Bullet 7if controlkey()=1 and bulletlittle7life=0 and bulletlittle=7 and littledelay=0bulletlittle7x=shipx+60bulletlittle7y=shipy+10bulletlittle7life=1bulletlittle=8play sound 2littledelay=bdendif`Bullet 8if controlkey()=1 and bulletlittle8life=0 and bulletlittle=8 and littledelay=0bulletlittle8x=shipx+60bulletlittle8y=shipy+10bulletlittle8life=1bulletlittle=9play sound 2littledelay=bdendif`Bullet 9if controlkey()=1 and bulletlittle9life=0 and bulletlittle=9 and littledelay=0bulletlittle9x=shipx+60bulletlittle9y=shipy+10bulletlittle9life=1bulletlittle=10play sound 2littledelay=bdendif`Bullet 10if controlkey()=1 and bulletlittle10life=0 and bulletlittle=10 and littledelay=0bulletlittle10x=shipx+60bulletlittle10y=shipy+10bulletlittle10life=1bulletlittle=11play sound 2littledelay=bdendif`Bullet 11if controlkey()=1 and bulletlittle11life=0 and bulletlittle=11 and littledelay=0bulletlittle11x=shipx+60bulletlittle11y=shipy+10bulletlittle11life=1bulletlittle=12play sound 2littledelay=bdendif`Bullet 12if controlkey()=1 and bulletlittle12life=0 and bulletlittle=12 and littledelay=0bulletlittle12x=shipx+60bulletlittle12y=shipy+10bulletlittle12life=1bulletlittle=13play sound 2littledelay=bdendif`Bullet 13if controlkey()=1 and bulletlittle13life=0 and bulletlittle=13 and littledelay=0bulletlittle13x=shipx+60bulletlittle13y=shipy+10bulletlittle13life=1bulletlittle=14play sound 2littledelay=bdendif`Bullet 14if controlkey()=1 and bulletlittle14life=0 and bulletlittle=14 and littledelay=0bulletlittle14x=shipx+60bulletlittle14y=shipy+10bulletlittle14life=1bulletlittle=15play sound 2littledelay=bdendif`Bullet 15if controlkey()=1 and bulletlittle15life=0 and bulletlittle=15 and littledelay=0bulletlittle15x=shipx+60bulletlittle15y=shipy+10bulletlittle15life=1bulletlittle=16play sound 2littledelay=bdendif`Bullet 16if controlkey()=1 and bulletlittle16life=0 and bulletlittle=16 and littledelay=0bulletlittle16x=shipx+60bulletlittle16y=shipy+10bulletlittle16life=1bulletlittle=17play sound 2littledelay=bdendif`Bullet 17if controlkey()=1 and bulletlittle17life=0 and bulletlittle=17 and littledelay=0bulletlittle17x=shipx+60bulletlittle17y=shipy+10bulletlittle17life=1bulletlittle=18play sound 2littledelay=bdendif`returnerif bulletlittle=18 then bulletlittle=1if littledelay>0 then littledelay=littledelay-1`Action`Bullet 1if bulletlittle1life=1sprite 4,bulletlittle1x,bulletlittle1y,1050bulletlittle1x=bulletlittle1x+5if bulletlittle1x>1000 then bulletlittle1life=0endif`Bullet 2if bulletlittle2life=1sprite 5,bulletlittle2x,bulletlittle2y,1050bulletlittle2x=bulletlittle2x+5if bulletlittle2x>1000 then bulletlittle2life=0endif`Bullet 3if bulletlittle3life=1sprite 6,bulletlittle3x,bulletlittle3y,1050bulletlittle3x=bulletlittle3x+5if bulletlittle3x>1000 then bulletlittle3life=0endif`Bullet 4if bulletlittle4life=1sprite 7,bulletlittle4x,bulletlittle4y,1050bulletlittle4x=bulletlittle4x+5if bulletlittle4x>1000 then bulletlittle4life=0endif`Bullet 5if bulletlittle5life=1sprite 8,bulletlittle5x,bulletlittle5y,1050bulletlittle5x=bulletlittle5x+5if bulletlittle5x>1000 then bulletlittle5life=0endif`Bullet 6if bulletlittle6life=1sprite 9,bulletlittle6x,bulletlittle6y,1050bulletlittle6x=bulletlittle6x+5if bulletlittle6x>1000 then bulletlittle6life=0endif`Bullet 7if bulletlittle7life=1sprite 10,bulletlittle7x,bulletlittle7y,1050bulletlittle7x=bulletlittle7x+5if bulletlittle7x>1000 then bulletlittle7life=0endif`Bullet 8if bulletlittle8life=1sprite 11,bulletlittle8x,bulletlittle8y,1050bulletlittle8x=bulletlittle8x+5if bulletlittle8x>1000 then bulletlittle8life=0endif`Bullet 9if bulletlittle9life=1sprite 12,bulletlittle9x,bulletlittle9y,1050bulletlittle9x=bulletlittle9x+5if bulletlittle9x>1000 then bulletlittle9life=0endif`Bullet 10if bulletlittle10life=1sprite 13,bulletlittle10x,bulletlittle10y,1050bulletlittle10x=bulletlittle10x+5if bulletlittle10x>1000 then bulletlittle10life=0endif`Bullet 11if bulletlittle11life=1sprite 14,bulletlittle11x,bulletlittle11y,1050bulletlittle11x=bulletlittle11x+5if bulletlittle11x>1000 then bulletlittle11life=0endif`Bullet 12if bulletlittle12life=1sprite 15,bulletlittle12x,bulletlittle12y,1050bulletlittle12x=bulletlittle12x+5if bulletlittle12x>1000 then bulletlittle12life=0endif`Bullet 13if bulletlittle13life=1sprite 16,bulletlittle13x,bulletlittle13y,1050bulletlittle13x=bulletlittle13x+5if bulletlittle13x>1000 then bulletlittle13life=0endif`Bullet 14if bulletlittle14life=1sprite 17,bulletlittle14x,bulletlittle14y,1050bulletlittle14x=bulletlittle14x+5if bulletlittle14x>1000 then bulletlittle14life=0endif`Bullet 15if bulletlittle15life=1sprite 18,bulletlittle15x,bulletlittle15y,1050bulletlittle15x=bulletlittle15x+5if bulletlittle15x>1000 then bulletlittle15life=0endif`Bullet 16if bulletlittle16life=1sprite 19,bulletlittle16x,bulletlittle16y,1050bulletlittle16x=bulletlittle16x+5if bulletlittle16x>1000 then bulletlittle16life=0endif`Bullet 17if bulletlittle17life=1sprite 20,bulletlittle17x,bulletlittle17y,1050bulletlittle17x=bulletlittle17x+5if bulletlittle17x>1000 then bulletlittle17life=0endif`**************************************************`Big Gun`controlif spacekey()=1 and bulletbiglife=0 bulletbigx=shipxbulletbigy=shipybulletbiglife=1play sound 1endif`actionif bulletbiglife=1sprite 3,bulletbigx,bulletbigy,1000bulletbigx=bulletbigx+10if bulletbigx>1000 then bulletbiglife=0endif`shipif upkey()=1 and shipstopup=0 then shipy=shipy-shipspeedif downkey()=1 and shipstopdown=0 then shipy=shipy+shipspeedif leftkey()=1 and shipstopleft=0 then shipx=shipx-shipspeedif rightkey()=1 and shipstopright=0 then shipx=shipx+shipspeed`if shot=1 and bulletlife=0`sprite 3,shipx,shipy,1000`endif
loop
function debug()gg=screen fps()print " fps ",gg,""endfunction