Nightmare Park

Products: Nightmare Park
Date: 1981
Type: Cassette
Platform(s): TS 1000

Nightmare Park is a text-based adventure game in which the player navigates a maze-like park from a start position [S] to a finish [F] by entering directional moves (North, South, or East). Movement is tracked using PEEK of the display file address from system variables at 16396/16397, with POKE used to place a cursor character (code 151) at the calculated screen offset and detect collisions with path boundaries. Along the route, random encounters trigger seven mini-games including arithmetic challenges with a timer implemented via POKE to the frame counter at 16436/16437, a memory sequence test, a guessing game, a dice gamble, a door-choice puzzle, a scrolling enemy-evasion sequence, and a falling hailstone dodge. The hailstone and enemy sequences animate characters directly by POKEing display file offsets in a loop, making the animation fast and smooth without redrawing the full screen.


Program Analysis

Program Structure

The program is organized into a set of functional blocks grouped by line number ranges. Lines 1–10 define shared subroutines; lines 20–360 handle initialization and maze drawing; lines 390–560 implement the main movement loop; and lines 800–9991 contain the individual encounter routines and end-game logic.

Line RangePurpose
1–10Shared subroutines: keypress wait (5–7), delay loop (8–10)
20–196Variable initialization, title/intro screen, initial delay
200–560Maze draw and main movement loop
800–830Sent-back-to-start handler
900–930Poison darts encounter setup (leads to 8005)
1000–1020Zombies encounter setup (leads to 6020)
2000–2410Mad Mathematician arithmetic challenge
3000–3240Maniacal Memory Tester
4000–4270The Doors (tiger behind one of three)
5000–5480Egotistical Ogre name-recall challenge
6000–6650Muggers/Zombies scrolling evasion sequence
7000–7590Gruesome Gambler dice game
8000–8190Pointed hailstones / poison darts falling animation
9000–9320Fanatical ESP Tester number guessing
9500–9530Fell into the abyss (off-path penalty)
9600–9680Death screen and replay prompt
9700–9750Victory screen
9990–9991SAVE and STOP

Movement and Collision Detection

The maze uses the display file directly for collision detection. At line 390, the display file start address is computed as C = PEEK 16396 + 256 * PEEK 16397. The player’s position offset A is initialized to 398 (line 200), placing the cursor near the [S] marker. Each move updates A by +1 (East), +33 (South), or −33 (North), reflecting the 33-byte-wide ZX81 display file row structure (32 columns + 1 newline byte).

At line 400, POKE C+A, 151 writes the inverse-space character (code 151) to the player’s screen position. After a keypress, the old cell is restored to code 8 (a space) at line 420. Line 470 checks PEEK (C+A) = 0; a zero byte in the display file indicates a newline or empty area — i.e., the player has stepped off the path — triggering the abyss sequence at 9500.

Victory is detected at line 480: A = 428 places the player at the [F] position, and the additional check (C+A) = 171 verifies the expected screen content at that cell.

Random Encounter Dispatch

After each move, lines 500–560 compute an encounter probability. Variable D is set to 18 by default (line 490), then adjusted to 15 or 16 in a mid-park zone (line 500) and to 20 in outer zones (line 510). A random value E = INT(RND*D)+1 is generated. If E > 11 or E = 10 with more than 9 moves taken, execution loops back to 400 (no encounter). Otherwise, encounters 1–9 dispatch via GO TO E*1000 (line 560), and encounters 10–11 via GO TO (E-2)*100 (line 540), routing to lines 800 and 900 respectively.

Display File Animation

Two encounter routines animate characters by directly POKEing display file offsets in a loop, avoiding full screen redraws. In the hailstones/darts routine (lines 8020–8080), three projectile columns B(1), B(2), B(3) are advanced one row per iteration of a FOR J=0 TO 18 loop, with small random offsets applied to simulate drift. A sentinel position (offset 610) is pre-POKEd with 151, and after the loop, PEEK (DF+610) is checked: if the character code equals the projectile code F, the player was hit.

The muggers/zombies sequence (lines 6120–6470) moves three enemy characters (A1, A2, A3) along eight convergent paths toward the center of the screen over eight iterations. Each iteration erases the previous position with 0 and writes the enemy character at the new offset. A PAUSE 40000 with INKEY$ poll (lines 6490–6530) gives the player a brief window to enter the correct number to destroy each enemy. Setting an enemy’s character variable to 0 effectively removes it.

Timed Input via Frame Counter

The arithmetic challenge at line 2000 uses the system frame counter at addresses 16436–16437 for timing. Before the INPUT at line 2220, both bytes are POKEd to 255, setting the counter to 65535. After input, P = PEEK 16436 + 256 * PEEK 16437 is read at line 2230. Since the counter decrements each frame, a value still near 65000 or above at line 2280 means the player answered quickly enough to survive even if correct.

Key BASIC Idioms

  • The subroutine at lines 5–7 implements a keypress wait: LET E$=INKEY$ in a loop until a non-empty key is detected, then RETURN.
  • The delay subroutine at lines 8–10 uses FOR T=1 TO L: NEXT T, where L is set immediately before each GOSUB 8 call to produce calibrated pauses of varying lengths.
  • VAL L$ at line 6060–6080 evaluates a string expression "INT(RND*8)+1" to generate three independent random numbers, a compact way to re-use a formula stored as a string.
  • String slicing is used to extract individual characters from the memory sequence: I$((Q-28)*2) at line 3150 selects every second character, since I$ is built with spaces between letters.
  • Line 2233 uses LET X$ = STR$ VAL X$ to evaluate the arithmetic expression stored as a string in X$ and convert the numeric result back to a string for comparison with the player’s input.

The Gambler Encounter

The dice gamble at lines 7000–7590 has a notable asymmetry. When the player chooses “Higher,” both dice rolls use INT(RND*6)+1 giving a fair range of 2–12. When “Lower” is chosen, both rolls use INT(RND*3)+1, restricting the player’s total to 2–6 — making it harder to beat a typical two-dice sum even when trying to roll low. Additionally, the gambler’s winning condition (MORE or LESS) is decided randomly with RND > 0.5 after the player has already thrown, meaning the player’s choice of H or L has no bearing on the outcome condition, only on the dice range used.

Ogre Name Flash

Lines 5190–5205 display the ogre’s name briefly using a near-empty delay loop (FOR T=1 TO 1: NEXT T) before immediately overwriting it with spaces. The effective display time is extremely short — essentially one loop iteration — making the name very difficult to read and adding genuine challenge to the encounter.

Bugs and Anomalies

  • Line 480 checks (C+A) = 171 but C+A is an address, not a screen character code. The intent appears to be PEEK (C+A) = 171 or a specific address value. As written, this condition compares the computed address itself to 171, which will almost never be true given typical display file locations in RAM, effectively disabling the victory condition.
  • In the muggers sequence, B1 through B8 are used as display offsets but are also reassigned as loop variables across iterations. The convergence paths are hard-coded relative offsets that assume a fixed display file location, which may misalign if the display file moves.
  • The SLOW call at line 6565 and again at 6586 is redundant; SLOW is called twice before returning to the main loop.
  • Line 5201–5202 (FOR T=1 TO 1: NEXT T) reuses T, which is also the delay loop variable in the subroutine at lines 8–10. This is safe here only because no GOSUB 8 is called between these lines.

Content

Appears On

Related Products

Few who enter ever return. Can you outwit the demons and sorcerers who haunt the dreaded Nightmare Park? Confronted by...

Related Articles

Related Content

Image Gallery

Source Code

   1 REM BY J.D.S CRANSTON 1981
   2 SLOW
   3 RAND 
   4 GOTO 20
   5 LET E$=INKEY$ 
   6 IF E$="" THEN GOTO 5
   7 RETURN
   8 FOR T=1 TO L
   9 NEXT T
  10 RETURN
  20 DIM B(3)
  30 LET A$="ZX NIGHTMARE PARK"
  35 LET B$="~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
  40 LET C$="▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒"
  45 LET D$="▒      ▒    ▒    ▒  ▒"
  50 PRINT TAB 7;A$
  60 PRINT TAB 7;B$
  70 PRINT AT 3,2;"WELCOME TO ";A$
  80 PRINT 
  90 PRINT " YOU MUST MAKE YOUR WAY THROUGH"
 100 PRINT " THE PARK (FROM [S] TO [F])."
 110 PRINT 
 120 PRINT " REMEMBER,THE SHORTEST ROUTE MAY"
 130 PRINT " NOT BE THE BEST."
 140 PRINT 
 150 PRINT " STAY ON THE PATH,AND MOVE ONLY"
 160 PRINT " NORTH,SOUTH OR EAST."
 170 PRINT 
 180 PRINT " BUT BEWARE,YOU ARE NOT ALONE."
 190 PRINT AT 18,0;"[A][B][A][N][D][O][N]█[H][O][P][E]█[A][L][L]█[Y][E]█[W][H][O]█[E][N][T][E][R][.][.][.]"
 195 LET L=700
 196 GOSUB 8
 200 LET A=398
 210 LET B=0
 220 CLS
 230 PRINT TAB 7;A$
 240 PRINT TAB 7;B$
 250 PRINT AT 7,6;C$
 260 PRINT TAB 6;"▒";TAB 14;"▒";TAB 19;"▒";TAB 24;"▒"
 270 PRINT TAB 6;C$
 280 PRINT TAB 3;"▒▒▒▒";TAB 10;"▒";TAB 19;"▒";TAB 24;"▒";C$(1 TO 5)
 290 PRINT TAB 3;"▒  ▒";TAB 10;"▒";TAB 19;"▒";TAB 24;"▒";TAB 29;"▒"
 300 PRINT "[S]";C$+C$(1 TO 11);"[F]"
 310 PRINT TAB 7;D$
 320 PRINT TAB 7;D$
 330 PRINT TAB 7;C$+"▒▒"
 340 PRINT TAB 7;"▒";TAB 14;"▒";TAB 24;"▒  ▒"
 350 PRINT TAB 7;C$+"▒▒"
 360 PRINT 
 370 PRINT "N,S OR E ?"
 390 LET C=PEEK 16396+256*PEEK 16397
 400 POKE C+A,151
 410 GOSUB 5
 420 POKE C+A,8
 430 IF E$="E" THEN LET A=A+1
 440 IF E$="S" THEN LET A=A+33
 450 IF E$="N" THEN LET A=A-33
 460 LET B=B+1
 470 IF PEEK (C+A)=0 THEN GOTO 9500
 480 IF A=428 AND (C+A)=171 THEN GOTO 9700
 490 LET D=18
 500 IF A>400 AND A<428 THEN LET D=14+INT (RND*2)+1
 510 IF A<323 OR A>502 THEN LET D=20
 520 LET E=INT (RND*D)+1
 530 IF E>11 OR (E=10 AND B>9) THEN GOTO 400
 540 IF E>9 THEN GOTO (E-2)*100
 550 CLS
 560 GOTO E*1000
 800 CLS
 810 PRINT "BACK TO THE START"
 820 LET L=125
 825 GOSUB 8
 830 GOTO 200
 900 LET F$="POISON DARTS"
 910 LET G$="FLIGHT"
 920 LET T$="I"
 930 CLS
 940 GOTO 8005
 1000 LET F$="[Z][O][M][B][I][E][S]"
 1010 LET F=139
 1020 GOTO 6020
 2000 PRINT "HELLO FROM THE MAD MATHEMATICIAN"
 2010 PRINT B$+B$(1 TO 15)
 2030 PRINT AT 3,5;"YOU MUST ADD TOGETHER"
 2050 PRINT AT 5,4;"THE SEQUENCE OF NUMBERS"
 2070 PRINT AT 7,6;"GIVEN BELOW,WITHIN"
 2080 PRINT AT 9,4;"A [1][0]█[S][E][C][O][N][D] TIME LIMIT."
 2100 PRINT AT 12,2;"AND IF YOU TAKE TOO LONG..."
 2105 PRINT TAB 2;B$+B$(1 TO 10)
 2110 LET X$=""
 2130 LET H$="+"
 2135 LET H=INT (RND*3)+1
 2140 FOR I=1 TO 7+H
 2150 IF I=7+H THEN LET H$=""
 2160 LET X$=X$+STR$ (INT (RND*9)+1)+H$
 2170 NEXT I
 2190 PRINT AT 16,5;X$;"=?"
 2200 POKE 16436,255
 2210 POKE 16437,255
 2220 INPUT K
 2230 LET P=(PEEK 16436)+256*PEEK 16437
 2232 CLS
 2233 LET X$=STR$ VAL X$
 2240 IF K<>VAL X$ THEN GOTO 2340
 2260 PRINT "CORRECT...";
 2270 LET L=95
 2275 GOSUB 8
 2280 IF P<65000 THEN GOTO 2320
 2290 PRINT "YOU HAVE AVOIDED DEATH"
 2300 LET L=130
 2305 GOSUB 8
 2310 GOTO 220
 2320 PRINT "BUT YOU TOOK TOO LONG"
 2330 GOTO 2370
 2340 PRINT "[W][R][O][N][G]...";
 2350 LET L=82
 2355 GOSUB 8
 2360 PRINT "THE ANSWER WAS ";X$
 2370 PRINT 
 2380 LET L=110
 2385 GOSUB 8
 2390 PRINT "PREPARE TO MEET THY MAKER"
 2400 LET L=130
 2405 GOSUB 8
 2410 GOTO 9600
 3000 PRINT "  THE MANIACAL MEMORY TESTER"
 3010 PRINT TAB 2;B$+B$(1 TO 9)
 3020 PRINT AT 5,0;"MEMORISE THE FOLLOWING SEQUENCE"
 3035 LET I$=""
 3040 FOR M=1 TO 6
 3050 LET I$=I$+" "+CHR$ (38+INT (RND*26))
 3070 NEXT M
 3075 PRINT AT 10,8;I$
 3080 PRINT TAB 9;B$(1 TO 11)
 3090 LET L=10
 3095 GOSUB 8
 3100 CLS
 3110 FOR Q=29 TO 34
 3120 PRINT "WHAT WAS LETTER ";CHR$ Q;" ";
 3130 GOSUB 5
 3150 IF E$<>I$((Q-28)*2) THEN GOTO 3210
 3155 PRINT CHR$ (CODE E$+128)
 3160 PRINT 
 3170 NEXT Q
 3172 PRINT 
 3180 PRINT "WELL DONE,THAT IS CORRECT"
 3190 LET L=95
 3195 GOSUB 8
 3200 GOTO 220
 3210 CLS
 3220 PRINT "WRONG,THE LETTER WAS """;I$((Q-28)*2);""""
 3230 LET L=115
 3235 GOSUB 8
 3240 GOTO 9600
 4000 LET F$="[M][A][N][-][E][A][T][I][N][G]█[T][I][G][E][R]"
 4015 LET J$="█████"
 4020 PRINT TAB 10;"THE DOORS"
 4030 PRINT TAB 10;B$(1 TO 9)
 4040 PRINT 
 4050 PRINT "BEHIND ONE OF THESE DOORS IS A"
 4060 PRINT F$
 4070 PRINT 
 4080 PRINT "CHOOSE A DOOR TO GO THROUGH"
 4090 PRINT AT 10,0;
 4100 FOR Q=1 TO 8
 4110 PRINT TAB 2;J$;TAB 12;J$;TAB 22;J$
 4120 NEXT Q
 4130 PRINT 
 4140 PRINT TAB 4;1;TAB 14;2;TAB 24;3
 4150 PRINT 
 4160 LET R=INT (RND*3)+1
 4170 GOSUB 5
 4180 IF E$<"1" OR E$>"3" THEN GOTO 4170
 4185 FOR S=1 TO 3
 4190 FOR T=18 TO 10 STEP -1
 4200 PRINT AT T,(S-1)*10+2;"     "
 4205 IF T=14 AND S=R THEN PRINT AT T,(R-1)*10+2;"TIGER"
 4210 NEXT T
 4220 NEXT S
 4230 LET L=88
 4235 GOSUB 8
 4240 IF VAL E$=R THEN GOTO 9600
 4250 PRINT AT 21,0;"YOU ELUDED THE ";F$
 4255 LET L=115
 4260 GOSUB 8
 4270 GOTO 220
 5000 PRINT TAB 5;"THE EGOTISTICAL OGRE"
 5010 PRINT TAB 5;B$+B$(1 TO 3)
 5020 PRINT 
 5030 PRINT "TELL HIM HIS NAME OR BE TAKEN TO"
 5040 PRINT "PIECES."
 5050 PRINT 
 5060 PRINT "A FLASH OF LIGHTNING REVEALS IT"
 5070 PRINT "BRIEFLY...."
 5080 LET U=10+INT (RND*12)
 5090 LET V=INT (RND*23)
 5100 LET W=INT (RND*8)
 5110 IF W=0 THEN LET F$="FREDERICK"
 5120 IF W=1 THEN LET F$="ARCHIBALD"
 5130 IF W=2 THEN LET F$="REGINALD"
 5140 IF W=3 THEN LET F$="WINSTON"
 5150 IF W=4 THEN LET F$="WILLIAM"
 5160 IF W=5 THEN LET F$="CYRIL"
 5170 IF W=6 THEN LET F$="CECIL"
 5180 IF W=7 THEN LET F$="CHARLES"
 5190 LET L=80
 5195 GOSUB 8
 5200 PRINT AT U,V;F$
 5201 FOR T=1 TO 1
 5202 NEXT T
 5205 PRINT AT U,V;"         "
 5220 CLS
 5230 PRINT "WHATS MY NAME ?"
 5240 INPUT K$
 5250 CLS
 5260 LET L=40
 5270 PRINT "DER...";
 5280 GOSUB 8
 5290 PRINT "UM...";
 5300 GOSUB 8
 5310 PRINT "ERR...";
 5320 GOSUB 8
 5330 PRINT "DAT IS...";
 5340 GOSUB 8
 5350 IF K$<>F$ THEN GOTO 5390
 5360 PRINT "RIGHT"
 5370 LET L=90
 5375 GOSUB 8
 5380 GOTO 220
 5390 PRINT "WRONG"
 5395 LET L=50
 5400 GOSUB 8
 5406 LET L=20
 5410 PRINT 
 5420 PRINT "RIP...";
 5430 GOSUB 8
 5440 PRINT "CRACK...";
 5450 GOSUB 8
 5460 PRINT "SQUASH"
 5470 LET L=70
 5475 GOSUB 8
 5480 GOTO 9600
 6000 LET F$="[M][U][G][G][E][R][S]"
 6010 LET F=149
 6020 FAST
 6025 PRINT "YOU ARE SURROUNDED BY ";F$
 6030 PRINT "ENTER NUMBERS BETWEEN 1 AND 8 TO"
 6040 PRINT "DESTROY"
 6050 LET L$="INT (RND*8)+1"
 6060 LET X$=STR$ VAL L$
 6070 LET Y$=STR$ VAL L$
 6080 LET Z$=STR$ VAL L$
 6090 LET A1=F
 6100 LET A2=F
 6110 LET A3=F
 6120 LET B1=107
 6130 LET B2=115
 6140 LET B3=123
 6150 LET B4=371
 6160 LET B5=387
 6170 LET B6=635
 6180 LET B7=643
 6190 LET B8=651
 6200 LET C=PEEK 16396+256*PEEK 16397
 6210 POKE C+379,151
 6220 FOR I=1 TO 8
 6230 LET C=PEEK 16396+256*PEEK 16397
 6240 POKE C+B1,0
 6250 LET B1=B1+34
 6260 POKE C+B1,A1
 6270 POKE C+B2,0
 6280 LET B2=B2+33
 6290 POKE C+B2,A2
 6300 POKE C+B3,0
 6310 LET B3=B3+32
 6320 POKE C+B3,A3
 6330 POKE C+B4,0
 6340 LET B4=B4+1
 6350 POKE C+B4,A1
 6360 POKE C+B5,0
 6370 LET B5=B5-1
 6380 POKE C+B5,A2
 6390 POKE C+B6,0
 6400 LET B6=B6-32
 6410 POKE C+B6,A3
 6420 POKE C+B7,0
 6430 LET B7=B7-33
 6440 POKE C+B7,A2
 6450 POKE C+B8,0
 6460 LET B8=B8-34
 6470 POKE C+B8,A1
 6480 IF B1=379 THEN GOTO 6600
 6490 PAUSE 40000
 6491 POKE 16437,255
 6492 LET P$=INKEY$ 
 6510 IF P$=X$ THEN LET A1=0
 6520 IF P$=Y$ THEN LET A2=0
 6530 IF P$=Z$ THEN LET A3=0
 6540 IF A1=0 AND A2=0 AND A3=0 THEN GOTO 6560
 6550 NEXT I
 6560 CLS
 6565 SLOW
 6570 PRINT "YOU HAVE EVADED THE ";F$
 6580 LET L=100
 6582 GOSUB 8
 6586 SLOW
 6590 GOTO 220
 6600 CLS
 6605 SLOW
 6610 PRINT "SPLAT....";
 6620 LET L=60
 6625 GOSUB 8
 6630 PRINT "THE ";F$;" GOT YOU"
 6640 LET L=100
 6645 GOSUB 8
 6650 GOTO 9600
 7000 PRINT TAB 5;"THE GRUESOME GAMBLER"
 7010 PRINT TAB 5;B$+B$(1 TO 3)
 7020 PRINT AT 4,0;"HE CHALLENGES YOU TO THROW A"
 7030 PRINT "HIGHER OR LOWER DICE ROLL."
 7040 PRINT "UNFORTUNATELY HE WONT SAY WHICH"
 7050 PRINT "UNTIL AFTER YOU THROW."
 7060 PRINT 
 7070 PRINT "YOUR LIFE IS AT STAKE..."
 7080 PRINT AT 12,0;"HE THROWS...";
 7090 LET D1=INT (RND*6)+1
 7092 LET D2=INT (RND*6)+1
 7095 LET D3=D1+D2
 7100 LET L=140
 7105 GOSUB 8
 7110 PRINT D1;
 7120 PRINT " AND ";
 7150 PRINT D2;" = ";
 7175 PRINT D3
 7180 PRINT AT 15,0;"WILL YOU TRY FOR A HIGHER OR A"
 7190 PRINT "LOWER SCORE ?"
 7200 GOSUB 5
 7210 CLS
 7220 IF E$="L" THEN GOTO 7260
 7230 LET E1=6
 7240 LET E2=6
 7250 GOTO 7280
 7260 LET E1=3
 7270 LET E2=3
 7280 LET E1=INT (RND*E1)+1
 7290 LET E2=INT (RND*E2)+1
 7300 PRINT "YOU THROW...";
 7320 PRINT E1;
 7330 PRINT " AND ";
 7350 PRINT E2;
 7360 LET E3=E1+E2
 7370 PRINT " = ";
 7390 PRINT E3
 7400 GOSUB 8
 7410 CLS
 7420 PRINT "THE BET WAS THAT HE WOULD SCORE"
 7421 LET L=80
 7422 GOSUB 8
 7430 IF RND>.5 THEN GOTO 7490
 7440 PRINT "[M][O][R][E]"
 7441 PRINT 
 7450 LET L=120
 7465 GOSUB 8
 7470 IF D3>E3 THEN GOTO 7560
 7480 GOTO 7530
 7490 PRINT "[L][E][S][S]"
 7491 PRINT 
 7495 LET L=120
 7500 GOSUB 8
 7520 IF D3<E3 THEN GOTO 7560
 7530 PRINT "CURSES...";
 7535 LET L=55
 7540 GOSUB 8
 7545 PRINT "YOU WIN"
 7546 LET L=130
 7547 GOSUB 8
 7550 GOTO 220
 7560 PRINT "HA HA...";
 7561 LET L=50
 7562 GOSUB 8
 7563 PRINT "YOU LOSE"
 7565 LET L=150
 7570 GOSUB 8
 7590 GOTO 9600
 8000 LET F$="POINTED HAILSTONES"
 8002 LET G$="SHOWER"
 8004 LET T$="V"
 8005 LET F=CODE T$
 8006 PRINT "A ";G$;" OF ";F$
 8007 PRINT 
 8008 LET L=85
 8010 GOSUB 8
 8012 PRINT "CROSS YOUR FINGERS"
 8013 GOSUB 8
 8014 CLS
 8015 LET DF=0
 8020 LET DF=PEEK 16396+256*PEEK 16397
 8022 POKE DF+610,151
 8025 LET B(1)=5
 8030 LET B(2)=15
 8035 LET B(3)=25
 8040 FOR J=0 TO 18
 8043 PRINT AT J,B(1);T$;AT J,B(2);T$;AT J,B(3);T$
 8050 LET B(1)=B(1)+INT (RND*2)
 8060 LET B(2)=B(2)-1+INT (RND*3)
 8070 LET B(3)=B(3)-1+INT (RND*2)
 8080 NEXT J
 8085 PRINT 
 8092 IF PEEK (DF+610)=F THEN GOTO 8150
 8100 PRINT "YOU MADE A LUCKY ESCAPE" 
 8120 LET L=108
 8130 GOSUB 8
 8140 GOTO 220
 8150 PRINT "THE ";F$;" GOT YOU"
 8170 LET L=100
 8180 GOSUB 8
 8190 GOTO 9600
 9000 LET Z1=INT (RND*50)+1
 9010 LET Z2=Z1+25+(INT (RND*30)+1)
 9020 LET Z3=Z1+1+INT (RND*(Z2-Z1-1))
 9030 LET Z4=INT (RND*5)+7
 9035 LET X$=STR$ Z3
 9040 PRINT TAB 3;"THE FANATICAL ESP TESTER"
 9050 PRINT TAB 3;B$+B$(1 TO 7)
 9060 PRINT AT 4,0;"YOU MUST GUESS THE NUMBER I HAVE"
 9070 PRINT "CHOSEN."
 9080 PRINT "IT LIES BETWEEN ";Z1;" AND ";Z2
 9090 PRINT "YOU ARE ALLOWED ";Z4;" ATTEMPTS"
 9100 LET L=215
 9110 GOSUB 8
 9120 CLS
 9130 FOR V=Z4 TO 1 STEP -1
 9135 LET Y$=STR$ V
 9140 PRINT "YOU HAVE ";Y$;" TRIES REMAINING"
 9145 PRINT 
 9150 PRINT "WHAT IS YOUR GUESS ?"
 9160 INPUT F1
 9170 IF F1=Z3 THEN GOTO 9280
 9175 IF V=1 THEN GOTO 9230
 9180 CLS
 9185 PRINT F1;
 9190 IF F1>Z3 THEN PRINT " IS TOO HIGH"
 9200 IF F1<Z3 THEN PRINT " IS TOO LOW"
 9205 PRINT 
 9210 NEXT V
 9230 CLS
 9235 PRINT "FAILURE....";
 9240 LET L=60
 9250 GOSUB 8
 9260 PRINT "THE NUMBER WAS ";X$
 9270 GOTO 2370
 9280 CLS
 9290 PRINT "WHAT A FLUKE"
 9300 LET L=100
 9310 GOSUB 8
 9320 GOTO 220
 9500 LET M$="[Y][O][U]█[F][E][L][L]█[I][N][T][O]█[T][H][E]█[A][B][Y][S][S]"
 9501 FOR Q=1 TO 6
 9502 PRINT AT 19,0;M$
 9503 LET L=18
 9504 GOSUB 8
 9505 PRINT AT 19,0;"                       "
 9506 GOSUB 8
 9508 NEXT Q
 9510 PRINT AT 19,0;M$
 9520 LET L=100
 9530 GOSUB 8
 9600 CLS
 9605 PRINT AT 4,7;A$
 9610 PRINT TAB 7;B$
 9615 PRINT 
 9620 PRINT TAB 5;"CLAIMS ANOTHER VICTIM"
 9625 PRINT TAB 5;B$+B$(1 TO 4)
 9630 LET L=180
 9635 GOSUB 8
 9640 PRINT AT 11,0;"DO YOU WANT TO TRY AGAIN ?"
 9645 GOSUB 5
 9650 IF E$<>"Y" THEN GOTO 9675
 9655 CLS
 9660 PRINT "HA HA...";
 9662 LET L=75
 9664 GOSUB 8
 9665 PRINT "YOU HAVENT GOT A CHANCE" 
 9667 LET L=110
 9670 GOSUB 8
 9672 GOTO 200
 9675 PRINT 
 9676 PRINT "[A]█[W][I][S][E]█[D][E][C][I][S][I][O][N]"
 9680 STOP
 9700 CLS
 9710 PRINT AT 1,1;"WELL DONE,YOU HAVE COMPLETED"
 9715 PRINT 
 9720 PRINT " THE JOURNEY THROUGH THE PARK"
 9725 LET L=200
 9730 GOSUB 8
 9735 PRINT AT 6,2;"BUT SHOULD YOU TRY AGAIN ?"
 9740 PRINT "  ";B$;B$(1 TO 9)
 9750 GOTO 9645
 9990 SAVE "NIGHTMAR[E]"
 9991 STOP

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.

People

No people associated with this content.

Scroll to Top