Cliffhanger!

Type
Game
Category
Catching action game
Author
Heath Lawrence
Published in
Antic, November 1986 (Vol. 5, No. 7)
Year
1986
Language
Atari BASIC
Requirements
Any Atari 8-bit computer, any memory size, Atari BASIC, joystick in port 1; disk or cassette
Cliffhanger playfield in GRAPHICS 1 with custom characters: a magenta rock pit, the Catcher Cage pulley on a wire across the top with its grabber, blue Gruds, green gas bubbles and a flying chunk of debris, score and danger counter below

About the program

Antic's editors told the story behind Cliffhanger! in an introduction. A bulky envelope arrived from Canada. Heath Lawrence of Port Elgin, Ontario, had been writing a book of type-in Atari games, but publishers kept turning it down because "Atari products are not marketable anymore", so he offered the seven finished games to Antic. The editors judged them "right up there with the best we have ever published", accepted most of them, and planned to print about one every other month through 1987. Cliffhanger! was the first. Vectron followed in March 1987.

It's 2010, and Hugopolis Inc. is mining Mars. The digging has made the crust unstable, and chunks of rock keep flying sideways out of the excavation into the walls of the open pit. Every hit weakens the cliff where your operator's booth stands. Five hits and it collapses, burying you and the mine.

Typing it in

The screen-drawing lines (400, 420–430, 510–550, 620–630) contain inverse-video characters, which in this redefined GRAPHICS 1 character set are pieces of cliff, pit and machinery. {inv} … {/inv} means press the Atari (inverse) key before and after. Upper and lower case matter too, because they choose the colour. Antic printed TYPO II checksums beside each line of the magazine listing. They are not part of the program.

How to play

The Catcher Cage has two parts. A pulley runs along the top (push the joystick left or right), and a grabber on a chain hangs from it. Hold the button to lower the grabber and let go to raise it. You can't move both at once. Any debris the cage touches is caught and dumped in an acid bath. The deeper you catch it, the more it scores. Touching a bubble of explosive Radon gas destroys you instantly. The blue Gruds are harmless and protected by off-world wildlife laws, so hitting one costs five points. The danger level, shown at the bottom right, goes up each time debris strikes the cliff.

Lawrence's tips: anticipate where the next chunk will hit and get there first, or try the "fishing technique". Lower the grabber a little below the debris's path and release the button as the rock passes over the chain. The cage moves twice as fast as the debris, so a miss often gives you a second chance.

How it works

The game runs in a GRAPHICS 1 text screen. Line 630 copies the ROM character set into RAM (ST=(PEEK(106)+1)*256) and redefines it, so letters print as rock, chain, pulley and creatures. The REM-labelled routines show the structure: MOVE DEBRIS (30), the grabber going DOWN (80) and UP (120), the PULLY (150), and the handlers for catching debris (200), hitting a Grud (280) and hitting a gas bubble (310).

Listing

5 REM CLIFFHANGER!
6 REM BY HEATH LAWRENCE
7 REM (c) 1986, ANTIC PUBLISHING
10 GOSUB 610
20 GOSUB 500:GOSUB 460:GOSUB 480:GOTO 160
30 REM MOVE DEBRIS
40 OX=DX:DX=DX-0.5:IF DX<>INT(DX) THEN RETURN
50 POKE 77,0:POKE SC+OX+20*DY,DP:IF DX<1 THEN GOSUB 350:GOSUB 460:RETURN
60 DP=PEEK(SC+INT(DX)+20*DY):IF DP=172 THEN GOSUB 210:GOTO 160
70 POKE SC+INT(DX)+20*DY,240:RETURN
80 REM DOWN
90 GOSUB 40:POKE SC+PX+20*RY,107:RY=RY+1:RP=PEEK(SC+PX+20*RY):IF RP=240 THEN GOSUB 210:GOTO 160
100 ON RP=168 GOSUB 290:ON RP=110 GOSUB 320:IF STRIG(0)<>0 OR RY>18 THEN GOSUB 130:GOTO 160
110 POKE SC+PX+20*RY,172:GOTO 90
120 REM UP
130 FOR Y=RY TO 2 STEP -1:RP=PEEK(SC+PX+20*Y):IF RP=240 THEN RY=Y:GOSUB 210:GOTO 160
140 POKE SC+PX+20*Y,172:POKE SC+PX+20*Y,0:NEXT Y:POKE SC+PX+20*2,172:RETURN
150 REM PULLY
160 GOSUB 40:S=STICK(0):SOUND 1,0,0,0:IF STRIG(0)=0 THEN RY=2:GOTO 90
170 ON S=15 GOTO 160
180 SOUND 1,255,6,8:POKE SC+PX+20*1,98:POKE SC+PX+20*2,0:PX=PX-1*(S=11)+1*(S=7):PX=PX-1*(PX>18)+1*(PX<1)
190 POKE SC+PX+20*1,33:POKE SC+PX+20*2,172:GOTO 160
200 REM GOT DEBRIS
210 FOR Y=RY TO 2 STEP -1:POKE SC+PX+20*Y,173:FOR D=1 TO 30:NEXT D:POKE SC+PX+20*Y,0:NEXT Y
211 POKE SC+PX+20*2,172
220 FOR X=PX TO 1 STEP -1:SOUND 1,255,6,8:POKE SC+X+20*1,33:POKE SC+X+20*2,173:FOR D=1 TO 30:NEXT D:PX=1
230 POKE SC+X+20*1,98:POKE SC+X+20*2,0:NEXT X:POKE SC+21,33:POKE SC+41,172:FOR D=1 TO 25:NEXT D
231 FOR Y=3 TO 20
240 POKE SC+1+20*Y,240:FOR D=1 TO 15:NEXT D:POKE SC+1+20*Y,0:SOUND 1,Y,10,8:NEXT Y:FOR X=1 TO 10 STEP 0.2
250 SOUND 1,10,8,X:POKE SC+401,182
251 IF X>5 THEN POKE SC+401,183:NEXT X:POKE SC+401,0:FOR X=10 TO 0 STEP -0.3
260 SOUND 1,10,8,X:NEXT X:FOR X=1 TO DY:SCO=SCO+1:FOR J=1 TO 50 STEP 9:SOUND 1,J,8,10:SOUND 1,0,0,0:NEXT J
270 GOSUB 480:NEXT X:GOSUB 460:RETURN
280 REM HIT GRUD
290 FOR X=1 TO 5:FOR Z=1 TO 50 STEP 5:SOUND 1,Z,10,8:SOUND 2,Z+50,10,8:NEXT Z:SCO=SCO-1:IF SCO<0 THEN SCO=0
300 GOSUB 480:NEXT X:SOUND 1,0,0,0:SOUND 2,0,0,0:RETURN
310 REM HIT GAS BUBBLE
320 FOR X=100 TO 255 STEP 4:SOUND 1,X,8,8:POKE SC+PX+20*RY,246:POKE SC+PX+20*RY,119:NEXT X
321 POKE SC+PX+20*RY,117
330 SOUND 1,0,0,0:FOR D=1 TO 100:NEXT D:GOTO 420
340 REM DEBRIS IMPACTS
350 FOR X=100 TO 255 STEP 4:SOUND 1,X,8,8:POKE SC+20*DY,246:POKE SC+20*DY,119:NEXT X
351 POKE SC+20*DY,248:DA=DA+1
360 SOUND 1,0,0,0:GOSUB 480:ON DA=5 GOTO 380:RETURN
370 REM COLLAPSE!
380 FOR Y=1 TO 19:POSITION 1,Y:? #6;ROPE$:FOR D=1 TO 15:NEXT D:POSITION 1,Y:? #6;BL$:SOUND 1,Y+50,10,8
381 NEXT Y
390 FOR Y=1 TO 19:SOUND 1,Y+200,8,8:POSITION 0,Y:? #6;"D":FOR D=1 TO 15:NEXT D:POSITION 0,Y:? #6;" "
391 NEXT Y
400 RESTORE 730:FOR Y=20 TO 15 STEP -1:READ Z:FOR X=0 TO 6-Z:POSITION X,Y:? #6;"{inv}g{/inv}":NEXT X:FOR D=1 TO 20
401 NEXT D
410 NEXT Y:SOUND 1,0,0,0:FOR D=1 TO 350:NEXT D
420 GRAPHICS 17:POKE 756,224:POSITION 4,5:? #6;"{inv}*{/inv}GAME OVER{inv}*{/inv}":POSITION 5,10:? #6;"{inv}score{/inv}:";SCO:POSITION 5,11
430 ? #6;"{inv}-----{/inv}":POSITION 3,16:? #6;"{inv}PRESS{/inv} <{inv}start{/inv}>"
440 ON PEEK(53279)<>6 GOTO 440:GOTO 20
450 REM GET DEBRIS Y
460 DY=INT(RND(0)*17)+3:DP=PEEK(SC+18+20*DY):POKE SC+18+20*DY,240:DX=18:RETURN
470 REM UPDATE SCORE
480 POSITION 7,23:? #6;SCO;"   ":POSITION 16,23:? #6;DA:RETURN
490 REM PLAYFIELD
500 GRAPHICS 17:POKE 756,ST/256:SC=PEEK(88)+256*PEEK(89):SCO=0:DA=0:PX=10:RY=2:DX=18:FOR Y=2 TO 22
501 POSITION 0,Y
510 ? #6;"{inv}g{/inv}":POSITION 19,Y:? #6;"{inv}g{/inv}":NEXT Y:FOR X=0 TO 19:POSITION X,21:? #6;"{inv}g{/inv}":POSITION X,22:? #6;"{inv}g{/inv}"
511 NEXT X
520 POSITION 2,20:? #6;"{inv}q{/inv}":POSITION 1,21:? #6;"{inv}G{/inv}":POSITION 18,20:? #6;"{inv}t{/inv}":POSITION 0,2:? #6;"{inv}i{/inv}"
521 POSITION 19,2
530 ? #6;"{inv}j{/inv}":POSITION 0,1:? #6;"D":POSITION 19,1:? #6;"{inv}F{/inv}":FOR X=1 TO 18:POSITION X,1:? #6;"b":NEXT X
540 POSITION 19,1:? #6;"{inv}F{/inv}":FOR X=1 TO 18:POSITION X,1:? #6;"b":NEXT X:POSITION 1,23:? #6;"{inv}SCORE{/inv}:       u:"
550 POSITION 10,1:? #6;"A":POSITION 10,2:? #6;"{inv}L{/inv}"
560 REM SET OBSTACLES
570 FOR X=2 TO 17:DO=INT(RND(0)*2):ON DO=1 GOTO 590:T=INT(RND(0)*2):SHA=200*(T=0)+110*(T=1)
580 POSITION X,INT(RND(0)*17)+3:? #6;CHR$(SHA)
590 NEXT X:RETURN
600 REM REDEFINE
610 DIM ROPE$(18),BL$(18):ROPE$="yyyyyyyyyyyyyyyyyy":BL$="                  ":RESTORE 660
611 POKE 106,PEEK(740)-5
620 GRAPHICS 18:SETCOLOR 4,2,2:POSITION 4,2:? #6;"CLIFFHANGER":POSITION 1,5:? #6;"{inv}BY HEATH LAWRENCE{/inv}"
621 POSITION 4,8
630 ? #6;"{inv}please wait{/inv}":ST=(PEEK(106)+1)*256:FOR X=0 TO 1023:POKE ST+X,PEEK(57344+X):NEXT X
631 FOR SHAPE=1 TO 20
640 READ ICS:FOR X=0 TO 7:READ BYTE:POKE ST+ICS+X,BYTE:NEXT X:NEXT SHAPE:RETURN
650 REM SHAPE DATA
660 DATA 264,126,255,129,60,129,255,60,24,272,0,0,0,85,170,0,0,0,288,126,129,185,145,181,169
665 DATA 255,255,304,15,19,37,73,255,3,5,13,312,213,107,222,107,214,181,218,107,320,0,24,60,90
670 DATA 126,36,90,36,328,214,107,180,104,176,108,218,116,336,107,214,45,22,13,54,91,46,344,16,8
675 DATA 16,8,16,8,16,8,352,24,24,60,102,195,195,102,36,360,24,24,60,110,239,110,60,24,368
680 DATA 0,60,110,94,94,110,60,0,384,0,28,110,219,247,92,48,0,392,0,0,0,24,52,106,210
685 DATA 173,416,1,1,2,7,14,21,122,171,424,129,90,60,90,126,36,90,129,432,0,18,64,4,32
690 DATA 8,64,0,440,65,8,32,129,36,0,34,144,448,213,166,58,192,64,128,105,150,456,0,48,72
695 DATA 72,132,132,3,0
720 REM CLIFF FALL DATA
730 DATA 0,2,3,3,4,6

Download

The original program from the Antic disk, to LOAD or ENTER instead of typing it: CLIFF.BAS.

Credits