logoGhosty Website!!!!!!!!!!!!!!!!!!!!
Cool Stuff i made

credits for aidungeon pals :)


chatroom!!!!one


Tank Game for SmileBASIC 3.8 (3DS) Code
  £" å  XSCREEN 1 DISPLAY 0 DIM BULLETS[0] DIM BULDUR[0] DIM BULSOURCE[0] DIM BULLETX[0] DIM BULLETY[0] DIM ENEMYX[0] DIM ENEMYY[0] DIM ENEMYR1[0] DIM ENEMYR2[0] DIM ENEMYHP[0] DIM ENEMYDANIM[0] DIM ENEMYTARGETX[0] DIM ENEMYTARGETY[0] DIM ENEMYBTIMER[0] DIM TREESX[0] DIM TREESY[0] HPUPT=990 HPUPX=0 HPUPY=0 GOALSCORE=20 FOR ENEMIES=1 TO 3 UNSHIFT ENEMYX,RND(90) UNSHIFT ENEMYY,RND(90) UNSHIFT ENEMYR1,RND(360) UNSHIFT ENEMYR2,RND(360) UNSHIFT ENEMYHP,20 UNSHIFT ENEMYDANIM,0 UNSHIFT ENEMYTARGETX,RND(90) UNSHIFT ENEMYTARGETY,RND(90) UNSHIFT ENEMYBTIMER,RND(50) NEXT FOR TREES=1 TO 4 UNSHIFT TREESX,RND(90) UNSHIFT TREESY,RND(90) NEXT COMMON DEF LINE IX,IY,EX,EY GLINE IX*12+198,-IY*12+120,EX*12+198,-EY*12+120 END GCLS CLS COMMON DEF DRAWMODEL MODEL,X,Y,Z,ANG,ROT,SCALE RESTORE MODEL READ LENGTH FOR I=1 TO LENGTH READ X1,Y1,Z1,X2,Y2,Z2 XA1=X1*SIN(RAD(ROT))+X+Z1*COS(RAD(ROT)) XA2=X2*SIN(RAD(ROT))+X+Z2*COS(RAD(ROT)) ZA1=Z1*SIN(RAD(ROT))+Z-X1*COS(RAD(ROT)) ZA2=Z2*SIN(RAD(ROT))+Z-X2*COS(RAD(ROT)) LINE (XA1)*SCALE,(ZA1/ANG+Y1)*SCALE+(Y/ANG),(XA2)*SCALE,(ZA2/ANG+Y2)*SCALE+(Y/ANG) NEXT END @TITLESCREEN GOFS 0,0 I=0 BGMPLAY 13 GCOLOR RGB(255,255,255) WHILE BUTTON(0)!=16 DRAWMODEL @TANKTITLE,2,30,0,9,90,1 DRAWMODEL @TANKBODY,0,0,0,9,I/2,1 DRAWMODEL @TANKHEAD,0,0,0,9,I/2+SIN(I/9)*9,1 LOCATE 20,20 PRINT " - Start LOCATE 20,21 PRINT " - Quit I=I+1 WAIT 1 CLS GCLS IF BUTTON(0)==32 THEN GOTO @QUIT WEND LIVES=3 STOPSWITCH=0 HP=100 SCORE=0 BGMPLAY 23 WHILE BUTTON(0)!=32 FRAMES=FRAMES+1 I=I+1 IF HP>0 THEN STICK OUT CX,CY IF BUTTON(0)==512 OR BUTTON(0)==512+16 THEN B=B-ORS ORS=ORS+0.7 IF BUTTON(0)==256 OR BUTTON(0)==256+16 THEN B=B+ORS ORS=ORS+0.7 IF BUTTON(0)==0 THEN ORS=0 IF ORS>10 THEN ORS=10 COLOR 15,0 GCOLOR RGB(0,255,0) DRAWMODEL @TANKBODY,X,-Y/2,0,2,D+0+180,0.2 DRAWMODEL @TANKHEAD,X,-Y/2,0,2,B+0+180,0.2 GOFS X*2.3,Y*2.8 IF BUTTON(0)==16 OR BUTTON(0)==512+16 OR BUTTON(0)==256+16 THEN IF CT==0 THEN BEEP 2,-2000 CT=10 UNSHIFT BULLETS, RAD((DEG(RAD(B))+90)) UNSHIFT BULDUR, 40 UNSHIFT BULSOURCE, 0 UNSHIFT BULLETX, X UNSHIFT BULLETY, -Y/2+1 ENDIF IF CT != 0 THEN CT=CT-1 IF CX!=0 AND CY!=0 THEN BEEP 1, -4000 DA=DEG(ATAN(0,0)-ATAN(CX,CY)) X=X+CX Y=Y-CY D=DEG(ATAN(0,0)-ATAN(CX,CY)) ENDIF ELSE gCOLOR RGB(128,128,128) DRAWMODEL @DEAD,X,-Y/2,0,2,D+0+180,0.2 IF LIVES==0 AND HP<0 THEN STOPSWITCH=0 ELSEIF RESPAWNTIMER==0 AND HP==0 THEN RESPAWNTIMER=90 DEC LIVES ENDIF ENDIF IF RESPAWNTIMER !=0 THEN DEC RESPAWNTIMER IF RESPAWNTIMER ==1 THEN HP=100 @BCHECK 'ROUTINE TO CHECK/HANDLE BULLET STUFF FOR I=1 TO LEN(BULDUR) IF BULDUR[I-1]==0 THEN THROW= POP(BULDUR) THROW= POP(BULLETS) THROW= POP(BULSOURCE) THROW= POP(BULLETX) THROW= POP(BULLETY) GOTO @BCHECK ELSE IF BULSOURCE[I-1]==0 THEN GCOLOR RGB(0,255,0) IF BULSOURCE[I-1]!=0 THEN GCOLOR RGB(255,0,0) DRAWMODEL @BLOCK,BULLETX[I-1],BULLETY[I-1],0,2,DEG(BULLETS[I-1]),0.2 BULLETX[I-1]=BULLETX[I-1]+COS((BULLETS[I-1]))*5/(1+BULSOURCE[I-1]) BULLETY[I-1]=BULLETY[I-1]+SIN((BULLETS[I-1]))/(1+BULSOURCE[I-1]) DEC BULDUR[I-1],1 ENDIF IF BULSOURCE[I-1]==0 THEN FOR E=1 TO LEN(ENEMYHP) THROW= ENEMYHP[E-1] IF ENEMYHP[E-1] > 0 THEN IF ROUND(BULLETX[I-1]/5)==ROUND(ENEMYX[E-1]/5) AND ROUND(BULLETY[I-1]/2/5)==ROUND(-ENEMYY[E-1]/2/10) THEN BEEP 11 DEC ENEMYHP[E-1] BULDUR[I-1]=0 NEXT ELSEIF BULSOURCE[I-1]==1 THEN IF ROUND(BULLETX[I-1]/5)==ROUND(X/5) AND ROUND(BULLETY[I-1]/2/5)==ROUND(-Y/2/10) THEN BEEP 13 DEC HP THROW= POP(BULDUR) THROW= POP(BULLETS) THROW= POP(BULSOURCE) THROW= POP(BULLETX) THROW= POP(BULLETY) ENDIF ENDIF THROW= BULS NEXT GCOLOR RGB(255,0,0) FOR E=1 TO LEN(ENEMYX) IF ENEMYHP[E-1] > 0 THEN IF ENEMYDANIM[1] != 0 THEN ENEMYDANIM[E-1]=90 ELSE ENDIF DRAWMODEL @TANKBODY,ENEMYX[E-1],-ENEMYY[E-1]/2,0,2,ENEMYR1[E-1]+0+180,0.2 DRAWMODEL @TANKHEAD,ENEMYX[E-1],-ENEMYY[E-1]/2,0,2,ENEMYR2[E-1]+0+180,0.2 ENEMYR1[E-1]=DEG(ATAN(ENEMYTARGETX[E-1]-ENEMYX[E-1],ENEMYTARGETY[E-1]-ENEMYY[E-1])) ENEMYR2[E-1]=DEG(ATAN(X-ENEMYX[E-1],Y*2-ENEMYY[E-1]*2))-180 'BX=BX+5*COS(ANG) 'BY=BY+5*SIN(ANG) IF ENEMYBTIMER[E-1]==0 THEN IF RND(2)==1 THEN ENEMYBTIMER[E-1]=50 BEEP 2,-2000 CT=10 UNSHIFT BULLETS, RAD((DEG(RAD(ENEMYR2[E-1]))+90)) UNSHIFT BULDUR, 40 UNSHIFT BULSOURCE, 1 UNSHIFT BULLETX, ENEMYX[E-1] UNSHIFT BULLETY, -ENEMYY[E-1]/2+1 ENDIF ELSE DEC ENEMYBTIMER[E-1] ENDIF ENEMYX[E-1]=ENEMYX[E-1]-(5*(COS(ENEMYR1[E-1]))/12) ENEMYY[E-1]=ENEMYY[E-1]+(5*(SIN(ENEMYR1[E-1]))/12) IF ROUND(ENEMYX[E-1]/20)==ROUND(ENEMYTARGETX[E-1]/20) AND ROUND(ENEMYY[E-1]/20)==ROUND(ENEMYTARGETY[E-1]/20) THEN ENEMYTARGETX[E-1]=RND(90) ENEMYTARGETY[E-1]=RND(90) ELSEIF ENEMYDANIM[E-1]==1 THEN ENEMYX[E-1]=RND(90) ENEMYY[E-1]=RND(90) ENEMYR1[E-1]=RND(360) ENEMYR2[E-1]=RND(360) ENEMYHP[E-1]=20 ELSEIF ENEMYHP[E-1]==0 AND ENEMYDANIM[E-1]==0 THEN ENEMYDANIM[E-1]=90 ELSEIF ENEMYDANIM[E-1]>0 THEN DEC ENEMYDANIM[E-1] GCOLOR RGB(128,128,128) DRAWMODEL @DEAD,ENEMYX[E-1],-ENEMYY[E-1]/2,0,2,ENEMYR1[E-1]+0+180,0.2 GCOLOR RGB(255,0,0) ENDIF IF ENEMYDANIM[E-1]==89 THEN BEEP 124 INC SCORE NEXT GCOLOR RGB(180,255,0) FOR T=1 TO LEN(TREESX) DRAWMODEL @TREE,TREESX[T-1],-TREESY[T-1]/2,0,2,0+0+180,0.2 NEXT CLS PRINT "♡",LIVES PRINT "",HP PRINT "",SCORE LOCATE 28,0 PRINT "FRAMES PASSED",FRAMES VSYNC IF BUTTON(0)==32 THEN HP=0 WHILE BUTTON(0)==32 WEND IF LIVES==-1 THEN LIVES=0 GOTO @GAMEOVER GCLS RGB(0,64,0) IF SCORE==GOALSCORE THEN BEEP 007 GOALSCORE=GOALSCORE+20 LIVES=LIVES+1 WEND @BLOCK DATA 12 DATA 1,1,1,1,-1,1 DATA 1,-1,1,-1,-1,1 DATA -1,-1,1,-1,-1,-1 DATA -1,-1,-1,1,-1,-1 DATA 1,-1,-1,1,1,-1 DATA 1,1,-1,1,1,1 DATA -1,1,-1,1,1,-1 DATA 1,-1,1,1,-1,-1 DATA -1,1,-1,-1,1,1 DATA 1,1,1,-1,1,1 DATA -1,1,1,-1,-1,1 DATA -1,1,-1,-1,-1,-1 @TANKBODY DATA 28 DATA 5,2,5,5,2,-5 DATA -5,2,5,-5,2,-5 DATA -5,2,5,5,2,5 DATA -5,2,-5,5,2,-5 DATA 8,-1,5,8,-1,-5 DATA -8,-1,5,-8,-1,-5 DATA -8,-1,5,8,-1,5 DATA -8,-1,-5,8,-1,-5 DATA 5,2,5,8,-1,5 DATA 5,2,-5,8,-1,-5 DATA -5,2,5,-8,-1,5 DATA -5,2,-5,-8,-1,-5 DATA -6,-2,-4.5,6,-2,-4.5 DATA -6,-2,-4.5,-7,-1,-4.5 DATA 6,-2,-4.5,7,-1,-4.5 DATA -6,-2,-2.5,6,-2,-2.5 DATA -6,-2,-2.5,-7,-1,-2.5 DATA 6,-2,-2.5,7,-1,-2.5 DATA -6,-2,-2.5,-6,-2,-4.5 DATA 6,-2,-2.5,6,-2,-4.5 DATA -6,-2,4.5,6,-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5.5,0,-2,6,0 DATA 2,6,0,2,5.5,0 @GAMEOVER DIM LOL[0] GSAVE 0,X*2.3,Y*2.8,512,512,LOL,1 BGMPLAY 6 CLS :LOCATE 20,13 PRINT "You Lose!" WHILE BGMCHK()==1 WEND GOFS 0,0 GLOAD 0,0,512,512,LOL,1,0 FOR I=1 TO 239/2+1 WAIT 1 GCOLOR RGB(0,0,0) GLINE 0,I,399,I GLINE 0,-I+240,399,-I+240 NEXT GOTO @TITLESCREEN @TANKTITLE DATA 13 'T DATA -8,6,0,-6,6,0 DATA -7,6,0,-7,3,0 'A DATA -4,6,0,-5,4,0 DATA -4,6,0,-3,4,0 DATA -5,4,0,-5,3,0 DATA -3,4,0,-3,3,0 DATA -3,4,0,-5,4,0 'N DATA -2,6,0,-2,3,0 DATA 0,6,0,0,3,0 DATA -2,6,0,0,3,0 'K DATA 1,6,0,1,3,0 DATA 1,4.5,0,3,6,0 DATA 1,4.5,0,3,3,0 @TREE DATA 56-12 DATA 1,-2.7,0,1,3,0 DATA 0,-2.7,1,0,3,1 DATA -1,-2.7,0,-1,3,0 DATA 0,-2.7,-1,0,3,-1 DATA 1,-2.7,0,0,-2.7,1 DATA 0,-2.7,1,-1,-2.7,0 DATA -1,-2.7,0,0,-2.7,-1 DATA 0,-2.7,-1,1,-2.7,0 DATA 3,3,3,-3,3,3 DATA -3,3,3,-5,3,0 DATA -5,3,0,-3,3,-3 DATA -3,3,-3,3,3,-3 DATA 3,3,3,5,3,0 DATA 5,3,0,3,3,-3 DATA 3,3,3,2,5,2 DATA -3,3,3,-2,5,2 DATA -5,3,0,-4,5,0 DATA -3,3,-3,-2,5,-2 DATA 3,3,-3,2,5,-2 DATA 5,3,-0,4,5,-0 '2 DATA 3,5,3,-3,5,3 DATA -3,5,3,-5,5,0 DATA -5,5,0,-3,5,-3 DATA -3,5,-3,3,5,-3 DATA 3,5,3,5,5,0 DATA 5,5,0,3,5,-3 DATA 3,5,3,2,7,2 DATA -3,5,3,-2,7,2 DATA -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