Caverns of the Minotaur
- Type
- Game
- Category
- Maze treasure-hunt chase game
- Author
- Rufus Reynolds
- Published in
- Antic, February/March 1990 (Vol. 8, No. 8)
- Year
- 1990
- Language
- Atari BASIC
- Requirements
- 48K RAM, Atari BASIC, disk drive (per the magazine), joystick in port 1
- Tags
- antic, maze, chase, minotaur, joystick, graphics-1, redefined-characters, enemy-ai, atari-basic
About the program
You've crept into the caverns under King Minos's palace, where gold and diamonds have been hidden in the corners and niches. Unfortunately the minotaur has caught your scent. Half man, half bull, it won't give up, but, as the article put it, it "is not that bright, at least in the early levels". Caverns of the Minotaur, by 19-year-old Rufus H. Reynolds III of Clinton, Maryland, who had been programming his Atari for about five years, was the Game of the Month in the February/March 1990 Antic, one of the last issues of the magazine's life.
It's a compact single-screen game in GRAPHICS 1 with a handful of redefined characters, and it's a good example of how much play you can get from a simple chase routine with one tweak.
What you need
A 48K Atari 8-bit with Atari BASIC and a joystick. The magazine listed a disk drive.
Typing it in
There are almost no special characters. Only line 26063 has inverse text ({inv}START{/inv}, typed with the Atari key on). The rest is plain BASIC and DATA. The magazine's TYPO II codes are not in this disk version. Take care with the DATA lines: lines 90–180 are the wall coordinates for the two mazes (four numbers per wall: start X,Y and end X,Y), lines 310–370 place the gold and diamonds, and each list ends with -1. Line 5 is a 20-byte machine-language routine that copies the ROM character set into RAM. It's typed as plain numbers, so nothing can go wrong there except a wrong digit.
How to play
RUN it. A tune plays over the title screen; press START. You're the small figure, and the minotaur is the dark beast. Steer with the joystick and collect the treasure: gold scores 10 and diamonds 20. Your lives are shown top right, and the minotaur catching you costs one.
Collect enough treasure and two keys appear. One opens the secret passages on the left and right edges: stand next to one and press the button, then run through to come out on the other side of the screen. The other key opens the altar room in the centre: stand just below it and press the button. Reaching the altar takes you to the next level. There are only two floor plans, which alternate, but the minotaur learns as you go.
How it works
- The chase (lines 430–460) is as simple as it gets: if you're to its right it steps right, else left, else up, else down. Walls stop it, and then lines 20000–20080 choose a random direction instead.
- The learning. Lines 424–426 make the minotaur take a random step on every other turn until
SKILLreaches 13. Each level adds one toSKILL, so from level 13 onwards it chases you on every move, and that's when, as the article warned, you need to be an expert arcade player. - LOCATE for everything. Both you and the minotaur
LOCATEthe target square before moving. Character 136 (inverse) is wall, 35 and 36 are gold and diamonds, 33 and 1 the keys, and 37/38 the altar. - Mazes from lines. Each maze is drawn with
PLOT/DRAWTOof a wall character from coordinate DATA, so the two levels cost only a few DATA lines.
Two slips in the published listing are corrected here (see "Changes from the published listing"): the key-pickup sound in line 22000 now sweeps instead of giving a single blip, and reaching a million points now ends the game on the final-score screen instead of crashing.
Variations to try
- Make the minotaur relentless from the start by changing
SKILL>=13in line 424 toSKILL>=1, or keep it dim for longer with a bigger number. - Design a third maze: add
MAZE=3cases to lines 60–65, 200–285 and 330–335 with new DATA, and cycle through three in lines 24060–24070.
Changes from the published listing
| Line | As published | Now | Why |
|---|---|---|---|
| 22000 | FOR ZZ=0 TO 40 STEP -1 |
FOR ZZ=40 TO 0 STEP -1 |
A loop from 0 up to 40 with a negative step runs only once, so the key-pickup sound was a single blip. The bounds are swapped, keeping the author's STEP -1, so it sweeps through 41 notes alongside ZZZ. |
| 395 | …THEN GOTO 29000 |
…THEN GOTO 26000 |
There is no line 29000 (in print or on disk), so a million points stopped the program with ERROR 12. It now goes to the game's own end screen, which shows the final score and level. |
| 20010–20050 | MOVE |
MOVX |
Altirra BASIC (used by many emulators) has a MOVE command, so it rejected lines that use a variable named MOVE. The same-length name keeps memory use identical; behaviour on Atari BASIC is unchanged. |
Listing
0 REM CAVERNS OF THE MINOTAUR
1 REM BY RUFUS REYNOLDS
2 REM (c)1990, ANTIC PUBLISHING INC.
3 CLR :DIM P1$(20):A=PEEK(106)-8:NCB=A*256:POKE 204,A:POKE 206,224
4 FOR X=1 TO 20:READ B:P1$(X,X)=CHR$(B):NEXT X
5 DATA 104,162,4,160,0,177,205,145,203,200,208,249,230,206,230,204,202,208,242,96
6 Q=USR(ADR(P1$))
7 DLIST=PEEK(560)+PEEK(561)*256
8 MAZE=1:LI=2:SKILL=1
10 DATA 0,0,224,191,165,229,0,0,56,56,16,56,84,16,40,108,60,126,195,223,209,219,66,60,0,24,60,126,126,60,24,0
20 DATA 0,0,0,15,19,27,3,7,0,0,0,240,200,216,192,224,60,24,255,255,189,189,36,102
30 DATA 187,187,187,0,238,238,238,0
35 RESTORE 10
40 FOR D=NCB+1*8 TO NCB+9*8-1:READ E:POKE D,E:NEXT D
50 GOSUB 30000
55 GRAPHICS 1+16:POKE 756,A
60 IF MAZE=1 THEN RESTORE 90
65 IF MAZE=2 THEN RESTORE 140
70 READ GR1,GR2,GR3,GR4:IF GR1=-1 THEN 190
80 COLOR 136:PLOT GR1,GR2:DRAWTO GR3,GR4:GOTO 70
90 DATA 0,0,19,0,0,1,8,1,11,1,19,1,0,2,0,10,19,0,19,10,0,12,0,22,19,12,19,22,0,23,19,23
100 DATA 3,3,6,3,9,3,10,3,13,3,16,3,2,4,3,4,8,4,11,4,16,4,17,4,8,5,11,5,4,6,4,6,9,6,10,6,15,6,15,6
110 DATA 3,7,5,7,14,7,16,7,4,8,4,8,15,8,15,8,8,10,11,10,8,11,8,14,11,11,11,14
120 DATA 4,16,4,16,15,16,15,16,3,17,5,17,14,17,16,17,4,18,4,18,9,18,10,18,15,18,15,18,8,19,11,19
130 DATA 2,20,3,20,8,20,11,20,16,20,17,20,3,21,6,21,13,21,16,21,9,21,10,21,-1,-1,-1,-1
140 DATA 0,0,0,23,19,0,19,23,1,0,18,0,1,23,18,23
150 DATA 4,3,6,5,6,3,4,5,8,3,11,3,8,4,8,6,11,4,11,6,13,3,15,5,13,5,15,3,9,8,10,8,8,9,11,9,8,10,11,10
160 DATA 4,10,5,10,9,11,10,11,14,10,15,10,3,11,6,11,13,11,16,11,3,12,6,12,13,12,16,12
170 DATA 4,13,5,13,9,13,10,13,14,13,15,13,8,14,11,14,8,15,11,15,9,16,10,16,4,19,6,21,4,21,6,19
180 DATA 8,18,11,18,8,19,8,21,11,19,11,21,9,21,10,21,13,19,15,21,13,21,15,19,1,1,18,1,-1,-1,-1,-1
190 COLOR 40:PLOT 0,11:PLOT 19,11
200 IF MAZE=1 THEN EX=9:EY=14:EX1=10
210 IF MAZE=2 THEN EX=9:EY=6:EX1=10
220 COLOR 136:PLOT EX,EY:DRAWTO EX1,EY
230 IF MAZE=1 THEN A1=9:A2=11:A3=10
240 IF MAZE=2 THEN A1=9:A2=4:A3=10
250 COLOR 37:PLOT A1,A2:COLOR 38:PLOT A3,A2
260 IF MAZE=1 THEN X=9:Y=1:X1=X:Y1=Y:MX=1:MY=11:MX1=MX:MY1=MY
270 IF MAZE=2 THEN X=6:Y=4:X1=X:Y1=Y:MX=13:MY=4:MX1=MX:MY1=MY
280 IF MAZE=1 THEN RESTORE 310
285 IF MAZE=2 THEN RESTORE 320
290 READ G1,G2:IF G1=-1 THEN 330
300 COLOR 35:PLOT G1,G2:GOTO 290
310 DATA 2,3,4,4,17,3,15,4,5,6,3,8,14,6,16,8,5,16,3,18,16,16,14,18,2,21,17,21,-1,-1
320 DATA 5,3,5,5,14,3,14,5,8,8,11,11,6,10,3,13,13,10,16,13,11,13,8,16,5,19,5,21,14,19,14,21,-1,-1
330 IF MAZE=1 THEN RESTORE 360
335 IF MAZE=2 THEN RESTORE 370
340 READ D1,D2:IF D1=-1 THEN 380
350 COLOR 36:PLOT D1,D2:GOTO 340
360 DATA 8,3,11,3,3,6,8,6,11,6,16,6,5,8,14,8,3,16,14,16,5,18,8,18,11,18,16,18,4,20,15,20,8,21,11,21,-1,-1
370 DATA 4,4,15,4,11,8,3,10,8,11,16,10,6,13,8,13,13,13,11,16,4,20,15,20,-1,-1
380 COLOR 2:PLOT X,Y:COLOR 167:PLOT MX,MY
390 POSITION 1,0:? #6;SC
395 IF SC>=1000000 THEN GOTO 26000
400 IF LI=2 THEN COLOR 2:PLOT 14,0:DRAWTO 15,0
410 IF LI=1 THEN COLOR 2:PLOT 14,0
415 IF LI=-1 THEN 26000
420 S=STICK(0):T=STRIG(0)
424 IF SKILL>=13 THEN 430
425 IF DONE=1 THEN DONE=0:GOTO 430
426 IF DONE=0 THEN DONE=1:GOTO 20000
430 IF X>MX THEN MX=MX+1:GOTO 470
440 IF X<MX THEN MX=MX-1:GOTO 470
450 IF Y>MY THEN MY=MY+1:GOTO 470
460 IF Y<MY THEN MY=MY-1
470 LOCATE MX,MY,HIT
480 IF HIT=40 THEN 20000
490 IF HIT=136 THEN 20000
500 IF HIT=33 OR HIT=1 THEN 20000
510 IF HIT=2 THEN 21000
520 COLOR 0:PLOT MX1,MY1:COLOR 167:PLOT MX,MY:MX1=MX:MY1=MY
530 IF S=7 THEN X=X+1:IF X>19 THEN X=1
535 IF S=7 THEN 600
536 IF PEEK(77)=254 THEN POKE 77,0
540 IF S=11 THEN X=X-1:IF X<0 THEN X=18
545 IF S=11 THEN 600
550 IF S=14 THEN Y=Y-1:GOTO 600
560 IF S=13 THEN Y=Y+1:GOTO 600
570 IF T=0 AND KEY=1 AND X=1 AND Y=11 THEN COLOR 0:PLOT 0,11:PLOT 19,11:GOTO 420
575 IF T=0 AND KEY=1 AND X=18 AND Y=11 THEN COLOR 0:PLOT 0,11:PLOT 19,11:GOTO 420
580 IF T=0 AND KEY1=1 AND MAZE=1 AND X=9 AND Y=15 THEN COLOR 0:PLOT 9,14:DRAWTO 10,14
585 IF T=0 AND KEY1=1 AND MAZE=1 AND X=10 AND Y=15 THEN COLOR 0:PLOT 9,14:DRAWTO 10,14
590 IF T=0 AND KEY1=1 AND MAZE=2 AND X=9 AND Y=7 THEN COLOR 0:PLOT 9,6:DRAWTO 10,6
592 IF T=0 AND KEY1=1 AND MAZE=2 AND X=10 AND Y=7 THEN COLOR 0:PLOT 9,6:DRAWTO 10,6
595 GOTO 420
600 LOCATE X,Y,HIT
610 IF HIT=33 THEN KEY=1:GOTO 22000
620 IF HIT=1 THEN KEY1=1:GOTO 22000
630 IF HIT=35 THEN GOLD=GOLD+1:SC=SC+10:GOTO 23000
640 IF HIT=36 THEN GOLD=GOLD+1:SC=SC+20:GOTO 23000
650 IF HIT=37 OR HIT=38 THEN GOTO 24000
670 IF HIT=167 THEN 21000
680 IF HIT=40 OR HIT=136 THEN X=X1:Y=Y1
690 IF GOLD>=14 AND MAZE=1 AND KEY<>1 THEN COLOR 33:PLOT 18,4
691 IF GOLD>=14 AND MAZE=2 AND KEY<>1 THEN COLOR 33:PLOT 13,20
692 IF GOLD>14 AND MAZE=1 AND KEY1<>1 THEN COLOR 1:PLOT 1,4
693 IF GOLD>14 AND MAZE=2 AND KEY1<>1 THEN COLOR 1:PLOT 6,20
695 COLOR 0:PLOT X1,Y1:COLOR 2:PLOT X,Y:X1=X:Y1=Y:GOTO 420
700 GOTO 420
20000 MX=MX1:MY=MY1
20010 MOVX=INT(4*RND(0)+1)
20020 IF MOVX=1 THEN MX=MX+1:GOTO 20060
20030 IF MOVX=2 THEN MX=MX-1:GOTO 20060
20040 IF MOVX=3 THEN MY=MY+1:GOTO 20060
20050 IF MOVX=4 THEN MY=MY-1:GOTO 20060
20060 LOCATE MX,MY,HIT:IF HIT=40 OR HIT=136 THEN MX=MX1:MY=MY1:GOTO 520
20070 IF HIT=2 THEN 21000
20080 GOTO 520
21000 COLOR 0:PLOT MX,MY:PLOT MX1,MY1:COLOR 167:PLOT X,Y
21010 COUNT=800:FOR ZZ=20 TO 0 STEP -1:SOUND 0,COUNT,10,ZZ:SOUND 1,COUNT+(ZZ*99),10,ZZ:COUNT=COUNT-10:NEXT ZZ
21020 SOUND 0,0,0,0:SOUND 1,0,0,0:LI=LI-1:GOTO 55
22000 ZZZ=60:FOR ZZ=40 TO 0 STEP -1:SOUND 0,ZZ,10,8:SOUND 1,ZZZ,10,8:ZZZ=ZZZ-1:NEXT ZZ
22010 COLOR 2:PLOT X,Y:COLOR 0:PLOT X1,Y1:X1=X:Y1=Y
22020 SOUND 0,0,0,0:SOUND 1,0,0,0
22030 GOTO 390
23000 COLOR 2:PLOT X,Y:COLOR 0:PLOT X1,Y1:X1=X:Y1=Y
23010 FOR ZZ=-20 TO 20:SOUND 0,ABS(ZZ),10,8:NEXT ZZ:SOUND 0,0,0,0:GOTO 390
24000 GOSUB 25000
24001 FOR COUNT=0 TO 5:SETCOLOR 4,8,8
24020 FOR ZZ=1 TO 50:NEXT ZZ
24030 SETCOLOR 4,0,0:FOR ZZ=1 TO 50:NEXT ZZ
24040 NEXT COUNT
24050 SETCOLOR 4,0,0
24060 IF MAZE=1 THEN MAZE=2:GOTO 24080
24070 IF MAZE=2 THEN MAZE=1
24080 SC=SC+GOLD
24085 SKILL=SKILL+1
24090 GOLD=0:KEY=0:KEY1=0:GOTO 55
25000 FOR ZZZ=1 TO 3:FOR ZZ=20 TO 0 STEP -1:SOUND 0,20,10,ZZ:NEXT ZZ:SOUND 0,0,0,0:NEXT ZZZ:RETURN
26000 CLEAR=0
26010 COLOR 0:PLOT CLEAR,0:DRAWTO CLEAR,23:CLEAR=CLEAR+1
26020 IF CLEAR=20 THEN 26040
26030 GOTO 26010
26040 FOR S=0 TO 3:SOUND S,0,0,0:NEXT S
26060 COLOR 136:PLOT 6,2:DRAWTO 13,2:DRAWTO 13,4:DRAWTO 6,4:DRAWTO 6,2
26062 POSITION 3,0:? #6;"YOUR SCORE WAS":POSITION 7,3:? #6;SC
26063 POSITION 0,10:? #6;"{inv}START{/inv} TO PLAY AGAIN."
26064 POSITION 0,6:? #6;"YOU REACHED LEVEL ";SKILL
26070 POKE 53279,8
26080 IF PEEK(53279)=6 THEN GOLD=0:KEY=0:KEY1=0:LI=2:SC=0:MAZE=1:SKILL=1:GOTO 50
26090 GOTO 26070
30000 GRAPHICS 2:SETCOLOR 2,0,0:POSITION 3,1:? #6;"CAVERNS OF THE":POSITION 6,3:? #6;"MINOTAUR"
30005 POKE 752,2
30010 ? " Made by Rufus H Reynolds III":? :? " {inv}START{/inv} TO BEGIN"
30035 RESTORE 30070
30040 READ C,B:IF C=-1 THEN RESTORE 30070:GOTO 30040
30050 SOUND 0,C,10,10:FOR I=1 TO B*0.4:NEXT I:SOUND 0,0,0,0
30052 IF PEEK(53279)=6 THEN SOUND 0,0,0,0:RETURN
30060 GOTO 30040
30070 DATA 81,50,60,50,60,100,64,50,64,100,72,50,72,50,81,100,91,50,96,50,96,100,81,50
30080 DATA 60,50,60,100,64,25,64,50,72,50,81,50,81,200,81,50,60,50,60,50,60,50,60,50,64,50,64,100
30090 DATA 72,50,72,50,81,50,81,50,96,50,108,50,121,50,121,100,72,25,72,25,72,50,72,100
30100 DATA 81,25,81,25,91,100,96,100,108,200,0,100,-1,-1
Download
The original program from the Antic disk, to LOAD or ENTER instead of typing it: MINOTAUR.BAS.
Credits
- Program listing: Caverns of the Minotaur — program listing (Antic, February/March 1990 (Vol. 8, No. 8)) — Rufus Reynolds
- Picture: The first cavern: gold and diamonds in every corner, the altar room in the middle and the minotaur closing in. — Rufus Reynolds (program); screenshot by the site
- Antic magazine scan (OCR text layer), February/March 1990, p. 31: Caverns of the Minotaur, by Rufus Reynolds — Rufus Reynolds; Internet Archive, 1990
- Antic Software Archive — February/March 1990 - Vol. 8 No. 8 disk: MINOTAUR.BAS — Rufus Reynolds, 1990
