Compucolor.org – Virtual Media

Listing of file='ESCAPE.BAS;01' on disk='vmedia/arcade_games-sector.ccvf'

100 REM  "ESCAPE", AN ESCAPE-FROM-PRISON ONE-PLAYER GAME
110 REM  BY WALLACE RUST, COPYRIGHT 1980
120 REM
200 REM
  HOUSEKEEPING

210 CLEAR 50:DIM R(117)
220 DG= 1:DW= 1:LG= 99:LW= 40
230 LP= 27180:SC= 0
300 REM
  DISPLAY TITLE PAGE

310 PLOT 27,24,6,3,12,6,11,14,3,27,6
320 PRINT " 'ESCAPE' "
330 PLOT 6,2,3,18,12
340 PRINT "A ONE-PLAYER GAME BY W. RUST"
350 FOR Z= 1TO 1000:NEXT Z
400 REM
  LOAD ROUTE ARRAY R WITH SCREEN ADDRESSES

410 FOR J= 0TO 7:R(J)= 26946- 128* J:NEXT J
420 FOR J= 8TO 27:R(J)= 26048- 2* (J- 8):NEXT J
430 FOR J= 28TO 32:R(J)= 25882- 128* (J- 28):NEXT J
440 FOR J= 33TO 46:R(J)= 25368:NEXT J:REM  PAUSE IN OFFICE
450 FOR J= 47TO 55:R(J)= 25366+ 128* (J- 47):NEXT J
460 FOR J= 56TO 77:R(J)= 26392+ 2* (J- 56):NEXT J
470 FOR J= 78TO 89:R(J)= 26562+ 128* (J- 78):NEXT J
480 FOR J= 90TO 99:R(J)= 27972+ 2* (J- 90):NEXT J
490 FOR J= 100TO 105:R(J)= 27862- 128* (J- 100):NEXT J
500 FOR J= 106TO 115:R(J)= 27220- 2* (J- 106):NEXT J
510 R(116)= 27074:R(117)= 26946
520 REM  POINTS 0, 81, 117 COINCIDE AT X,Y = 33,18
600 REM
  DISPLAY INSTRUCTIONS

610 PLOT 15,6,3,12,3,0,5
620 PRINT "IT IS FRIDAY THE 13TH AT 11:25 P.M.  YOU ARE PRISONER"
630 PRINT "NO. 29313 IN THE BIG HOUSE AND ARE ABOUT TO ESCAPE."
640 PRINT :PLOT 6,6
650 PRINT "TO GAIN YOUR FREEDOM, YOU MUST SUCCESSFULLY COMPLETE"
660 PRINT "SEVERAL TASKS IN SUCCESSION.  IF YOU ARE SEEN WALKING"
670 PRINT "THE CORRIDORS, THE JIG IS UP - YOU LOSE!"
690 PRINT :PLOT 6,2
700 PRINT "THE WARDEN AND GUARD WILL BE PATROLING THE PRISON,"
710 PRINT "AND YOU MUST MOVE WITHOUT BEING SEEN.  USE THE"
720 PRINT "GREEN NUMBER KEYS TO MOVE IN ANY DIRECTION.  PRESS 8"
730 PRINT "TO MOVE NORTH, 4 FOR WEST, 6 FOR EAST, 2 FOR SOUTH."
740 PRINT "YOU WILL NOT AROUSE SUSPICION WHILE YOU ARE IN A"
750 PRINT "BLACK AREA."
760 PRINT :PLOT 6,5
770 PRINT "YOU CANNOT WALK THROUGH WALLS OR CLOSED DOORS."
830 PRINT :PRINT
840 PLOT 6,33,87,6,3:PRINT " WARDEN";SPC( 5):
850 PLOT 6,39,71,6,3:PRINT " GUARD";SPC( 5);
860 PLOT 6,35,100,6,3:PRINT " YOU, THE PRISONER"
900 PRINT :PRINT :PLOT 6,1
910 INPUT "HIT 'RETURN' KEY WHEN YOU ARE READY TO BEGIN! ";Q$
920 I= PEEK (33209):FOR J= 0TO I:K= RND (1):NEXT J:REM  RANDOMIZE
1000 REM
DRAW PRISON

1010 PLOT 27,24,6,32,12,15
1015 PLOT 6,0:REM --- SAFE AREAS
1020 FOR Y= 10TO 21:PLOT 3,45,Y
1022 PRINT "                   ":NEXT Y
1024 FOR Y= 28TO 30:PLOT 3,1,Y
1026 PRINT "                             ":NEXT Y
1028 FOR Y= 23TO 30:PLOT 3,50,Y
1030 PRINT "              ":NEXT Y
1032 FOR Y= 16TO 21:PLOT 3,21,Y
1034 PRINT "         ":NEXT Y
1036 FOR Y= 3TO 6:PLOT 3,1,Y
1038 PRINT "     ":NEXT Y
1040 FOR Y= 3TO 8:FOR X= 26TO 62:PLOT 3,X,Y,32:NEXT X:NEXT Y
1055 PLOT 3,0,0,11,3,0,1,11
1060 PLOT 6,16:REM --- WALLS
1070 PLOT 3,0,2,11,3,0,9,11,3,0,22,11,3,0,31,11
1080 FOR X= 0TO 30
1090 PLOT 3,X,15,32:NEXT X
1100 FOR X= 20TO 30:PLOT 3,X,27,32:NEXT X
1110 FOR Y= 3TO 9:PLOT 3,25,Y,32:NEXT Y
1120 FOR Y= 15TO 22
1130 PLOT 3,10,Y,32,3,20,Y,32,3,30,Y,32:NEXT Y
1140 FOR Y= 9TO 22:PLOT 3,45,Y,32:NEXT Y
1150 FOR Y= 27TO 31:PLOT 3,30,Y,32:NEXT Y
1160 FOR Y= 22TO 31:PLOT 3,50,Y,32:NEXT Y
1170 FOR Y= 3TO 31:PLOT 3,0,Y,32:NEXT Y
1180 FOR Y= 3TO 22:PLOT 3,63,Y,32:NEXT Y
1190 FOR Y= 3TO 6:PLOT 3,6,Y,32:NEXT Y
1200 PLOT 6,32:FOR X= 31TO 44:PLOT 3,X,22,32:NEXT X
1210 FOR Y= 13TO 18:PLOT 3,45,Y,32:NEXT Y
1215 A$= "     "
1220 PLOT 3,10,9:PRINT A$
1250 PLOT 6,8:REM --- DOORS
1260 PLOT 3,32,9:PRINT A$
1265 B$= "   "
1270 PLOT 3,6,15:PRINT B$:PLOT 3,16,15:PRINT B$
1280 PLOT 3,26,15:PRINT B$
1290 PLOT 3,50,27,32
1400 PLOT 6,38:REM --- LABELS
1420 PLOT 3,8,4:PRINT "WARDEN'S OFFICE"
1430 PLOT 3,27,4:PRINT "LAUNDRY"
1440 PLOT 6,3
1445 PLOT 3,27,4:PRINT "LAUNDRY"
1450 PLOT 3,22,29,115:PRINT " PHONE"
1460 PLOT 3,47,11:PRINT "EXERCISE YARD"
1470 PLOT 3,52,24:PRINT "FREEDOM"
1480 PLOT 6,3,3,22,20,100:REM  PRISONER
2000 REM
BEGIN GAME

2010 GOSUB 7100
2020 PRINT "  FIRST TASK: STAND CLOSE TO YOUR CELL DOOR."
2030 GOSUB 8000
2040 IF ABS (26678- LP)< 3GOTO 2100
2050 GOTO 2030
2100 GOSUB 7100:PLOT 6,7
2110 PRINT "  NEXT: AS GUARD WALKS BY, STEAL HIS KEY BY HITTING THE"
2120 PRINT "  '5' KEY SEVERAL TIMES AT THE RIGHT MOMENT."
2130 PLOT 8:POKE 33278,0
2140 GOSUB 8000
2150 IF ABS (71- LG)< 2AND PEEK (33278)= 53GOTO 2170
2160 GOTO 2130
2170 PLOT 6,0,3,26,15:PRINT "   ":REM  OPEN DOOR
2200 GOSUB 7100
2210 PRINT "  GO TO SOUTH HALF OF EXERCISE YARD, FIND PROPER SPOT,"
2220 PRINT "AND DIG UP BAG OF MONEY YOU BURIED 18 YEARS AGO ($84,000)"
2230 X= 52+ INT (7* RND (1)):Y= 17+ INT (5* RND (1))
2240 LM= 24576+ 128* Y+ 2* X:REM  HIDE MONEY
2250 GOSUB 8000
2260 IF LP= LMGOTO 2300
2270 GOTO 2250
2300 GOSUB 7100:PLOT 6,7
2310 PRINT "  YOU FOUND THE MONEY!  PRESS '5' TO CONTINUE."
2315 PLOT 6,0,3,32,9:PRINT "     ":REM  OPEN DOOR
2320 PLOT 8:IF PEEK (33278)< > 53GOTO 2320
2400 GOSUB 7100
2410 PRINT "  SNEAK INTO WARDEN'S OFFICE AND STEAL KEY TO MAIN GATE."
2420 PRINT "  REMEMBER THAT BLACK AREAS ARE SAFE AREAS."
2430 GOSUB 8000
2440 IF LP> 25600GOTO 2430
2500 GOSUB 7100:PLOT 6,7
2510 PRINT "  NOW GO TO THE PHONE, CALL YOUR BROTHER, AND ASK"
2520 PRINT "  HIM TO BRING A LAUNDRY TRUCK TO THE MAIN GATE."
2530 GOSUB 8000
2540 IF LP< > 28330GOTO 2530
2550 PLOT 6,0,3,50,27,32:REM  OPEN GATE
2600 GOSUB 7100
2610 PRINT "  ONE MORE TASK - GO THROUGH THE MAIN GATE TO FREEDOM!"
2620 GOSUB 8000
2630 IF LP< > 28134GOTO 2620
2640 GOTO 9200
6999 END :REM  TEMPORARY
7000 REM
  SUBROUTINES

7100 REM --- ERASE MSG FIELD
7110 PLOT 6,3,8,11,10,11,8:RETURN
8000 REM --- MOVE PLAYERS (8000-8900)
8100 REM --- MOVE WARDEN INCREMENT DW= -1,0, OR +1 ALONG ROUTE
8110 IF RND (1)< .1THEN DW= INT (RND (1)* 3)- 1
8120 IF DW= 0GOTO 8150
8130 POKE R(LW),32:POKE R(LW)+ 1,32:REM  ERASE OLD POS.
8140 LW= LW+ DW:REM  CALC NEW POS.
8150 POKE R(LW),87:POKE R(LW)+ 1,33:REM  PLOT NEW POS.
8160 IF LW= 0OR LW= 117THEN LW= 81:REM  AVOID END OF ROUTE
8200 REM --- MOVE GUARD
8210 IF RND (1)< .1THEN DG= INT (RND (1)* 3)- 1
8220 IF DG= 0GOTO 8250
8230 POKE R(LG),32:POKE R(LG)+ 1,32
8240 LG= LG+ DG
8250 POKE R(LG),71:POKE R(LG)+ 1,39
8260 IF LG= 0OR LG= 117THEN LG= 81
8300 REM --- MOVE PRISONER
8310 C= 0:M= PEEK (33278):REM  GET KBD CHAR.
8320 IF M= 0GOTO 8500
8330 IF M= 56THEN C= - 128:REM  NORTH
8340 IF M= 54THEN C= 2:REM  EAST
8350 IF M= 52THEN C= - 2:REM  WEST
8360 IF M= 50THEN C= 128:REM  SOUTH
8365 REM --- TEST FOR LEGAL MOVE
8370 TP= LP+ C:TC= PEEK (TP+ 1):REM  TENT. ADDR & ITS COLOR
8380 IF TC< > 32AND TC< > 0GOTO 8430
8390 POKE LP,32:POKE LP+ 1,SC:REM  ERASE OLD POS.
8400 LP= TP:SC= TC:REM  SAVE NEW POS. & ITS COLOR
8410 POKE LP,100:POKE LP+ 1,3:REM  PLOT NEW POS.
8430 POKE 33278,0:REM  RESET KBD CHAR TO 0
8500 PLOT 8,32,32,8
8600 REM --- SAFE AREA?
8610 IF SC= 0GOTO 8900
8660 REM --- DISCOVERED?
8670 L1= LP:GOSUB 8800:ZP= L2
8680 L1= R(LW):GOSUB 8800:ZW= L2
8690 L1= R(LG):GOSUB 8800:ZG= L2
8700 IF ZP= ZWGOTO 9000
8710 IF ZP= ZGGOTO 9100
8720 GOTO 8900
8800 IF L1> 24960THEN L2= 1
8810 IF L1> 25856THEN L2= 2
8820 IF L1> 26496THEN L2= 3
8830 IF L1> 27520THEN L2= 4
8840 RETURN
8900 RETURN
9000 REM
END OF GAME

9010 GOSUB 7100
9020 PRINT "  THE JIG IS UP!  YOU WERE SEEN BY THE WARDEN!"
9030 GOTO 9300
9100 GOSUB 7100
9110 PRINT "  THE JIG IS UP!  YOU WERE SEEN BY THE GUARD!"
9120 GOTO 9300
9200 GOSUB 7100:PLOT 6,66
9210 PRINT "  CONGRATULATIONS!  YOU ESCAPED!"
9300 PLOT 6,8,3,0,1,11:PLOT 6,3,27,11
9310 END
10000 REM  LIST ON PRINTER
10010 POKE 33289,80
10020 PLOT 14,27,18,3,15,27,13:LIST :PRINT :POKE 33265,0
10030 POKE 33289,64
10040 END