10-03-2022, 11:55 PM
This entry was for a competition to design a game using only ONE key.
To Play:
Use ONLY the alt key to move and fire. When you release the alt key, your tank will stop. When you press alt again, your tank will move in the opposite direction.
Shoot all invaders before they shoot you. Bonus points for shooting the mother ship.
If invaders get a couple rows above your tank, they land and you die.
To win you must complete all 3 levels.
If you get a top 5 high score, you get to enter your initials. To do so, follow these instructions.
Tap the alt key to display initials A-Z. Stop tapping when your initial appears. Wait 2-seconds and it will be auto-input. If you goofed, hold down the alt key while waiting. It will allow you to redo input from start.
When you input your 3rd and last initial, all your initials will begin to flash for 2.5 seconds, and then they will be recorded. If you goofed, press the alt key within the 2.5 second time period, and you will be able to redo input from start.
FILE WARNING: This routine makes and overwrites a file in your local folder named: ascii-invaders-high-score.dat
For much better sound effects, download and unzip the .ogg files, in the attachment, to your local folder.
If you survive, happy Halloween!
Pete
To Play:
Use ONLY the alt key to move and fire. When you release the alt key, your tank will stop. When you press alt again, your tank will move in the opposite direction.
Shoot all invaders before they shoot you. Bonus points for shooting the mother ship.
If invaders get a couple rows above your tank, they land and you die.
To win you must complete all 3 levels.
If you get a top 5 high score, you get to enter your initials. To do so, follow these instructions.
Tap the alt key to display initials A-Z. Stop tapping when your initial appears. Wait 2-seconds and it will be auto-input. If you goofed, hold down the alt key while waiting. It will allow you to redo input from start.
When you input your 3rd and last initial, all your initials will begin to flash for 2.5 seconds, and then they will be recorded. If you goofed, press the alt key within the 2.5 second time period, and you will be able to redo input from start.
FILE WARNING: This routine makes and overwrites a file in your local folder named: ascii-invaders-high-score.dat
Code: (Select All)
$COLOR:32
_SCREENMOVE _MIDDLE
DIM SHARED intro%: intro% = -1
skip_intro:
title$ = "ASCII Invaders / Halloween Edition"
_TITLE title$
RANDOMIZE TIMER
DEFINT I
DIM SHARED Overlay, font, soundfile%, t1&, t2&, t3&, t4&, t5&, t6&, t7&, t8&
DIM SHARED lmargin%, rmargin%, topmargin%, screenwidth%, level, ibk, ileadingrow
DIM SHARED irow, icol, inextrnd, imaxalienmissiles, alienforce%, ileadingmax, imaxalienforce, ihits, score$
SCREEN 0, 0, 0, 0
swidth = _WIDTH
score$ = "000000"
imaxalienforce = 6
imaxalienmissiles = 3
lmargin% = 2
rmargin% = 79
topmargin% = 3
ialiencolstat = 6
iwin = 3 ' 3 Levels.
screenwidth% = rmargin% - lmargin% + 1
ibk = 0 ' Background color
DIM SHARED a(imaxalienforce) AS STRING * 68
'fontpath$ = ENVIRON$("SYSTEMROOT") + "\fonts\lucon.ttf" 'Find Windows Folder Path.
'font& = _LOADFONT(fontpath$, 25, "monospace")
'_FONT font&
REM Make aliens
a1$ = "^^" + CHR$(79) + "^^ "
a$ = a1$ + a1$ + a1$ + a1$ + a1$ + a1$ + a1$ + a1$ + a1$ + a1$
alt1$ = "--" + CHR$(79) + "-- "
a$ = a1$ + alt1$ + a1$ + alt1$ + a1$ + alt1$ + a1$ + alt1$ + a1$ + alt1$
alt$ = alt1$ + a1$ + alt1$ + a1$ + alt1$ + a1$ + alt1$ + a1$ + alt1$ + a1$
IF intro% THEN
SCREEN 0, 0, 1, 1
CALL qbideOrig
SCREEN 0, 0, 2, 0
CALL qbide
CALL thunder
CALL TheBOB
'_FREEFONT font&
'fontpath$ = ENVIRON$("SYSTEMROOT") + "\fonts\lucon.ttf" 'Find Windows Folder Path.
'font& = _LOADFONT(fontpath$, 25, "monospace")
'_FONT font&
CALL qbide
ELSE
SCREEN 0, 0, 2, 0
CALL qbide
CALL thunder
END IF
IF intro% = -1 THEN RESTORE first_play ELSE RESTORE replay
CALL instructions
DO
IF inextrnd = -1 THEN PCOPY 3, 0
tank$ = CHR$(218) + CHR$(127) + CHR$(191): icolor = 6
REDIM SHARED bullet%(5), bulletcol%(5), bulletdelay%(5), iltalien(imaxalienforce)
REDIM SHARED ia(imaxalienmissiles), iy(imaxalienmissiles), ix(imaxalienmissiles)
REDIM SHARED matrix(imaxalienforce) AS STRING * 10
alienforce% = imaxalienforce
level = .65
iround = iround + 1
level = level - iround / 15
inextrnd = -1
COLOR 6, ibk
REM Set up aliens
ialiencol = ialiencolstat
LOCATE 2, ialiencol
FOR i = 1 TO imaxalienforce
IF i MOD 1 = 0 THEN PRINT
LOCATE , ialiencol
IF i = imaxalienforce THEN
ileadingrow = CSRLIN: ileadingmax = ileadingrow
END IF
IF i \ 2 = i / 2 THEN a(i) = a$ ELSE a(i) = alt$
PRINT a(i)
NEXT
COLOR 0 + 16, 3
LOCATE 25, 68: PRINT "Score ";
COLOR 0, 3
PRINT score$;
COLOR 6, ibk
REM Station
LOCATE 24, 40
tanky% = CSRLIN: tankx% = POS(0) + 1
PRINT tank$;: LOCATE , POS(0) - 2
_DELAY 1
DO
z1 = TIMER
DO
IF zbonus THEN
IF ABS(zbonus - TIMER) > 1.5 THEN
yy% = CSRLIN: xx% = POS(0)
COLOR 6, 0: LOCATE topmargin%, lmargin%: PRINT SPACE$(screenwidth%);
LOCATE yy%, xx%
zbonus = 0
END IF
END IF
IF topmargin% + ileadingmax - (imaxalienforce * 2) >= topmargin% + 2 THEN
IF imothership <> 0 THEN CALL mship(imothership)
END IF
IF ABS(TIMER - z1aliens) > level THEN
CALL movealiens(ialiencol, ialiencolstat, iresults)
z1aliens = TIMER
END IF
IF iresults < 0 THEN EXIT DO
IF ABS(TIMER - z1ia) > .3 THEN CALL alienmissile(iresults): z1ia = TIMER
DEF SEG = 0
IF PEEK(1047) MOD 16 = 7 OR PEEK(1047) MOD 16 = 8 THEN
key$ = CHR$(32) ' Alt
ELSE
key$ = ""
END IF
DEF SEG
SELECT CASE key$
CASE CHR$(32)
IF flag = 0 THEN switch = switch * -1 - 1: flag = -1
SELECT CASE switch
CASE 0
IF ABS(z9 - TIMER) > .15 THEN
IF POS(0) < screenwidth% THEN COLOR icolor, ibk: LOCATE , POS(0) - 1: PRINT " " + tank$;: LOCATE , POS(0) - 2
tanky% = CSRLIN: tankx% = POS(0)
IF SCREEN(tanky%, tankx% - 2) = 25 OR SCREEN(tanky%, tankx% + 2) = 25 THEN result = -1: EXIT DO
z9 = TIMER
END IF
CASE -1
IF ABS(z9 - TIMER) > .15 THEN
IF POS(0) > lmargin% + 1 THEN COLOR icolor, ibk: LOCATE , POS(0) - 2: PRINT tank$ + " ";: LOCATE , POS(0) - 3
tanky% = CSRLIN: tankx% = POS(0)
IF SCREEN(tanky%, tankx% - 2) = 25 OR SCREEN(tanky%, tankx% + 2) = 25 THEN result = -1: EXIT DO
z9 = TIMER
END IF
END SELECT
IF icolor = 6 THEN
FOR i2 = 1 TO 5
IF bullet%(i2) = 0 THEN
icolor = 12: COLOR icolor, ibk: GOSUB redraw
bullet%(i2) = -1: reload = TIMER: EXIT FOR
END IF
NEXT
END IF
CASE ""
IF flag THEN skip = 0: flag = 0
CASE CHR$(27): SYSTEM
END SELECT
IF ABS(z1 - reload) > .6 AND reload <> 0 THEN
GOSUB redraw
icolor = 6: reload = 0
END IF
REM Fire
FOR i = 1 TO 5
SELECT CASE bullet%(i)
CASE -1: bullet%(i) = tanky% - 1: bulletcol%(i) = tankx%
CASE IS > 0
IF bulletdelay%(i) = -1 OR bullet%(i) = tanky% - 1 THEN
CALL checkcollision(ihitaliens, ialiencol, i4, i)
z2bullet = TIMER: bulletdelay%(i) = 0
COLOR 6, ibk
LOCATE bullet%(i), bulletcol%(i)
IF bullet%(i) = topmargin% AND imothership <> 0 THEN ' Hit mother ship.
IF SCREEN(ABS(bullet%(i)), bulletcol%(i)) <> 32 THEN
SOUND 1000, .75
SELECT CASE iresults + 1
CASE 1: bonus = 1500
CASE 2: bonus = 2500
CASE 3: bonus = 5000
END SELECT
score$ = LTRIM$(STR$(VAL(score$) + bonus))
score$ = STRING$(6 - LEN(score$), "0") + score$
yy% = CSRLIN: xx% = POS(0)
SOUND 800, .5: SOUND 1600, .5: SOUND 2400, .5
LOCATE topmargin%, lmargin%: PRINT SPACE$(screenwidth%);
kbonus = bulletcol%(i) - 4
IF kbonus < lmargin% THEN kbonus = lmargin%
IF kbonus + 10 > screenwidth% THEN kbonus = screenwidth% - 11
zbonus = TIMER
LOCATE yy%, xx%
imothership = 0
END IF
END IF
PRINT CHR$(24) ' Tank missile.
IF CSRLIN <> 24 THEN LOCATE , bulletcol%(i): PRINT " ";
IF ihitaliens <> 0 THEN CALL reprintaliens(ialiencol, ihitaliens, iresults, i4, i, imothership)
LOCATE tanky%, tankx%
IF bullet%(i) > topmargin% THEN
bullet%(i) = bullet%(i) - 1
ELSE
GOSUB erasebullet
END IF
IF zbonus THEN
yy% = CSRLIN: xx% = POS(0)
LOCATE topmargin%, kbonus: COLOR 2 + 16: PRINT "BONUS " + LTRIM$(STR$(bonus));
LOCATE yy%, xx%
END IF
END IF
END SELECT
NEXT
REM Bullet timer delay
IF z2bullet <> 0 THEN
IF z1 < z2bullet THEN z2bullet = z2bullet - 86400
IF z1 - z2bullet >= .06 THEN
FOR i2 = 1 TO 5
IF bullet%(i2) <> 0 THEN bulletdelay%(i2) = -1
NEXT i2
END IF
EXIT DO
END IF
LOOP
IF iresults < 0 THEN EXIT DO
IF alienforce% = 0 OR iresults = iwin THEN
FOR i = 1 TO imaxalienmissiles
IF ia(i) <> 0 THEN EXIT FOR
NEXT
IF i > imaxalienmissiles THEN iwait = -1
IF iwait = -1 THEN
EXIT DO
END IF
ELSE
iwait = 1
END IF
LOOP
IF iresults = iwin OR iresults < 0 THEN
REM end game
EXIT DO
END IF
inextrnd = -1
LOOP
SELECT CASE iresults
CASE -1 ' Tank destroyed!
SOUND 800, .3: SOUND 250, 1
FOR i = 1 TO 5
COLOR 14, 4
LOCATE tanky%, tankx% - 1: PRINT tank$;
_DELAY .1
COLOR 8, ibk
LOCATE tanky%, tankx% - 1: PRINT tank$;
_DELAY .1
NEXT
COLOR 6, ibk
LOCATE tanky% - 1, lmargin%
PRINT SPACE$(screenwidth%);
LOCATE tanky%, lmargin%
PRINT SPACE$(screenwidth%);
_DELAY .5
LOCATE 3, 3
COLOR 8, 0
FOR i = 1 TO 20
LOCATE i + 2, 2
FOR j = 1 TO _WIDTH - 2
PRINT CHR$(SCREEN(CSRLIN, POS(0)));
NEXT
NEXT
COLOR 6, 0
_DELAY 2
CALL displayhighscores
CALL qbide
CASE -2 ' Aliens have landed!
SOUND 1000, .3: SOUND 2400, .6:: SOUND 700, 2
COLOR 7, 0
FOR i = 0 TO 21 ' Blank out screen.
LOCATE topmargin% + i, lmargin%: PRINT SPACE$(screenwidth%);
NEXT
COLOR 6, ibk
LOCATE tanky% - 1, lmargin%
PRINT SPACE$(screenwidth%);
LOCATE tanky%, lmargin%
PRINT SPACE$(screenwidth%);
COLOR 8, ibk
FOR j = imaxalienforce TO 1 STEP -1
IF a(j) <> "" THEN EXIT FOR
NEXT
FOR i = j TO 1 STEP -1
IF INSTR(a(i), CHR$(79)) THEN
LOCATE , ialiencol + INSTR(a(i), CHR$(79)) - 2
PRINT LTRIM$(RTRIM$(a(i)));
LOCATE CSRLIN - 2
END IF
NEXT
_DELAY 2.5
CALL displayhighscores
CALL qbide
CASE ELSE ' Winner.
l$ = "4"
n$ = "n29": PLAY "L" + l$ + n$
n$ = "n24": PLAY "L" + l$ + n$
n$ = "n33": PLAY "L" + l$ + n$
n$ = "n29": PLAY "L" + l$ + n$
_DELAY .75
l$ = "7"
n$ = "n24": PLAY "L" + l$ + n$
n$ = "n28": PLAY "L" + l$ + n$
n$ = "n28": PLAY "L" + l$ + n$
l$ = "6"
n$ = "n31": PLAY "L" + l$ + n$
l$ = "8"
n$ = "n28": PLAY "L" + l$ + n$
l$ = "3"
_DELAY 1
CALL displayhighscores
CALL qbide
RESTORE winner
END SELECT
CALL instructions
DEF SEG = 0
DO
_LIMIT 30
b$ = INKEY$
IF b$ = CHR$(27) THEN SYSTEM
IF PEEK(1047) MOD 16 = 7 OR PEEK(1047) MOD 16 = 8 THEN EXIT DO
LOOP
DEF SEG
RUN skip_intro
erasebullet:
LOCATE ABS(bullet%(i)), bulletcol%(i): PRINT " ";
bullet%(i) = 0: bulletcol%(i) = 0: bulletdelay%(i) = 0
LOCATE tanky%, tankx%
RETURN
redraw:
COLOR , ibk: LOCATE tanky%, tankx% - 1: PRINT tank$;: LOCATE tanky%, tankx%: COLOR 7, ibk
RETURN
first_play:
DATA "The Great Pumpkin has fired an EM pulse at your computer."
DATA ""
DATA "All that's working is your Alt key."
DATA ""
replay:
DATA "Loading..."
DATA "EOF"
DATA "Game Over. Press Alt to play again..."
DATA "EOF2"
winner:
DATA "Congratulations, you saved the planet!"
DATA ""
DATA "Press Alt to play again..."
DATA "EOF3"
SUB alienattack (ialiencol)
z2alienfire = TIMER
i3 = INT(RND * 10)
FOR i = 1 TO imaxalienmissiles
IF ia(i) = 0 THEN
FOR i2 = imaxalienforce TO 1 STEP -1
IF RTRIM$(a(i2)) <> "" THEN
IF MID$(matrix(i2), i3 + 1, 1) <> "0" THEN
i4 = INSTR(i3 * 7 + 1, a(i2), CHR$(79)) + ialiencol
EXIT FOR
END IF
END IF
NEXT i2
IF i4 <> 0 THEN
ia(i) = (ileadingmax - (imaxalienforce - i2) * 2) * 80 + i4
EXIT FOR
END IF
END IF
NEXT i
END SUB
SUB alienmissile (iresults)
irow = CSRLIN: icol = POS(0)
FOR i = 1 TO imaxalienmissiles
IF ia(i) <> 0 THEN
IF iy(i) = 0 THEN
iy(i) = ia(i) \ 80: ix(i) = ia(i) MOD 80
IF ix(i) = 0 THEN ix(i) = screenwidth%
END IF
LOCATE iy(i) + 1, ix(i)
COLOR 6, ibk
IF CSRLIN <= 24 THEN
IF CSRLIN = 24 THEN IF SCREEN(CSRLIN, ix(i)) <> 32 THEN iresults = -1
PRINT CHR$(25);
ELSE
ia(i) = 0
LOCATE iy(i), ix(i)
PRINT " ";: iy(i) = 0
ia(i) = 0
LOCATE irow, icol
EXIT SUB
END IF
LOCATE iy(i), ix(i): PRINT " ";
iy(i) = iy(i) + 1
END IF
NEXT
LOCATE irow, icol
END SUB
SUB checkcollision (ihitaliens, ialiencol, i4, i)
ihitaliens = 0
IF ileadingmax MOD 2 = bullet%(i) MOD 2 THEN
i4 = imaxalienforce - (ileadingmax - bullet%(i)) \ 2
IF bullet%(i) <= ileadingrow AND i4 > 0 AND i4 <= imaxalienforce THEN
IF RTRIM$(a(i4)) <> "" THEN
IF bulletcol%(i) >= iltalien(i4) AND bulletcol%(i) - ialiencol <= LEN(RTRIM$(a(i4))) THEN
IF MID$(a(i4), bulletcol%(i) - ialiencol, 1) > CHR$(32) THEN
SOUND 1100, .2: SOUND 334, .1: SOUND 590, .4
ihitaliens = bulletcol%(i) - ialiencol + 1
i3 = ihitaliens - 7 + 1
IF i3 < 1 THEN i3 = 1
i2 = INSTR(i3 + 1, a(i4), "^" + CHR$(79)) - 1
i2 = INSTR(i3 + 1, a(i4), CHR$(79)) - 2
MID$(a(i4), i2, 7) = SPACE$(7)
MID$(matrix(i4), (i2 + 1) \ 7 + 1, 1) = "0"
END IF
END IF
END IF
END IF
END IF
FOR i2 = 1 TO imaxalienmissiles
IF ia(i2) <> 0 THEN
IF iy(i2) >= bullet%(i) AND ix(i2) = bulletcol%(i) THEN
ihitaliens = -i2
EXIT FOR
END IF
END IF
NEXT
END SUB
SUB instructions
IF in$ = "" THEN
LOCATE 3, 3, 1, 7, 0: COLOR 6, ibk
_DELAY 2
DO
READ in$
IF MID$(in$, 1, 3) = "EOF" THEN EXIT DO
FOR i = 1 TO LEN(in$)
SOUND 400, .06
LOCATE , 2 + i
PRINT MID$(in$, i, 1);
z = TIMER
DO
IF ABS(z - TIMER) > .06 THEN EXIT DO
LOOP
NEXT
LOCATE , , 0, 7, 0
_DELAY 1
PRINT
LOCATE , 3
LOOP
_DELAY .75
END IF
IF in$ = "EOF" THEN
COLOR 7, 0
FOR i = 0 TO 19 ' Blank out intro message space.
LOCATE topmargin% + i, lmargin%: PRINT SPACE$(screenwidth%);
NEXT
FOR i = 3 TO 24
LOCATE i, 80: PRINT CHR$(179);
NEXT
LOCATE 21, 2: PRINT STRING$(screenwidth%, " ");
LOCATE 22, 1: PRINT CHR$(179);
LOCATE 22, 80: PRINT CHR$(179);
LOCATE 22, 2: PRINT STRING$(screenwidth%, " ");
ELSE
COLOR 0, 3
END IF
IF in$ <> "EOF2" AND iresults <> iwin THEN COLOR 0 + 16, 3 ELSE COLOR 0, 3
yy% = CSRLIN: xx% = POS(0)
LOCATE 25, 68: PRINT "Score ";
COLOR 0, 3
PRINT score$;
LOCATE yy%, xx%
PCOPY 0, 3: REM save skin
END SUB
SUB marchdown (ialiencol, ialiencolstat, imotion, iresults)
COLOR 6, ibk
ileadingrow = ileadingrow + 1
ileadingmax = ileadingmax + 1
COLOR 6, ibk
FOR i = 1 TO imaxalienforce
REM SOUND 400, .2 ' Level down.
IF RTRIM$(a(i)) <> "" THEN
ialiencol = ialiencolstat + imotion
LOCATE ileadingmax - (imaxalienforce * 2) + i * 2 - 1, lmargin%
PRINT STRING$(screenwidth%, " ")
LOCATE , ialiencol + INSTR(a(i), CHR$(79)) - 2
iltalien(i) = POS(0)
PRINT LTRIM$(RTRIM$(a(i)))
END IF
NEXT
LOCATE irow, icol
level = level - .025
IF ileadingrow = 22 THEN iresults = -2 ' Aliens have landed!
END SUB
DEFSNG I
DEFINT I
SUB movealiens (ialiencol, ialiencolstat, iresults)
STATIC imotion, imarch, imotiondir
SOUND 800, .1: SOUND 200, .33 ' Marching sound.
IF inextrnd = -1 THEN inextrnd = 0: imotion = 0: imarch = 0: imotiondir = 0
irow = CSRLIN: icol = POS(0)
yy% = CSRLIN: xx% = POS(0)
PCOPY 0, 1: SCREEN 0, 0, 1, 0: LOCATE yy%, xx%, 0, 7, 0
IF imotiondir = 0 THEN imotion = imotion - 1 ELSE imotion = imotion + 1
COLOR 6, ibk
FOR i = imaxalienforce TO 1 STEP -1
IF RTRIM$(a(i)) <> "" THEN
FOR k = 1 TO LEN(a(i))
k$ = MID$(a(i), k, 1)
IF k$ = "^" THEN
MID$(a(i), k, 1) = "-"
ELSEIF k$ = "-" THEN
MID$(a(i), k, 1) = "^"
END IF
NEXT
i2 = i2 + 2
ialiencol = ialiencolstat + imotion
LOCATE ileadingmax - (imaxalienforce - i) * 2, ialiencol + INSTR(a(i), CHR$(79)) - 2
IF POS(0) = lmargin% THEN imarch = 1
iltalien(i) = POS(0)
IF imotiondir = 0 THEN
PRINT LTRIM$(RTRIM$(a(i))); " "
ELSE
LOCATE , POS(0) - 1
PRINT " "; LTRIM$(RTRIM$(a(i)))
END IF
IF ialiencol + LEN(RTRIM$(a(i))) = screenwidth% THEN imarch = -1
END IF
NEXT
IF imarch = 1 THEN imotiondir = 1: CALL marchdown(ialiencol, ialiencolstat, imotion, iresults)
IF imarch = -1 THEN imotiondir = 0: CALL marchdown(ialiencol, ialiencolstat, imotion, iresults)
IF imarch = 0 THEN
IF ABS(TIMER - z2alienfire) > firerate THEN
firerate = (INT(RND * 10) + 1) / 20
IF iwait = 0 THEN CALL alienattack(ialiencol)
END IF
ELSE
imarch = 0
END IF
PCOPY 1, 0: SCREEN 0, 0, 0, 0
LOCATE irow, icol, 1, 7, 0
END SUB
SUB mship (imothership)
STATIC x%, mov%, z4, mothership$
yy% = CSRLIN: xx% = POS(0): COLOR 6, ibk
IF imothership = -1 THEN
imothership = 1
x% = lmargin%
mothership$ = "(" + CHR$(127) + CHR$(179) + CHR$(127) + ")" 'CHR$(254) + CHR$(254) + "O" + CHR$(254) + CHR$(254)
mov% = 1
END IF
IF ABS(TIMER - z4) > .05 THEN GOSUB mothership: z4 = TIMER
LOCATE yy%, xx%
EXIT SUB
mothership:
IF x% + LEN(mothership$) = screenwidth% + lmargin% THEN mov% = -1 ELSE IF x% = lmargin% THEN mov% = 1
x% = x% + mov%
LOCATE topmargin%, x%
COLOR 7, 6: PRINT MID$(mothership$, 1, 1);
COLOR 14, 6: PRINT MID$(mothership$, 2, 1);
COLOR 7, 6: PRINT MID$(mothership$, 3, 1);
COLOR 14, 6: PRINT MID$(mothership$, 4, 1);
COLOR 7, 6: PRINT MID$(mothership$, 5, 1);
COLOR 7, ibk
IF x% > 1 AND mov% = 1 THEN
LOCATE , POS(0) - LEN(mothership$) - 1: PRINT " ";
END IF
IF mov% = -1 THEN PRINT " ";
RETURN
END SUB
DEFINT A-H, J-Z
SUB qbide
PALETTE 2, 59
COLOR 15, 0
CLS
COLOR 0, 7
LOCATE 1, 1
PRINT SPACE$(80)
LOCATE 1, 1: PRINT " File Edit View Search Run Debug Calls Options Help"
COLOR 7, 0 ' Black background.
LOCATE 2, 1: PRINT CHR$(218)
LOCATE 2, 2: PRINT STRING$(78, CHR$(196))
LOCATE 2, 80: PRINT CHR$(191)
LOCATE 2, 76: PRINT CHR$(180)
LOCATE 2, 78: PRINT CHR$(195)
COLOR 0, 7
LOCATE 2, 77: PRINT CHR$(24)
LOCATE 2, 36: PRINT " Untitled "
COLOR 7, 0
FOR Rows = 3 TO 24
LOCATE Rows, 1: PRINT CHR$(179);
LOCATE Rows, 80: PRINT CHR$(179);
NEXT Rows
LOCATE 22, 1: PRINT CHR$(195)
LOCATE 22, 80: PRINT CHR$(180)
LOCATE 22, 2: PRINT STRING$(78, CHR$(196))
LOCATE 22, 35
PRINT " Immediate "
COLOR 0, 7
LOCATE 21, 3: PRINT STRING$(76, CHR$(176))
LOCATE 21, 2: PRINT CHR$(27)
LOCATE 21, 3: PRINT CHR$(219)
LOCATE 21, 79: PRINT CHR$(26)
FOR Rows = 4 TO 19
LOCATE Rows, 80: PRINT CHR$(176)
NEXT Rows
LOCATE 3, 80: PRINT CHR$(24)
LOCATE 4, 80: PRINT CHR$(219)
LOCATE 20, 80: PRINT CHR$(25)
COLOR 0, 3: LOCATE 25, 1: PRINT " <Shift+F1=Help> <F6=Window> <F2=Subs> <F5=Run> <F8=Step> ";
LOCATE 25, 59: PRINT SPACE$(4);
COLOR 0, 3
LOCATE 25, 63: PRINT CHR$(179);
LOCATE 25, 64: PRINT SPACE$(6);
LOCATE 25, 68: PRINT "C 00001:001 ";
END SUB
DEFSNG A-H, J-Z
SUB reprintaliens (ialiencol, ihitaliens, iresults, i4, i, imothership)
IF ihitaliens > 0 THEN
ihits = ihits + 1
SELECT CASE iresults + 1
CASE 1: score$ = LTRIM$(STR$(VAL(score$) + 150))
CASE 2: score$ = LTRIM$(STR$(VAL(score$) + 250))
CASE 3: score$ = LTRIM$(STR$(VAL(score$) + 350))
END SELECT
score$ = STRING$(6 - LEN(score$), "0") + score$
IF (ihits + 15) MOD 20 = 0 AND imothership = 0 THEN imothership = -1
LOCATE bullet%(i), lmargin%: PRINT SPACE$(screenwidth%);
iltalien(i4) = POS(0)
IF RTRIM$(a(i4)) = "" THEN
alienforce% = alienforce% - 1
IF alienforce% = 0 THEN iresults = iresults + 1 ' Level completed. Goto to next level.
IF bullet%(i) = ileadingrow THEN ileadingrow = ileadingrow - 2
ELSE
LOCATE bullet%(i), ialiencol + INSTR(a(i4), CHR$(79)) - 2
PRINT LTRIM$(RTRIM$(a(i4)))
END IF
ELSE
i2 = ABS(ihitaliens)
LOCATE iy(i2), ix(i2)
PRINT " ";: iy(i2) = 0
ia(i2) = 0
LOCATE irow, icol
IF soundfile% = 0 THEN
SOUND 1000, .5
ELSE
z4 = TIMER
DO
IF eflag THEN
IF ABS(z4 - TIMER) > .1 THEN
eflag = 0
PALETTE 0, 0
EXIT DO
ELSE
j = -j * -1
IF j = 0 THEN
PALETTE 0, 63
_DELAY .05
ELSE
PALETTE 0, 0
_DELAY .05
END IF
END IF
END IF
IF eflag = 0 THEN
PALETTE 0, 36
IF soundfile% THEN
_SNDPLAY t1&
_DELAY .05
_SNDPLAY t7&
ELSE
_DELAY .075
END IF
eflag = -1
z4 = TIMER
END IF
LOOP
SELECT CASE iresults + 1
CASE 1: bonus = 500
CASE 2: bonus = 1500
CASE 3: bonus = 2500
END SELECT
score$ = LTRIM$(STR$(VAL(score$) + bonus))
score$ = STRING$(6 - LEN(score$), "0") + score$
END IF
END IF
ihitaliens = 0
bullet%(i) = -bullet%(i)
COLOR 0, 3
yy% = CSRLIN: xx% = POS(0)
LOCATE 25, 74: PRINT score$;
LOCATE yy%, xx%
COLOR 6, ibk
END SUB
SUB qbideOrig
PALETTE 2, 59
COLOR 15, 1
CLS
COLOR 0, 7
LOCATE 1, 1
PRINT SPACE$(80)
LOCATE 1, 1: PRINT " File Edit View Search Run Debug Calls Options Help"
COLOR 7, 1
LOCATE 2, 1: PRINT CHR$(218)
LOCATE 2, 2: PRINT STRING$(78, CHR$(196))
LOCATE 2, 80: PRINT CHR$(191)
LOCATE 2, 76: PRINT CHR$(180)
LOCATE 2, 78: PRINT CHR$(195)
COLOR 1, 7
LOCATE 2, 77: PRINT CHR$(24)
LOCATE 2, 36: PRINT " Untitled "
COLOR 7, 1
FOR Rows = 3 TO 24
LOCATE Rows, 1: PRINT CHR$(179);
LOCATE Rows, 80: PRINT CHR$(179);
NEXT Rows
LOCATE 22, 1: PRINT CHR$(195)
LOCATE 22, 80: PRINT CHR$(180)
LOCATE 22, 2: PRINT STRING$(78, CHR$(196))
LOCATE 22, 35
PRINT " Immediate "
COLOR 0, 7
LOCATE 21, 3: PRINT STRING$(76, CHR$(176))
LOCATE 21, 2: PRINT CHR$(27)
LOCATE 21, 3: PRINT CHR$(219)
LOCATE 21, 79: PRINT CHR$(26)
FOR Rows = 4 TO 19
LOCATE Rows, 80: PRINT CHR$(176)
NEXT Rows
LOCATE 3, 80: PRINT CHR$(24)
LOCATE 4, 80: PRINT CHR$(219)
LOCATE 20, 80: PRINT CHR$(25)
COLOR 0, 3: LOCATE 25, 1: PRINT " <Shift+F1=Help> <F6=Window> <F2=Subs> <F5=Run> <F8=Step> ";
LOCATE 25, 59: PRINT SPACE$(4);
COLOR 0, 3
LOCATE 25, 63: PRINT CHR$(179);
LOCATE 25, 64: PRINT SPACE$(6);
LOCATE 25, 68: PRINT "C 00001:001 ";
END SUB
SUB TheBOB
SCREEN _NEWIMAGE(800, 600, 256)
WIDTH 80, 25
OUT &H3C8, 1: OUT &H3C9, 40: OUT &H3C9, 12: OUT &H3C9, 0
OUT &H3C8, 2: OUT &H3C9, 6: OUT &H3C9, 12: OUT &H3C9, 0
OUT &H3C8, 3: OUT &H3C9, 30: OUT &H3C9, 8: OUT &H3C9, 0
OUT &H3C8, 4: OUT &H3C9, 3: OUT &H3C9, 8: OUT &H3C9, 0
OUT &H3C8, 7: OUT &H3C9, 63: OUT &H3C9, 0: OUT &H3C9, 0
OUT &H3C8, 8: OUT &H3C9, 46: OUT &H3C9, 0: OUT &H3C9, 0
OUT &H3C8, 9: OUT &H3C9, 63: OUT &H3C9, 63: OUT &H3C9, 63
OUT &H3C8, 12: OUT &H3C9, 20: OUT &H3C9, 20: OUT &H3C9, 20
OUT &H3C8, 13: OUT &H3C9, 0: OUT &H3C9, 0: OUT &H3C9, 0
OUT &H3C8, 14: OUT &H3C9, 55: OUT &H3C9, 35: OUT &H3C9, 0
CIRCLE (320, 240), 100, 3, , , .9
PAINT (320, 240), 3
CIRCLE (320, 230), 90, 1, , , .9
PAINT (320, 230), 1
FOR Reps = 1 TO 4
SELECT CASE Reps
DATA 1,1.2,1.8,5
CASE 1: Elipse = 1
CASE 2: Elipse = 1.2
CASE 3: Elipse = 1.8
CASE 4: Elipse = 5
END SELECT
FOR E = Elipse TO Elipse + .1 STEP .01
CIRCLE (320, 240), 100, 3, , , E
NEXT E
NEXT Reps
FOR Radius = 38 TO 43
CIRCLE (320, 160), Radius, 3, , , .4
NEXT Radius
CIRCLE (320, 160), 40, 14, 3.3, 6, .4
CIRCLE (320, 240), 100, 5, , , .9
PAINT (0, 0), 5
CIRCLE (320, 240), 100, 0, , , .9
PAINT (0, 0), 0
FOR Radius = 12 TO 18
CIRCLE (320, 153), Radius, 2, , , .3
NEXT Radius
CIRCLE (320, 150), 12, 2, , , .6
PAINT STEP(0, 0), 2
CIRCLE (300, 143), 32, 2, 6, 1.1
CIRCLE (276, 143), 32, 2, 6, .6
DRAW "BM302,125 C2 M+15,-10 BD10 P2,2"
PAINT (320, 145), 2
CIRCLE (282, 143), 32, 4, 6, .73
CIRCLE (266, 156), 60, 4, .1, .68
CIRCLE (320, 150), 12, 4, 3.14159, 0, .2
DRAW "BM302,125 C4 M+15,-10 BD10"
CIRCLE (276, 143), 32, 4, 6, .6
PAINT STEP(35, 0), 4
'Face begins
CIRCLE (303, 316), 100, 14, 1.5, 2
CIRCLE (337, 316), 100, 14, 1.1, 1.64
PSET (310, 215), 14
DRAW "H30 M-20,+40 M+12,-4 M+14,-29 BL2 P14,14 BF12 P15,14"
PSET (330, 215), 14
DRAW "E30 M+20,+40 M-12,-4 M-14,-29 BR2 P14,14 BG12 P15,14"
PSET (320, 246), 14
DRAW "R20 H20 G20 R20 U nL19 nR19 BU2 P15,14"
CIRCLE (320, 170), 100, 14, 3.8, 4.1
CIRCLE (320, 170), 100, 14, 4.42, 5.01
CIRCLE (320, 170), 100, 14, 5.33, 5.62
CIRCLE (320, 220), 80, 14, 3.29, 4.5
CIRCLE (320, 220), 80, 14, 4.66, 6.15
PSET (260, 250), 14
DRAW "D10 F8 U13 M+10,+5 D12 M+12,+6 U12 BR60"
DRAW "D12 M+12,-6 U12 M+10,-5 D13 E8 U10"
PSET (300, 297), 14
DRAW "U14 R16 D16"
CIRCLE (320, 212), 80, 14, 3.42, 4.5
CIRCLE (320, 212), 80, 14, 4.66, 6
LINE (300, 280)-(316, 283), 14, BF
PAINT (320, 296), 14
PAINT (290, 292), 14
PAINT (300, 278), 15, 14
CIRCLE (100, 240), 32, 13
PAINT STEP(0, 0), 13
FOR x% = 58 TO 142
FOR y% = 198 TO 282
IF POINT(x%, y%) = 13 THEN
IF POINT(x% + 220, y%) = 15 THEN PSET (x% + 220, y%), 9
END IF
NEXT y%
NEXT x%
COLOR 13: LOCATE 1, 1: PRINT "HAPPY HALLOWEEN!"
xx = 64: yy = 360 - 330
FOR x% = 0 TO 300
FOR y% = 0 TO 16
IF POINT(x%, y%) = 13 THEN
IF y% > 6 THEN Colr = 8 ELSE Colr = 7
LINE (x% * 4 + xx, y% * 4 + yy)-(x% * 4 + xx + 3, y% * 4 + yy + 3), Colr, BF
END IF
NEXT y%
NEXT x%
FOR x% = 0 TO 639
IF POINT(x%, 368) <> 0 THEN PSET (x%, 368), 14
NEXT x%
z1 = TIMER
DO UNTIL ABS(TIMER - z1) > 4
FOR Reps = 1 TO 3
WAIT &H3DA, 8
WAIT &H3DA, 8, 8
NEXT Reps
Flicker = FIX(RND * 20)
OUT &H3C8, 14
OUT &H3C9, 40 + Flicker
OUT &H3C9, 25 + Flicker
OUT &H3C9, 10 + Flicker
OUT &H3C8, 15
OUT &H3C9, 43 + Flicker
OUT &H3C9, 38 + Flicker
OUT &H3C9, 20 + Flicker
LOOP
SCREEN 0, 0, 0, 0
END SUB
SUB displayhighscores
COLOR 0, 3
LOCATE 25, 68: PRINT "Score "; score$;
DIM hs AS STRING * 25
REDIM highscore$(6), hsdata$(6)
DO
IF _FILEEXISTS("ascii-invaders-high-score.dat") THEN
OPEN "ascii-invaders-high-score.dat" FOR RANDOM AS #1 LEN = 25
FOR i = 1 TO 5
GET #1, i, hs
highscore$(i) = MID$(hs, 10, 6): hsdata$(i) = hs
NEXT
CLOSE #1
ELSE
FOR i = 1 TO 5
hsdata$(i) = SPACE$(25)
NEXT
END IF
IF VAL(score$) > VAL(highscore$(5)) THEN
IF VAL(score$) > VAL(highscore$(1)) THEN
msg$ = " HIGH SCORE / Enter Your Initials! "
ELSE
msg$ = " Top 5 Score. Enter Your Initials! "
END IF
GOSUB hiscore
a = 14
OUT &H3C8, 0
OUT &H3C9, 20 - a
OUT &H3C9, 20 - a
OUT &H3C9, 20 - a
OUT &H3C8, 8
OUT &H3C9, 30 - a
OUT &H3C9, 30 - a
OUT &H3C9, 30 - a
OUT &H3C8, 7
OUT &H3C9, 30 - a
OUT &H3C9, 30 - a
OUT &H3C9, 30 - a
OUT &H3C8, 3
OUT &H3C9, 30 - a
OUT &H3C9, 30 - a
OUT &H3C9, 30 - a
GOSUB hardware_overlay
_FONT 16
COLOR White, 0
t$ = msg$
PSLC 4.6, 41 - LEN(msg$) \ 2, t$
font = _LOADFONT("lucon.ttf", 20, "monospace")
IF font <= 0 THEN font = 16
_FONT font
DEF SEG = 0
delay = .4
lscr = 19
z3 = TIMER
DO
initials$ = "": i = 0: nxt = 0
COLOR , _RGB(24, 24, 24): t$ = " " ' Blank initials for redo. Okay to blank at start.
PSL 5 + rank * 2, lscr, t$
_DISPLAY
DO
_LIMIT 60
IF ABS(z3 - TIMER) > .3 AND kflag > -2 THEN
underline 5 + rank * 2, lscr + nxt, 0
_DISPLAY
z3 = TIMER
END IF
SELECT CASE kflag
CASE 0
IF ABS(z1 - TIMER) > 1.5 AND i AND nxt < 3 THEN
SOUND 1500, 1
underline 5 + rank * 2, lscr + nxt, -1: uflag = 0
_DISPLAY
initials$ = initials$ + CHR$(64 + i)
nxt = nxt + 1 ' Next initial
i = 0 ' Reset alphabet.
z1 = TIMER
IF nxt = 3 THEN
kflag = -2 ' All 3 initials have been input.
underline 5 + rank * 2, lscr + nxt, -1: uflag = 0
_DISPLAY
END IF
END IF
IF PEEK(1047) MOD 16 = 7 OR PEEK(1047) MOD 16 = 8 THEN
kflag = -1 ' Alt key pressed.
z1 = TIMER: z2 = TIMER
i = i + 1: IF i > 26 THEN i = 1
COLOR , _RGB(24, 24, 24): t$ = " "
PSL 5 + rank * 2, lscr + nxt, t$
COLOR DarkOrange: t$ = CHR$(64 + i)
SOUND 1000, .1
PSL 5 + rank * 2, lscr + nxt, t$
underline 5 + rank * 2, lscr + nxt, 0
_DISPLAY
END IF
CASE -1
IF ABS(z2 - TIMER) > 2 THEN ' Key down long enough to indicate redo input.
IF nxt > 0 THEN ' Redo last initial input.
SOUND 300, .5
FOR nxt = 0 TO 3
underline 5 + rank * 2, lscr + nxt, -1: uflag = 0
NEXT
nxt = 0: i = 0
initials$ = ""
COLOR , _RGB(24, 24, 24): t$ = " "
PSL 5 + rank * 2, lscr, t$
_DISPLAY
z1 = TIMER ' Reset enter timer.
ELSE
SOUND 300, .5
i = 0
COLOR , _RGB(24, 24, 24): t$ = " "
PSL 5 + rank * 2, lscr, t$
_DISPLAY
z1 = TIMER ' Reset enter timer.
END IF
z2 = TIMER
END IF
IF PEEK(1047) MOD 16 <> 7 AND PEEK(1047) MOD 16 <> 8 THEN ' Alt key was released.
kflag = 0 ' Alt key up
z1 = TIMER
END IF
CASE -2 ' Finished. Initials will flash until confirmed by 2-second timer.
z1 = TIMER: z2 = TIMER
j = 0
DO
IF ABS(z1 - TIMER) > .3 THEN j = -j - 1: z1 = TIMER
IF j THEN
COLOR DarkOrange: t$ = initials$
PSL 5 + rank * 2, lscr, t$
_DISPLAY
ELSE
COLOR _RGB(24, 24, 24): t$ = initials$
PSL 5 + rank * 2, lscr, t$
_DISPLAY
END IF
IF ABS(z2 - TIMER) > 2.5 AND j THEN
kflag = -3
EXIT DO
END IF
IF PEEK(1047) MOD 16 = 7 OR PEEK(1047) MOD 16 = 8 THEN
BEEP
kflag = -4
EXIT DO
END IF
LOOP
CASE -3
_DELAY 1
l$ = "8"
n$ = "n24": PLAY "L" + l$ + n$
n$ = "n28": PLAY "L" + l$ + n$
n$ = "n28": PLAY "L" + l$ + n$
l$ = "7"
n$ = "n31": PLAY "L" + l$ + n$
l$ = "9"
n$ = "n28": PLAY "L" + l$ + n$
l$ = "3"
n$ = "n31": PLAY "L" + l$ + n$
kflag = 1
_DELAY 1: EXIT DO
CASE -4
kflag = 0 ' Repeat enter initials
nxt = 0
i = 0
EXIT DO
END SELECT
LOOP
IF kflag > 0 THEN kflag = 0: EXIT DO ' Exit routine.
LOOP
DEF SEG
hsname$ = initials$
MID$(hsdata$(rank), 5, 3) = hsname$ + SPACE$(3 - LEN(hsname$))
OPEN "ascii-invaders-high-score.dat" FOR RANDOM AS #1 LEN = 25
FOR i = 1 TO 5
hs = hsdata$(i)
IF LEFT$(hs, 1) = "" THEN MID$(hs, 1, 2) = "0" + LTRIM$(STR$(i))
PUT #1, i, hs
NEXT
CLOSE #1
_DELAY 1
_DISPLAY ' Remove scoreboard.
_DELAY 1
_FREEIMAGE Overlay
_FONT 16 'select inbuilt 8x16 default font
_FREEFONT font
_DEST 0 'Reset dest back to the normal screen 0.
_AUTODISPLAY
COLOR 6, 0
msg$ = SPACE$(40)
LOCATE 4, 41 - LEN(msg$) \ 2
PRINT msg$;
PALETTE
_DELAY 1
EXIT DO
ELSE
EXIT DO ' Not in the top 5 highest scores so exit sub.
END IF
LOOP
EXIT SUB
hardware_overlay:
Overlay = _NEWIMAGE(_WIDTH * _FONTWIDTH, _HEIGHT * _FONTHEIGHT, 32)
_DEST Overlay
_DISPLAY ' Turn autodisplay off.
font = _LOADFONT("lucon.ttf", 20, "monospace")
IF font <= 0 THEN font = 16
_FONT font
bxy% = 3
bxx% = 13
COLOR DarkOrange, 0
t$ = " " + CHR$(218) + STRING$(27, CHR$(196)) + CHR$(191) + " "
PSL bxy%, bxx% - 1, t$
FOR i = 1 TO 12
t$ = " " + CHR$(179) + STRING$(27, CHR$(32)) + CHR$(179) + " "
PSL bxy% + i, bxx% - 1, t$
NEXT
t$ = " " + CHR$(192) + STRING$(27, CHR$(196)) + CHR$(217) + " "
PSL bxy% + i, bxx% - 1, t$
bxy% = 4
COLOR Black, DarkOrange
t$ = " NAME SCORE DATE "
PSL bxy% + 1, bxx% + 1, t$
COLOR DarkOrange, 0
FOR i = 1 TO 5
t$ = hsdata$(i)
PSL bxy% + 1 + i * 2, bxx% + 2, t$
NEXT
_DISPLAY
RETURN
hiscore:
FOR i = 1 TO 5
IF VAL(score$) > VAL(highscore$(i)) THEN rank = i: EXIT FOR
NEXT
hsdata$(6) = SPACE$(25)
MID$(hsdata$(6), 10, 6) = score$
MID$(hsdata$(6), 18, 8) = MID$(DATE$, 1, 6) + MID$(DATE$, 9, 2)
highscore$(6) = score$
FOR i = 1 TO 6
FOR j = 1 TO 6
IF i <> j THEN
IF VAL(highscore$(i)) > VAL(highscore$(j)) THEN
SWAP highscore$(i), highscore$(j)
SWAP hsdata$(i), hsdata$(j)
END IF
END IF
NEXT
NEXT
FOR i = 1 TO 5
MID$(hsdata$(i), 1, 2) = "0" + LTRIM$(STR$(i))
NEXT
RETURN
END SUB
SUB PSLC (y, x, t$)
_PRINTSTRING ((x - 1) * 8, (y - 1) * 16), t$
END SUB
SUB PSL (y, x, t$)
_PRINTSTRING ((x - 1) * _FONTWIDTH, (y - 1) * _FONTHEIGHT), t$
Overlay_Hardware = _COPYIMAGE(Overlay, 33)
_PUTIMAGE (0, 0), Overlay_Hardware
END SUB
SUB underline (y, x, uflag)
STATIC ucnt
ucnt = -ucnt - 1
IF ucnt OR uflag THEN
LINE ((x - 1) * _FONTWIDTH, y * _FONTHEIGHT)-((x - 1) * _FONTWIDTH + 12, y * _FONTHEIGHT), _RGB(24, 24, 24), BF
ELSE
LINE ((x - 1) * _FONTWIDTH, y * _FONTHEIGHT)-((x - 1) * _FONTWIDTH + 12, y * _FONTHEIGHT), DarkOrange, BF
END IF
Overlay_Hardware = _COPYIMAGE(Overlay, 33)
_PUTIMAGE (0, 0), Overlay_Hardware
END SUB
SUB thunder
SCREEN 0, 0, 1, 1
_DELAY 2
IF _FILEEXISTS("Thunder6.ogg") AND _FILEEXISTS("Thunder6.ogg") AND _FILEEXISTS("Thunder6.ogg") THEN
soundfile% = -1
END IF
IF soundfile% THEN
t1& = _SNDOPEN("Thunder1.ogg", "SYNC")
t2& = _SNDOPEN("Thunder2.ogg", "SYNC")
t3& = _SNDOPEN("Thunder3.ogg", "SYNC")
t4& = _SNDOPEN("Thunder4.ogg", "SYNC")
t5& = _SNDOPEN("Thunder5.ogg", "SYNC")
t6& = _SNDOPEN("Thunder6.ogg", "SYNC")
t7& = _SNDOPEN("Thunder7.ogg", "SYNC")
t8& = _SNDOPEN("Thunder8.ogg", "SYNC")
_SNDPLAY t6&
_DELAY .1
_SNDPLAY t7&
_DELAY .1
_SNDPLAY t8&
ELSE
SOUND 1000, .3: SOUND 2400, .6:: SOUND 700, 2
END IF
FOR i = 1 TO 15
_DELAY i / 150
IF i / 2 = i \ 2 THEN
SOUND 250, .1
SCREEN 0, 0, 1, 1
ELSE
SCREEN 0, 0, 2, 2
IF i < 13 THEN _DELAY i / 100: SCREEN 0, 0, 3, 3: COLOR 0, 7: CLS
END IF
NEXT
PCOPY 2, 0
SCREEN 0, 0, 0, 0
_DELAY 1.5
END SUB
For much better sound effects, download and unzip the .ogg files, in the attachment, to your local folder.
If you survive, happy Halloween!
Pete