スピーディーなシューティングタイプのアクションゲームだ。
自機「スルーカ」を十字ボタンで操って、スターを逃さず取っていこう。スルーカの通ったあとは不毛の大地が緑に変わるオマケ付き。
壁や赤い敵機に当たれば1ミス。Aボタンで敵機を倒すボムが発射できるので、ここぞという場面で使っていこう。ボムの残量は画面上部のゲージで確認できるぞ。スターを取り続ければゲージは回復する。
STARTボタンはポーズに使う。ゲーム終了はR+STARTボタンだ。
キミはスターを連続で取るCHAINカウントをどこまで稼げるかな?
petacorn
BASICで書くのは二十数年ぶりじゃわい。
- ’************
- ’スル-カ
- CLEAR:CLS
- VISIBLE 1,1,0,0,0,0
- ’
- GW=256:GH=192
- CW=32:CH=24
- BGW=64:BGH=64
- FOR I=0 TO 31:SP$=SP$+” ”:NEXT
- ’
- FPS=0:CNTL=0:CNTF=0
- REQ=0:FLW=-1
- BTN=0:BTNO=0:BTND=0
- TMR=0:PAUSE=0
- SCORE=0:HISCORE=10000:SCMAX=500000
- LIFE=0:LIFEMAX=3
- LEVEL=0:LEVELMAX=99
- CHAIN=0:CHAINMAX=0:CHAINMUL=10
- CHG=0:CHGMAX=16
- SCRX=0:SCRY=0:BGPY=0
- SSPD=0:SSPDMIN=2:SSPDMAX=6
- STMR=0:STMRMIN=60*20:STMRMAX=0
- RX=0:RW=0:RWMIN=13:RWMAX=18
- BTMR=-1:BTMRMAX=30
- CTMR=0:CTMRMAX=48
- ETMR=0:ETMRMIN=32:ETMRMAX=0
- PW=8:PH=8:PWH=PW/2:PHH=PH/2
- PX=0:PY=0:PSPD=2
- OX=8:OY=8
- BCSH=5:BSH=(BCSH*2+1)*8/2
- ’
- DIM RANK(10)
- FOR I=0 TO 10-1
- RANK(I)=HISCORE-I*1000
- NEXT
- DIM BC(4),BP(4)
- BC(0)=&H020:BP(0)=1
- BC(1)=&H30F:BP(1)=2
- BC(2)=&H025:BP(2)=9
- BC(3)=&H065:BP(3)=9
- ESN=8:EN=4
- CSN=ESN+EN:CN=6
- BSN=CSN+CN:BN=10
- DIM EX(EN),EY(EN),EF(EN)
- DIM CX(CN),CY(CN),CF(CN)
- DIM BX(BN),BY(BN),BS(BN,2)
- ’
- ’************
- @LOOP
- CNTL=MAINCNTL:FPS=0
- BTNO=BTN:BTN=BUTTON()
- BTND=BTNO XOR BTN AND BTN
- IF BTN==512+1024 THEN @EXIT
- GOSUB @PAUSECHK
- IF PAUSE GOTO @JPPAUSE
- IF FLW==REQ GOTO @JPFLOW
- FLW=REQ
- ON FLW GOSUB @TTLI,@GNEWI,@GSTI,@GAMEI,@GMSI,@GCLRI,@GOVI,@RNKI
- @JPFLOW
- ON FLW GOSUB @TTLL,@GNEWL,@GSTL,@GAMEL,@GMSL,@GCLRL,@GOVL,@RNKL
- @JPPAUSE
- VSYNC 1
- CNTF=(CNTF+1) AND &H7FFFF
- GOSUB @FPSPRT
- GOTO @LOOP
- @EXIT
- PNLTYPE”KYA”
- VISIBLE 1,1,0,0,0,0
- BGMSTOP
- GOSUB @GALLCLR
- END
- ’************
- ’SUB
- @FPSPRT
- CNTL=MAINCNTL-CNTL
- IF CNTL THEN FPS=60/CNTL
- COLOR 3:LOCATE 0,23
- PRINT FLOOR(FPS);” ”;
- RETURN
- ’PAUSE CHECK START BUTTON PAUSE
- @PAUSECHK
- IF FLW!=3 THEN RETURN
- IF (BTND AND 1024)==0 THEN RETURN
- PAUSE=(PAUSE==0)
- BEEP 3
- S$=”PAUSE”
- IF PAUSE==0 THEN S$=MID$(SP$,0,LEN(S$))
- COLOR 3:LOCATE 13,11
- PRINT S$
- RETURN
- ’ALL CLEAR
- @GALLCLR
- CLS:COLOR 0
- SPPAGE 1:SPCLR:SPPAGE 0:SPCLR
- FOR I=0 TO 1
- BGPAGE I
- BGOFS 0,0,0:BGOFS 1,0,0
- BGCLIP 0,0,31,23
- FOR Y=0 TO BGH-1
- FOR X=0 TO BGW-1
- BGPUT 0,X,Y,0,0,0,0
- BGPUT 1,X,Y,0,0,0,0
- NEXT
- NEXT
- NEXT
- BGPAGE 0
- GPAGE 1:GCOLOR 0:GCLS
- GPAGE 0:GCOLOR 0:GCLS
- RETURN
- ’************
- ’FLOW
- ’TITLE
- @TTLI
- BGMSTOP
- VISIBLE 1,1,0,0,0,0
- GOSUB @GALLCLR
- RESTORE @TITLED
- YY=CH
- FOR Y=0 TO 5
- XX=2
- FOR X=0 TO 1
- READ C
- B=&H8000
- FOR I=0 TO 15
- IF C AND B THEN BGPUT 1,XX,YY,BC(1),BP(1),0,0
- XX=XX+1:B=B/2
- NEXT
- NEXT
- YY=YY+1
- NEXT
- VISIBLE 1,1,1,1,1,1
- BGOFS 1,0,GH-2*8,60
- TMR=60*10
- RETURN
- @TTLL
- TMR=TMR-1
- IF TMR<=0 THEN REQ=7
- COLOR 0:LOCATE 9,16
- S$=”PUSH A BUTTON”
- IF CNTF AND &H20 THEN S$=MID$(SP$,0,LEN(S$))
- PRINT S$
- IF BTND AND 16 THEN REQ=1
- LOCATE 11,20
- PRINT CHR$(&H13);”:MOVE”
- LOCATE 11,21
- PRINT CHR$(&H01);”:BOMBER”
- RETURN
- ’NEW GAME
- @GNEWI
- SCORE=0:LEVEL=0
- SSPD=SSPDMIN
- RW=RWMAX
- LIFE=LIFEMAX
- CHG=0
- REQ=2
- RETURN
- @GNEWL
- RETURN
- ’GAME START
- @GSTI
- CLS
- TMR=60*2
- L=LEVEL%10
- STMR=0
- STMRMAX=LEVEL*60*2+STMRMIN
- RW=RWMAX-L
- IF RW<RWMIN THEN RW=RWMIN
- RX=(CW-RW)/2
- SSPD=SSPDMIN+(L*0.5)
- IF SSPD>SSPDMAX THEN SSPD=SSPDMAX
- ETMRMAX=100-(L*5)
- IF ETMRMAX<ETMRMIN THEN ETMRMAX=ETMRMIN
- PX=GW/2:PY=GH-PH-16
- SCRX=0:SCRY=0:BGPY=9999
- CHAIN=0:CHAINMAX=0
- CHG=CHGMAX
- BTMR=-1
- GOSUB @GBGI
- GOSUB @PLAYERI
- GOSUB @ENEMYI
- GOSUB @COINI
- GOSUB @BOMBEFFI
- GOSUB @SCOREI
- BGOFS 1,SCRX,SCRY
- SPOFS 0,PX-OX,PY-OY
- VISIBLE 1,1,1,1,1,1
- BGMPLAY 4
- COLOR 0:LOCATE 12,10
- PRINT”LEVEL ”;LEVEL+1
- LOCATE 12,12
- PRINT”LEFT ”;LIFE-1
- LOCATE 12,14
- PRINT FLOOR(STMRMAX/60);”SEC THROUGH”
- RETURN
- @GSTL
- TMR=TMR-1
- IF TMR<=0 THEN REQ=3
- IF REQ!=FLW THEN CLS:GOSUB @SCOREI
- RETURN
- ’GAME
- @GAMEI
- BGMPLAY 3
- RETURN
- @GAMEL
- GOSUB @GBG
- GOSUB @PLAYER
- GOSUB @ENEMY
- GOSUB @COIN
- GOSUB @BOMBEFF
- GOSUB @SCORE
- RETURN
- ’GAME MISS
- @GMSI
- LIFE=LIFE-1
- TMR=60*2
- SPSET 1,&HF8,0,0,0,1
- SPOFS 1,PX-OX,PY-OY
- SPANIM 1,3,4,0
- BEEP 13:BGMSTOP
- RETURN
- @GMSL
- TMR=TMR-1
- IF TMR<=0 THEN REQ=2
- IF REQ==2 AND LIFE<=0 THEN REQ=6
- IF REQ!=FLW THEN SPCLR 1
- RETURN
- ’GAME STAGE CLEAR
- @GCLRI
- LEVEL=LEVEL+1
- IF LEVEL>LEVELMAX THEN LEVEL=LEVELMAX
- TMR=60*3
- SCORE=SCORE+CHAINMAX*CHAINMUL
- GOSUB @SCORE
- BGMPLAY 5
- SPOFS 0,PX-OX,PY-OY-GH-16,TMR/3
- COLOR 0
- LOCATE 13,10
- PRINT”CLEAR”
- LOCATE 10,12
- PRINT”MAX CHAIN ”;CHAINMAX
- LOCATE 10,14
- PRINT”BONUS ”;CHAINMAX*CHAINMUL;”0”
- RETURN
- @GCLRL
- TMR=TMR-1
- IF TMR<=0 THEN REQ=2
- GOSUB @BOMBEFF
- RETURN
- ’GAME OVER
- @GOVI
- TMR=60*6
- BGMPLAY 6
- COLOR 13
- LOCATE 11,11:PRINT”GAME OVER”
- COLOR 0
- RETURN
- @GOVL
- IF BTND AND 16 THEN REQ=7
- TMR=TMR-1
- IF TMR<=0 THEN REQ=7
- RETURN
- ’RANKING
- @RNKI
- BGMSTOP
- GOSUB @GALLCLR
- TMR=60*10
- IF SCORE>HISCORE THEN HISCORE=SCORE
- RANKIN=-1
- FOR I=0 TO 9
- IF SCORE>=RANK(I) THEN RANKIN=I:I=9999
- NEXT
- IF RANKIN<0 THEN @JPRANKIN
- FOR I=8 TO RANKIN STEP -1
- RANK(I+1)=RANK(I)
- NEXT
- RANK(RANKIN)=SCORE
- @JPRANKIN
- COLOR 0:LOCATE 8,5
- PRINT”TODAY’S RANKING”
- FOR I=0 TO 10-1
- COLOR 0
- IF I==RANKIN THEN COLOR 3
- S$=STR$(I+1)
- LOCATE 8+(6-LEN(S$)),7+I
- PRINT S$
- S$=STR$(RANK(I))
- LOCATE 15+(6-LEN(S$)),7+I
- PRINT S$;”0”
- NEXT
- SCORE=0
- RETURN
- @RNKL
- TMR=TMR-1
- IF TMR<=0 THEN REQ=0
- IF BTND AND 16 THEN REQ=0
- RETURN
- ’************
- ’GAME SUB
- ’PLAYER
- @PLAYERI
- SPSET 0,&H8B,11,0,0,2
- RETURN
- @PLAYER
- IF BTN AND 1 THEN PY=PY-PSPD
- IF BTN AND 2 THEN PY=PY+PSPD
- IF BTN AND 4 THEN PX=PX-PSPD
- IF BTN AND 8 THEN PX=PX+PSPD
- IF PX<OX THEN PX=OX
- IF PX>GW-OX THEN PX=GW-OX
- IF PY<OY THEN PY=OY
- IF PY>GH-OY THEN PY=GH-OY
- SPOFS 0,PX-OX,PY-OY
- GOSUB @BOMBER
- HF=0
- FOR Y=-PHH TO PHH STEP PHH
- YY=(Y+PY+SCRY)/PH
- FOR X=-PWH TO PWH STEP PWH
- XX=(X+PX+SCRX)/PW
- BGREAD(1,XX,YY),C,P,H,V
- IF C==BC(1) THEN HF=1
- IF C==BC(3) THEN REQ=5
- IF C!=BC(0) THEN @JPHIT
- BGPUT 1,XX,YY,BC(2),BP(2),0,0
- SCORE=SCORE+1
- @JPHIT
- NEXT
- NEXT
- IF HF THEN REQ=4
- RETURN
- ’BOMBER
- @BOMBER
- IF (BTND AND 16)==0 THEN RETURN
- IF CHG<CHGMAX THEN RETURN
- CHG=0
- BEEP 10:BEEP 13
- YY=(PY+SCRY)/8
- FOR Y=-BCSH TO BCSH
- XX=(PX+SCRX)/8
- FOR X=-BCSH TO BCSH
- BGPUT 1,XX+X,YY+Y,BC(2),BP(2),0,0
- NEXT
- NEXT
- FOR I=0 TO EN-1
- IF EF(I)<=0 THEN @JPBOMB
- IF PY-BSH>EY(I)+OY THEN @JPBOMB
- IF PY+BSH<EY(I)-OY THEN @JPBOMB
- IF PX-BSH>EX(I)+OX THEN @JPBOMB
- IF PX+BSH<EX(I)-OX THEN @JPBOMB
- EF(I)=0
- SPCLR ESN+I
- @JPBOMB
- NEXT
- BTMR=BTMRMAX
- S=BSH/BTMR
- FOR I=0 TO BN-1
- BX(I)=PX:BY(I)=PY
- R=RAD(I*360/BN)
- BS(I,0)=COS(R)*S
- BS(I,1)=SIN(R)*S
- SPSET BSN+I,&H34,3,0,0,1
- SPOFS BSN+I,BX(I)-OX,BY(I)-OY
- SPANIM BSN+I,4,4,0
- NEXT
- RETURN
- ’BOMBER EFFECT
- @BOMBEFFI
- FOR I=0 TO BN-1
- SPCLR BSN+I
- NEXT
- RETURN
- @BOMBEFF
- IF BTMR<0 THEN RETURN
- BTMR=BTMR-1
- IF BTMR<0 THEN @BOMBEFFI
- FOR I=0 TO BN-1
- BX(I)=BX(I)+BS(I,0)
- BY(I)=BY(I)+BS(I,1)+SSPD
- SPOFS BSN+I,BX(I)-OX,BY(I)-OY
- NEXT
- RETURN
- ’ENEMY
- @ENEMYI
- FOR I=0 TO EN-1
- EF(I)=0
- SPCLR ESN+I
- NEXT
- RETURN
- @ENEMYGEN
- IF STMR>=STMRMAX THEN RETURN
- ETMR=ETMR+SSPD
- IF ETMR<ETMRMAX THEN RETURN
- EI=-1:ETMR=0
- FOR I=0 TO EN-1
- IF EF(I)<=0 THEN EI=I:I=9999
- NEXT
- IF EI<0 THEN RETURN
- EX(EI)=(RX+RND(RW))*8
- EY(EI)=-OY
- EF(EI)=1
- SPSET ESN+EI,&HB2,11,0,0,2
- SPOFS ESN+EI,EX(EI)-OX,EY(EI)-OY
- SPANIM ESN+EI,3,8,0
- RETURN
- @ENEMY
- GOSUB @ENEMYGEN
- FOR I=0 TO EN-1
- IF EF(I)<=0 THEN @JPENE
- EY(I)=EY(I)+SSPD
- IF EY(I)>=GH+OY THEN @ENECLR
- SPOFS ESN+I,EX(I)-OX,EY(I)-OY
- IF PY-PHH>EY(I)+OY THEN @JPENE
- IF PY+PHH<EY(I)-OY THEN @JPENE
- IF PX-PWH>EX(I)+OX THEN @JPENE
- IF PX+PWH<EX(I)-OX THEN @JPENE
- REQ=4
- @ENECLR
- EF(I)=0
- SPCLR ESN+I
- @JPENE
- NEXT
- RETURN
- ’COINトイウカSTAR
- @COINI
- CTMR=0
- FOR I=0 TO CN-1
- CF(I)=0
- SPCLR CSN+I
- NEXT
- RETURN
- @COINGEN
- IF STMR>=STMRMAX THEN RETURN
- CTMR=CTMR+SSPD
- IF CTMR<CTMRMAX THEN RETURN
- CTMR=0:CI=-1
- FOR I=0 TO CN-1
- IF CF(I)<=0 THEN CI=I:I=9999
- NEXT
- IF CI<0 THEN RETURN
- CX(CI)=(RX+RW/2)*8+RND(32)-16
- CY(CI)=-OY
- CF(CI)=1
- SPSET CSN+CI,&H9C,3,0,0,2
- SPOFS CSN+CI,CX(CI)-OX,CY(CI)-OY
- SPANIM CSN+CI,4,4,0
- RETURN
- @COIN
- GOSUB @COINGEN
- FOR I=0 TO CN-1
- IF CF(I)<=0 THEN @JPCOIN
- CY(I)=CY(I)+SSPD
- IF CY(I)>=GH+OY THEN CHAIN=0:GOTO @COINCLR
- SPOFS CSN+I,CX(I)-OX,CY(I)-OY
- IF PY-PHH>CY(I)+OY THEN @JPCOIN
- IF PY+PHH<CY(I)-OY THEN @JPCOIN
- IF PX-PWH>CX(I)+OX THEN @JPCOIN
- IF PX+PWH<CX(I)-OX THEN @JPCOIN
- BEEP 7
- SCORE=SCORE+1
- CHAIN=CHAIN+1
- IF CHAIN>CHAINMAX THEN CHAINMAX=CHAIN
- CHGO=CHG:CHG=CHG+1
- IF CHG>CHGMAX THEN CHG=CHGMAX
- IF CHGO!=CHG AND CHG==CHGMAX THEN BEEP 37
- @COINCLR
- CF(I)=0
- SPCLR CSN+I
- @JPCOIN
- NEXT
- RETURN
- ’BG
- @GBGI
- BGPAGE 0
- FOR Y=0 TO CH-1
- FOR X=0 TO CW-1
- BGPUT 1,X,Y,BC(1),BP(1),0,0
- NEXT
- FOR X=RX TO RX+RW-1
- BGPUT 1,X,Y,BC(0),BP(0),0,0
- NEXT
- NEXT
- RETURN
- @GBG
- STMR=STMR+1
- BGPYO=BGPY
- BGPY=((SCRY-7)/8) AND 63
- IF BGPYO==BGPY THEN @JPGBG
- IF STMR>=STMRMAX THEN @BGGOAL
- FOR X=0 TO RX-1
- BGPUT 1,X,BGPY,BC(1),BP(1),0,0
- NEXT
- FOR X=RX TO RX+RW-1
- BGPUT 1,X,BGPY,BC(0),BP(0),0,0
- NEXT
- FOR X=RX+RW TO CW-1
- BGPUT 1,X,BGPY,BC(1),BP(1),0,0
- NEXT
- GOTO @JPBGGOAL
- @BGGOAL
- FOR X=0 TO CW-1
- BGPUT 1,X,BGPY,BC(3),BP(3),0,0
- NEXT
- @JPBGGOAL
- RX=RX+RND(3)-1
- IF RX<1 THEN RX=1
- IF RX>CW-RW-1 THEN RX=CW-RW-1
- @JPGBG
- SCRY=SCRY-SSPD
- IF SCRY<0 THEN SCRY=SCRY AND 511
- BGOFS 1,SCRX,SCRY
- RETURN
- ’SCORE ETC.
- @SCOREI
- COLOR 3:LOCATE 0,0
- ’0123456789012345678901234567890123456789
- PRINT”SCORE: 0 HI-SCORE: 0”;
- LOCATE 0,1
- FOR I=0 TO LIFE-2
- PRINT CHR$(5);
- NEXT
- S$=STR$(HISCORE)
- LOCATE 25+(6-LEN(S$)),0
- PRINT S$
- @SCORE
- IF SCORE>SCMAX THEN SCORE=SCMAX
- COLOR 3
- S$=STR$(SCORE)
- LOCATE 6+(6-LEN(S$)),0
- PRINT S$
- P=0
- IF (CHG>=CHGMAX) AND (CNTF AND 2)!=0 THEN P=2
- SPSET 2,&HDB,P,0,0,1
- SPOFS 2,112,12-16*CHG/CHGMAX
- SPSCALE 2,CHG/CHGMAX*200
- RETURN
- ’************
- ’DATA
- ’TITLE DATA
- @TITLED
- DATA &H7C04,&H0080
- DATA &H0824,&H03F0
- DATA &H1024,&HF890
- DATA &H2048,&H0120
- DATA &H5092,&H0220
- DATA &H8D1C,&H0440