Escape Maze
- Type
- Game
- Category
- Timed maze game
- Author
- C. G. Roberts
- Published in
- Antic, March 1984 (Vol. 2, No. 12), bonus game
- Year
- 1984
- Language
- Atari BASIC
- Requirements
- 16K RAM (cassette) or 24K (with DOS), joystick in port 1, Atari BASIC
- Tags
- antic, maze, graphics-7, locate, joystick, new-zealand, user-group, atari-basic
About the program
Antic's March 1984 issue looked at the international Atari scene, and its bonus game came from New Zealand. Escape Maze had won the programming prize of the Waikato Atari Users Club. (The title screen says 1982. The REM gives the author's initials as G.C., but the magazine credited C. G. Roberts.)
Your "man" is a flashing dot that starts on the right of the screen. You must guide it out through three mazes, each reached only by escaping the one before, and each with a tight time limit. Every maze has only one real exit, even if it looks as if there are more. The first maze also has invisible walls that send you back to the start. The second builds random new walls while you search, and touching a wall teleports you to a random spot. That can help if a new wall has blocked your only route, and a lucky jump into the "teleportal" near the exit sends you straight on to maze three. In the third maze, touching a wall sends you all the way back to the beginning. Escape all three for a round of "cosmic applause".
What you need
A joystick in port 1, Atari BASIC, and 16K (24K with DOS).
Typing it in
Plain ASCII. The three mazes are DATA lists of line endpoints, ended by 999. Line 270 reads them as PLOT x,y then DRAWTO x,y pairs. Several lines use the letter O where you'd expect a zero: GRAPHICS O and POSITION O,10 in line 20, POSITION O,10 in line 340 and SOUND O,... in line 720. The variable O is never set, so it equals 0 and they work. Type them as printed if you want an exact copy.
How to play
Push the joystick in any of eight directions to move the dot one pixel at a time. The clock (TIME, counted in moves) runs out at 600, and then you go back to the very beginning. At the end, press the trigger to play again.
How it works
- Each maze is drawn in GRAPHICS 23 (GRAPHICS 7 with no text window) from DATA with
PLOTandDRAWTO, using colour 2 for the walls. - Wall checks use
LOCATE: if the pixel the dot moves onto is colour 2, it's a hit (lines 680, 700 and 1040). The dot is drawn in colour 1, and its old position is overwritten in colour 3, so you can see the path you took. - The invisible walls of maze 1 are simply a coordinate test (line 210:
X<60 AND Y<40), not drawn lines. - In maze 2, lines 1050–1060 add a random wall segment now and then, and line 1070 picks a random landing spot after a hit.
Listing
5 REM ANTIC MAGAZINE MARCH 1984
6 REM ESCAPE MAZE
7 REM BY G.C. ROBERTS
20 GRAPHICS O:POKE 752,1:SETCOLOR 2,6,1:POSITION O,10:? ," ESCAPE MAZE":POSITION 0,12:? ," G.C. ROBERTS"
30 POSITION 0,14:? ," 1982"
40 FOR I=1 TO 255 STEP 4:SOUND 0,I,8,10:GOSUB 970:NEXT I
50 FOR T=1 TO 10:SETCOLOR 2,6,1:FOR D=1 TO 50:NEXT D:SETCOLOR 2,6,7:FOR D=1 TO 50:NEXT D:NEXT T:SOUND 0,0,0,0
60 GRAPHICS 0:POKE 752,1:SETCOLOR 2,4,6:SETCOLOR 1,0,0:RESTORE
70 TIME=0:FOR T=1 TO 23:? "EASY! NOT AS EASY AS IT LOOKS!"
75 HIT=0
80 FOR R=1 TO 5:SOUND 0,INT(RND(1)*256),10,10:NEXT R:NEXT T:SOUND 0,0,0,0
90 REM * <<< MAZE 1 >>>
100 GRAPHICS 7+16:COLOR 2:GOSUB 270
110 DATA 0,0,159,0,159,0,159,95,159,95,0,95,0,95,0,50,0,40,0,0
120 DATA 10,10,30,10,40,10,80,10,90,10,150,10,2,20,10,20,50,20,90,20,100,20,150,20,30,30,40,30,60,30,70,30
130 DATA 80,30,90,30,120,30,150,30,40,40,50,40,70,40,100,40,110,40,150,40,30,50,50,50,90,50,100,50,110,50,150,50
140 DATA 40,60,60,60,70,60,80,60,100,60,150,60,4,70,30,70,54,70,90,70,100,70,150,70,20,80,40,80,60,80,76,80
150 DATA 90,80,150,80,24,90,50,90,70,90,80,90,10,20,10,80,20,10,20,60,20,80,20,90,30,20,30,40,30,50,30,60
160 DATA 40,10,40,30,40,60,40,80,50,20,50,50,50,64,50,94,60,30,60,70,60,80,60,95,70,2,70,10,70,40,70,50
170 DATA 80,30,80,60,80,70,80,90,90,10,90,30,90,50,90,70,90,74,90,95,100,30,100,40,110,30,110,40,999,999
180 X=156:Y=48
190 COLOR 1:SETCOLOR 2,0,0
200 GOSUB 860
210 IF X<60 AND Y<40 THEN GOTO 180
220 IF X<1 AND Y<50 THEN GOTO 290
230 GOSUB 680
240 COLOR 1:SOUND 0,0,0,0:PLOT X,Y:COLOR 3:PLOT J,K:GOTO 190
250 GOSUB 1080
260 SOUND 0,64,10,8:GOTO 180
270 READ X,Y:IF X<>999 THEN PLOT X,Y:READ X,Y:DRAWTO X,Y:GOTO 270
280 RETURN
290 X=1:Y=45:FOR T=1 TO 3:FOR C=1 TO 14:SOUND 0,64,C,C:SETCOLOR 1,C,C:FOR D=1 TO 35:NEXT D:NEXT C
300 FOR W=1 TO 20:NEXT W:NEXT T
310 FOR C=0 TO 15 STEP 3:FOR D=1 TO 10:NEXT D:SETCOLOR 4,C,7
320 FOR P=243 TO 31 STEP -7:FOR D=1 TO 5:NEXT D:SOUND 0,P,10,9:NEXT P:NEXT C
330 GRAPHICS 0:POKE 752,1:SETCOLOR 2,6,4
340 POSITION O,10:PRINT ,,"CONGRATULATIONS!"
350 PRINT ,"YOU FOUND A WAY AROUND THE INVISIBLE WALLS!"
360 SOUND 0,0,0,0:FOR T=1 TO 900:NEXT T
370 REM * <<< MAZE 2 >>>
380 HIT=0:MAZE=0:TIME=0:GRAPHICS 7+16:SETCOLOR 1,8,10:COLOR 2:GOSUB 270
390 DATA 0,0,159,0,159,0,159,95,159,95,0,95,0,95,0,50,0,40,0,0,20,10,50,10,60,10,150,10,1,20,30,20,40,20,66,20
400 DATA 80,20,140,20,20,10,20,20,30,0,30,10,10,30,30,30,90,30,100,30,44,80,50,80
410 DATA 30,30,60,30,110,30,140,30,10,40,50,40,110,40,150,40,20,50,56,50,80,50,90,50,110,50,150,50,0,60,20,60
420 DATA 24,60,60,60,100,60,140,60,20,70,40,70,50,70,76,70,80,70,140,70,10,80,40,80,60,80,150,80
430 DATA 10,40,10,56,20,50,20,95,30,20,30,30,50,30,50,40,50,64,50,95,60,10,60,60,70,20,70,70,80,20,80,50
440 DATA 80,60,80,70,90,34,90,66,100,30,100,60,110,30,110,40,140,20,140,30,140,60,140,70,150,10,150,40
450 DATA 40,14,40,20,60,84,60,95,70,0,70,10,110,50,110,56,150,50,150,80,999,999
460 X=156:Y=48
470 COLOR 1:SETCOLOR 2,0,0
480 IF X<50 AND Y<50 THEN GOTO 530
490 GOSUB 860
500 GOSUB 1040
510 COLOR 1:SOUND 0,0,0,0:PLOT X,Y:COLOR 3:PLOT J,K:GOTO 470
520 REM * <<< MAZE 3 >>>
530 TIME=0:GRAPHICS 7+16:SETCOLOR 1,4,10:COLOR 2:GOSUB 270
540 DATA 0,0,159,0,159,0,159,95,159,95,0,95,0,95,0,60,0,50,0,0
550 DATA 10,10,50,10,60,10,90,10,100,10,140,10,10,20,60,20,80,20,130,20,140,20,150,20,20,30,86,30,90,30,110,30
560 DATA 130,30,140,30,1,40,20,40,50,40,140,40,20,50,30,50,54,50,130,50,10,60,20,60,50,60,96,60,100,60,110,60
570 DATA 54,70,90,70,120,70,136,70,20,80,30,80,40,80,60,80,70,80,140,80,10,90,20,90,34,90,66,90,70,90,150,90
580 DATA 10,10,10,30,10,50,10,86,20,40,20,60,20,64,20,90,30,34,30,76,30,80,30,95,40,30,40,80,50,20,50,30
590 DATA 50,40,50,76,50,80,50,90,60,1,60,10,70,14,70,30,70,64,70,95,80,10,80,20,90,30,90,40,10,30,10,40
600 DATA 100,14,100,30,100,44,100,70,110,60,110,80,120,20,120,36,120,60,120,70,140,10,140,30,140,40,140,70
610 DATA 130,50,130,60,150,20,150,50,150,60,150,90,999,999
620 X=156:Y=55
630 COLOR 1:SETCOLOR 2,0,0
640 IF X<3 AND Y<59 THEN GOTO 720
650 GOSUB 860
660 GOSUB 700
670 COLOR 1:SOUND 0,0,0,0:PLOT X,Y:COLOR 3:PLOT J,K:GOTO 630
680 LOCATE X,Y,A:IF A=2 THEN GOTO 250
690 RETURN
700 LOCATE X,Y,A:IF A=2 THEN RESTORE :GOTO 60
710 RETURN
720 X=1:Y=55:FOR S=1 TO 2:FOR I=255 TO 1 STEP -4:SOUND O,I,10,10
730 GOSUB 960:NEXT I
740 SETCOLOR 2,INT(RND(1)*16),0:NEXT S:FOR I=255 TO 1 STEP -4:SOUND 0,I,8,10:GOSUB 970:NEXT I
750 WAIT=10:FOR T=1 TO 20:SOUND 0,INT(RND(1)*256),10,10:GOSUB 980:NEXT T:SOUND 0,0,0,0
760 WAIT=3:FOR I=1 TO 255 STEP 4:SOUND 0,I,8,10:GOSUB 980:NEXT I
770 SOUND 0,0,0,0
780 GRAPHICS 2:SETCOLOR 4,4,6
790 POKE 709,12
800 POKE 710,0
810 ? "PRESS THE TRIGGER TO PLAY AGAIN "
820 FOR Y=1 TO 500:IF STRIG(0)=0 THEN RESTORE :GOTO 60
830 NEXT Y:GRAPHICS 0:POKE 752,1
840 POKE 709,12:POKE 710,0:POSITION 0,12:? ," THE END"
850 GOTO 850
860 TIME=TIME+1:IF TIME=600 THEN GOTO 60
870 J=X:K=Y:IF STICK(0)=14 THEN Y=Y-1
880 IF STICK(0)=6 THEN X=X+1:Y=Y-1
890 IF STICK(0)=13 THEN Y=Y+1
900 IF STICK(0)=5 THEN Y=Y+1:X=X+1
910 IF STICK(0)=9 THEN Y=Y+1:X=X-1
920 IF STICK(0)=11 THEN X=X-1
930 IF STICK(0)=10 THEN Y=Y-1:X=X-1
940 IF STICK(0)=7 THEN X=X+1
950 RETURN
960 FOR W=1 TO 5:NEXT W:RETURN
970 FOR W=1 TO 5:NEXT W:RETURN
980 FOR W=1 TO WAIT:NEXT W:RETURN
990 GOSUB 1070
1000 FOR I=1 TO 255 STEP 20:SOUND O,I,8,10
1010 FOR T=1 TO 15:POKE 710,32+T:NEXT T:NEXT I:SOUND 0,0,0,0
1020 GOSUB 1080
1030 RETURN
1040 LOCATE X,Y,A:IF A=2 THEN GOSUB 990
1050 IF RND(0)*200>1 THEN RETURN
1060 TX=X:TY=Y:COLOR 2:GOSUB 1070:PLOT X,Y:GOSUB 1070:DRAWTO X,Y:X=TX:Y=TY:RETURN
1070 X=INT(RND(0)*159):Y=INT(RND(0)*95):RETURN
1080 HIT=HIT+1:IF HIT=4 THEN GOTO 60
1090 RETURN
1100 RUN
Download
The original program from the Antic disk, to LOAD or ENTER instead of typing it: ESCAPEMZ.BAS.
Credits
- Program listing: Escape Maze — program listing (Antic, March 1984 (Vol. 2, No. 12), bonus game) — C. G. Roberts
- Picture: The first maze. Its invisible walls aren't drawn. — C. G. Roberts (program); screenshot by the site
- Antic article text (March 1984 - Vol. 2 No. 12) — Escape Maze, game — C. G. Roberts, 1984
- Antic Software Archive — disk files (March 1984 - Vol. 2 No. 12): ESCAPEMZ.BAS — AtariMagazines.com (Kevin Savetz), 1984
