Alien Asylum
- Type
- Game
- Category
- Arcade maze game
- Author
- Spencer Craske
- Published in
- Antic, October 1985 (Vol. 4, No. 6), Game of the Month
- Year
- 1985
- Language
- Atari BASIC
- Requirements
- Any Atari 8-bit computer, any memory size, Atari BASIC, joystick in port 1; disk or cassette
- Tags
- antic, game-of-the-month, arcade, joystick, redefined-characters, graphics-1, inertia, character-animation, 1985
- Related
- Box-In, Q.T., Arena Racer, Courting Crickets, Diamond Dave, Good King Zurp
About the program
"Paranoid Fantasy" was Spencer Craske's own subtitle for this game, Antic's Game of the Month for October 1985. Craske lived in Paradise, Newfoundland. During your travels between the planets you have been thrown into an alien insane asylum, and you aren't told why. The other inmates are red, octopus-like aliens, so heavily sedated that they just stagger from side to side, but a single touch from one is fatal to an Earthling. The room is lit by hundreds of glaring "Living Lights", and if you stand still under them you slowly go mad. The careless keepers have left keys lying around. Collect all the keys in a room to move on to the next.
Typing it in
Lines 80–100 build the rows of inmates from inverse # and $ characters and inverse spaces: {inv} … {/inv} means press the Atari (inverse) key before and after. Count the spaces carefully, because the strings are scrolled by slicing. Line 130 is a machine-language string that copies the ROM character set. {CTRL-E}, {CTRL-D} and {CTRL-Q} mean hold CTRL and press the letter, and {CTRL-,}/{CTRL-.} are CTRL with comma/full stop. Antic printed TYPO II checksums beside each line of the magazine listing. They are not part of the program.
How to play
The status lines at the bottom show your score, the keys left in the room, your men (lives), the level and SP, your sanity points. Run over the Living Lights to smash them. Each one gives a point of sanity and 10 points of score, but sanity drains steadily as you play. At 0 you go insane and lose a life, and 99 is perfectly sane. Keys are worth 100 points. You win an extra man at 10,000 points. Each level needs more keys, and the inmates move faster.
The controls are deliberately unnerving. Once you let go of the joystick you keep sliding in the same direction until you hit a wall, or an inmate.
How it works
- Inertia. Lines 200–220 read the stick through location 632. If it is centred, the previous direction (
OLX,OLY) is reused. - Inmates as strings. Each row of inmates is a 50-character string, and lines 230–270 print an 18-character slice of it. Moving the slice start
Sback and forth makes the whole row stagger left and right, and it moves faster at higher levels. - The "fake scroll". Craske admitted he found this by accident. The Living Light is a redefined character whose dot pattern is a single lit bit. Line 390 POKEs 1, 2, 4 … 128 into one byte of its definition in turn, so every light on screen appears to creep smoothly sideways, at no cost to BASIC.
- Collisions use
LOCATE. Code 38 is a light, 1 is a key and 163/164 are inmates (lines 280–310).
Listing
10 REM ASYLUM
20 REM BY SPENCER CRASKE
30 REM (c) 1985, Antic Publishing Co.
40 I=1:GRAPHICS 17:SETCOLOR 4,7,2:SETCOLOR 3,0,14:SETCOLOR 0,2,14
50 SETCOLOR 2,3,6:SETCOLOR 1,12,12:GOSUB 150
60 POKE 106,PEEK(740)
70 SC=PEEK(88)+256*PEEK(89):MN=3:KL=5:S=1:EG=50:NF=1:DIM IN$(4)
80 DIM A$(50):A$="{inv}###{/inv} {inv} ###{/inv} {inv} ### {/inv} {inv} ### {/inv} {inv} ### {/inv} {inv} {/inv}"
90 DIM B$(50):B$="{inv}$$${/inv} {inv} $$${/inv} {inv} $$${/inv} {inv} $$${/inv} {inv} $$${/inv} {inv} {/inv}"
100 DIM C$(50):C$="{inv}$$${/inv} {inv} ###{/inv} {inv} $$${/inv} {inv} ###{/inv} {inv} $$${/inv} {inv} {/inv}"
110 POSITION 0,21:? #6;"score: keys:":POSITION 0,22:? #6;"men: level: S{inv}P{/inv}:"
120 NTOP=PEEK(106)-10:POKE 106,NTOP:NSET=NTOP*256:DIM CM$(32)
130 CM$="hh{inv}{CTRL-E}U{/inv}h{inv}{CTRL-E}T{/inv}h{inv}{CTRL-E}W{/inv}h{inv}{CTRL-E}V"{/inv}{CTRL-D}{inv} {/inv}{CTRL-,}{inv}1T{CTRL-Q}VHPyfUfWJPp{/inv}{CTRL-.}"
140 CM=USR(ADR(CM$),57344,NSET):POKE 756,NTOP:GOTO 170
150 POSITION 6,I-1:? #6;" ":POSITION 5,I+1:? #6;" "
160 POSITION 6,I:? #6;"alien":POSITION 5,I+2:? #6;"ASYLUMS":RETURN
170 FOR T=0 TO 47:READ A:POKE NSET+8+T,A:NEXT T
180 FOR X=0 TO 419:POKE SC+X,6:NEXT X:COLOR 130:PLOT 0,0:DRAWTO 19,0:DRAWTO 19,20:DRAWTO 0,20:DRAWTO 0,0
190 X=10:Y=9:PX=10:PY=Y:GOSUB 420
200 Q=PEEK(632):LY=(Q=13)-(Q=14):LX=(Q=7)-(Q=11)
210 IF LX=0 AND LY=0 THEN LY=OLY:LX=OLX
220 OLX=LX:OLY=LY
230 POSITION 1,10:? #6;C$(S,S+17):POSITION 1,15:? #6;B$(S,S+17)
240 POSITION 1,5:? #6;A$(S,S+17)
250 IF S+17=LEN(A$)-1 THEN R=0
260 IF S=1 THEN R=1
270 IF PEEK(20)>=110-(10*KL) THEN S=S+(R*2)-1:POKE 20,0
280 Y=Y+LY:X=X+LX:LOCATE X,Y,C:IF C=38 THEN SOUND 0,250,10,10:SOUND 0,0,0,0:SR=SR+10:B=B+1:EG=EG+2
290 IF C=130 THEN X=PX:Y=PY:LOCATE X,Y,C
300 IF Y=5 OR Y=10 OR Y=15 THEN IF C=163 OR C=164 THEN GOSUB 630
310 IF C=1 THEN K=K+1:SR=SR+100:FOR I=0 TO 30:SOUND 0,RND(0)*255,10,14:NEXT I:SOUND 0,0,0,0
320 COLOR 32:PLOT PX,PY:COLOR 133:PLOT X,Y:PX=X:PY=Y
330 EG=EG-1:IF EG<=0 THEN GOSUB 630
340 IF G=0 THEN IF SR>=10000 THEN G=1:MN=MN+1
350 IF EG>99 THEN EG=99
360 POSITION 18,21:? #6;" "
370 POSITION 6,21:? #6;SR:POSITION 18,21:? #6;KL-K:POSITION 4,22:? #6;MN:POSITION 12,22:? #6;LVL
380 POSITION 18,22:? #6;" ":POSITION 18,22:? #6;EG
390 POKE NSET+52,NF:NF=NF*2:IF NF>128 THEN NF=1
400 IF K=KL THEN LVL=LVL+1:S=1:KL=5+LVL:K=0:I=0:GOTO 670
410 GOTO 200
420 POSITION 1,10:? #6;C$(S,S+17):POSITION 1,15:? #6;B$(S,S+17):POSITION 1,5:? #6;A$(S,S+17)
430 FOR T=1 TO KL
440 COLOR 1:R=INT(RND(0)*20):RR=INT(RND(0)*20):LOCATE R,RR,C:IF C<>38 THEN 440
450 PLOT R,RR:NEXT T:RETURN
460 SOUND 1,0,0,0:SOUND 0,0,0,0:FOR X=0 TO 419:POKE SC+X,0:NEXT X
470 POSITION 0,4:? #6;" you have achieved {inv}level{/inv} ";LVL:IF SR>=HISC THEN HISC=SR
480 CLOSE #1
490 IF HISC=SR THEN ? #6;"ENTER INITIALS":OPEN #1,4,0,"K:":GOTO 510
500 IN=0:GOTO 560
510 C=1:IN$=" ":TRAP 510
520 IF C<1 OR C>4 THEN 510
530 GET #1,IN:IF IN=155 THEN 570
540 IF IN=254 OR IN=126 OR IN=30 THEN IN$(C)=" ":C=C-1:POSITION 7+C,12:? #6;" ":GOTO 520
550 IN$(C,C)=CHR$(IN):C=C+1
560 POSITION 0,10:? #6;"HI-SCORE IS ";HISC;" BY:":POSITION 8,12:? #6;IN$(1,3):IF IN<>0 THEN 520
570 POSITION 3,20:? #6;"PRESS {inv}TRIGGER{/inv}"
580 CR=8
590 CR=CR-121*(CR>120)+1:FOR X=708 TO 711:POKE X,CR+32*(X-708):NEXT X:IF STRIG(0) THEN 590
600 SETCOLOR 4,7,2:SETCOLOR 3,0,14:SETCOLOR 0,2,14:SETCOLOR 2,3,6:SETCOLOR 1,12,12
610 OLX=0:OLY=0:LVL=0:SR=0:K=0:KL=5:S=1:MN=3:EG=50:POSITION 6,21
620 ? #6;" ":GOTO 180
630 COLOR 32:PLOT PX,PY:COLOR 37:PLOT X,Y
640 MN=MN-1:X=10:Y=9:FOR T=100 TO 0 STEP -1:SOUND 0,T+75,10,15:SOUND 1,(100-T)+75,10,15:NEXT T:IF MN=-1 THEN 460
650 SOUND 0,0,0,0:SOUND 1,0,0,0
660 OLX=0:OLY=0:EG=50:RETURN
670 FOR I=1 TO 5:CM$(I,I)=CHR$(PEEK(707+I)):NEXT I:FOR I=0 TO 9
680 FOR Y=708 TO 712:POKE Y,PEEK(Y)+I:NEXT Y:NEXT I
690 FOR I=1 TO 5:POKE 707+I,ASC(CM$(I,I)):NEXT I
700 OLX=0:OLY=0:EG=50:GOTO 180
710 DATA 7,5,253,165,165,7,0,0,0,60,126,126,126,126,60,0,124,84,254,146,214,0,0,0,124,214,214,124,56
720 DATA 124,84,0,16,84,56,238,56,84,16,0,0,0,0,00,16,0,0,0
Download
The original program from the Antic disk, to LOAD or ENTER instead of typing it: ASYLUM.BAS.
Credits
- Program listing: Alien Asylum — program listing (Antic, October 1985 (Vol. 4, No. 6), Game of the Month) — Spencer Craske
- Picture: A room in the asylum: rows of inmates, a field of Living Lights and keys to collect. — Spencer Craske (program); screenshot by the site
- Antic, October 1985 - Vol. 4 No. 6: scan of the printed magazine, PDF pages 31 and 34 (article) — Internet Archive, 1985
- Antic disk, October 1985 - Vol. 4 No. 6: ASYLUM.BAS (detokenized listing) — Spencer Craske, 1985
