Hookey!
- Type
- Game
- Category
- Pyramid-hopping arcade game
- Author
- David Plotkin (concept by Robert DeWitt)
- Published in
- Antic, September 1983 (Vol. 2, No. 6), "In the Public Domain"
- Year
- 1983
- Language
- Atari BASIC
- Requirements
- Joystick in port 1, Atari BASIC
- Tags
- antic, david-plotkin, public-domain, graphics-7, player-missile, machine-code-in-strings, joystick, arcade, atari-basic
- Related
- Attack on the Death Star, Chicken, Air Raid 2000, Road Race, Bats, Biffdrop
About the program
Antic's September 1983 issue was about education, so David Plotkin's game for "In the Public Domain" was, fittingly, about skipping school. You control a kid who has gone to the local rock pile instead of to class. Hop from stone to stone, turning each one from dark to light as you land on it. Light all 36 and you get a 1000-point bonus, and the pile is redrawn for the next round. Three truant officers come after you and get faster and smarter every round. If one catches you, you lose a life. Step off the edge of the pile and you fall and lose a life too. Using all your lives sends you off to reform school. If that sounds like a certain arcade game with a hopping orange hero, it should. The REM credits the concept to Robert DeWitt, Antic's managing editor.
What you need
A joystick in port 1 and Atari BASIC.
Typing it in
Almost plain ASCII. Line 640 has inverse-video words ({inv}…{/inv}, typed with the Atari key). Line 910 is a 25-byte machine-code routine in DATA, so check it carefully. Plotkin told readers to SAVE before the first RUN and to check the program with TYPO, Antic's checksum program. The disk version has no TYPO codes.
How to play
The joystick works in four directions only, and the moves take some getting used to, as the article admitted. Left and right move along a row of stones, up hops up and to the right, and down hops down and to the left. Each stone scores 10 points, and every 1000 points brings an extra life. To save time, BASIC only redraws the score, round and lives when you are caught, fall off or finish a pile. They are always counted correctly in the background.
How it works
- The pile is GRAPHICS 7 line drawing (lines 1000–1085). A stone is coloured in by drawing three lines on its top face (lines 30–40).
- The kid and the officers are players 0–3.
JUMP$holds a short machine-code routine that copies 50 bytes from a shape table into a player's memory, so each figure is moved with oneUSRcall instead of a slow loop. - Whether the kid is on a stone comes from the player-to-playfield collision register:
PEEK(53252)is 0 when he is standing on nothing, and a low value means he has landed on an unlit top. - The officers chase by comparing their position with yours.
PEEK(53770), the hardware random register, divided by the round number decides whether each one moves, so they hesitate less as the rounds go by. - Lines 1100–1110 patch the display list so that the text window lines show in a larger ANTIC mode for the score.
Listing
1 REM **HOOKEY BY DAVID PLOTKIN ** ANTIC MAGAZINE **
10 GOSUB 800:GRAPHICS 7:POKE 708,136:POKE 709,130:POKE 559,46:POKE 53277,3:SCORE=0:ROUND=1:LIVES=3:GOSUB 1000:GOSUB 1090
20 GOTO 100
30 SOUND 0,XP0,10,4:CX=XP0-46:CY=YP0+9:COLOR 3:PLOT CX,CY:DRAWTO CX+10,CY:PLOT CX-2,CY+1:DRAWTO CX+8,CY+1
40 PLOT CX-4,CY+2:DRAWTO CX+6,CY+2:NUMBLOCK=NUMBLOCK+1:SCORE=SCORE+10
50 IF SCORE/1000=INT(SCORE/1000) THEN LIVES=LIVES+1
60 IF NUMBLOCK=36 THEN POP :GOTO 500
70 SOUND 0,0,0,0:RETURN
100 ST=PEEK(632):XP0=XP0+12*(ST=7)-12*(ST=11)+8*(ST=14)-8*(ST=13):YP0=YP0+12*(ST=13)-12*(ST=14):POKE 77,0
110 IF ST=11 OR ST=7 THEN SHAPE=PM1*(ST=11)+PM2*(ST=7)
120 POKE 53248,XP0:D=USR(ADR(JUMP$),PM0+YP0,SHAPE):POKE 53278,0
130 FOR N=1 TO 3:RR=PEEK(53770)/ROUND:VEL1=VEL*(XP(N)<XP0)*(RR<26)-VEL*(XP(N)>XP0)*(RR<26)
140 VEL2=VEL*(YP(N)<YP0)*(RR<26)-VEL*(YP(N)>YP0)*(RR<26):XP(N)=XP(N)+VEL1:YP(N)=YP(N)+VEL2
150 D=USR(ADR(JUMP$),PM(N)+YP(N),PM3):POKE 53248+N,XP(N):NEXT N
160 IF PEEK(53260)<>0 THEN GOTO 300:REM CAPTURED!
170 IF PEEK(53252)=0 OR YP0=70 THEN GOTO 400:REM FELL OFF!
180 IF PEEK(53252)<5 THEN GOSUB 30:REM COLOR IN THE SQUARE
190 GOTO 100
300 SOUND 0,66,10,4:GOSUB 390:GOSUB 390:SOUND 0,60,10,4:GOSUB 390:SOUND 0,56,10,4:GOSUB 390
310 SOUND 0,66,10,4:GOSUB 390:SOUND 0,0,0,0
320 FOR N=10 TO 100:POKE 704,N:SOUND 0,N,10,4:NEXT N:POKE 704,N:SOUND 0,0,0,0
330 LIVES=LIVES-1
340 D=USR(ADR(JUMP$),PM0+YP0,PMB+100)
350 FOR N=1 TO 3:D=USR(ADR(JUMP$),PM(N)+YP(N),PMB+100):NEXT N:POKE 53278,1
360 IF LIVES=0 THEN GOTO 600
370 GOSUB 960:GOSUB 1120:GOTO 100
390 FOR N=1 TO 100:NEXT N:RETURN
400 FOR N=YP0+2 TO 100:POKE 704,N:SOUND 0,N,10,4:FOR Q=1 TO 10:NEXT Q
410 D=USR(ADR(JUMP$),PM0+N,PM1):NEXT N:SOUND 0,0,0,0:YP0=N-1:GOTO 330
500 SOUND 0,60,10,4:GOSUB 390:SOUND 0,54,10,4:GOSUB 390:SOUND 0,48,10,4:GOSUB 390:SOUND 0,40,10,4:GOSUB 390
510 SOUND 0,54,10,4:GOSUB 390:SOUND 0,40,10,4:GOSUB 390:SOUND 0,0,0,0
520 ? #6;CHR$(125):D=USR(ADR(JUMP$),PM0+YP0,PMB+100):FOR N=1 TO 3:D=USR(ADR(JUMP$),PM(N)+YP(N),PMB+100):NEXT N
530 ROUND=ROUND+1:VEL=VEL+(VEL<3):GOSUB 1000:SOUND 1,0,0,0
540 SCORE=SCORE+1000:NUMBLOCK=0
550 GOTO 340
600 REM
630 ? CHR$(125):POKE 656,0:POKE 657,0:? "GAME OVER":POKE 656,0:POKE 657,20:? "SCORE ";SCORE
640 POKE 656,1:POKE 657,0:? "{inv}PRESS{/inv} fire {inv}to{/inv} PLAY"
650 IF STRIG(0)=1 THEN 650
660 ? #6;CHR$(125):ROUND=1:VEL=1:SCORE=0:NUMBLOCK=0:LIVES=3:SHAPE=PM1
670 GOSUB 1000:SOUND 1,0,0,0:GOTO 340
800 GRAPHICS 3:POKE 710,0:COLOR 1
810 PLOT 0,0:DRAWTO 0,10:PLOT 5,0:DRAWTO 5,10:PLOT 0,5:DRAWTO 5,5
820 PLOT 7,3:DRAWTO 7,7:DRAWTO 9,10:DRAWTO 11,10:DRAWTO 13,7:DRAWTO 13,3:DRAWTO 11,0:DRAWTO 9,0:DRAWTO 7,3
830 PLOT 15,3:DRAWTO 15,7:DRAWTO 17,10:DRAWTO 19,10:DRAWTO 21,7:DRAWTO 21,3:DRAWTO 19,0:DRAWTO 17,0:DRAWTO 15,3
840 PLOT 23,0:DRAWTO 23,10:PLOT 23,5:DRAWTO 27,0:PLOT 23,5:DRAWTO 27,10
850 PLOT 29,0:DRAWTO 29,10:PLOT 29,0:DRAWTO 31,0:PLOT 29,5:DRAWTO 31,5:PLOT 29,10:DRAWTO 31,10
860 PLOT 33,0:DRAWTO 36,3:DRAWTO 39,0:PLOT 36,3:DRAWTO 36,10
870 POKE 752,1:PRINT "GAME BY DAVID PLOTKIN":PRINT "CONCEPT BY ROBERT DEWITT"
880 PMB=PEEK(106)-24:POKE 54279,PMB:PMB=PMB*256:POKE 623,1
890 POKE 704,4:POKE 705,22:POKE 706,200:POKE 707,50:DIM JUMP$(26),PM(4),XP(4),YP(4)
900 FOR J=1 TO 25:READ AA:JUMP$(J,J)=CHR$(AA):NEXT J
910 DATA 104,104,133,204,104,133,203,104,133,207,104,133,206,160,0,177,206,145,203,200,192,50,208,247,96
920 FOR N=0 TO 500:SOUND 0,N,10,4:SOUND 1,500-N,10,4:NEXT N:POKE 88,0:POKE 89,PEEK(106)-24:PRINT #6;CHR$(125)
925 SOUND 0,0,0,0:SOUND 1,0,0,0
930 FOR LOOP=2 TO 8 STEP 3:FOR J=0 TO 7:READ AA:POKE PMB+LOOP*10+J,AA:NEXT J:NEXT LOOP
939 REM BOY FACING LEFT STARTS AT PMB+20
940 DATA 28,28,8,29,110,12,55,97
944 REM BOY FACING RIGHT STARTS AT PMB+50
945 DATA 28,28,72,124,15,28,118,67
949 REM TRUANT OFFICER STARTS AT PMB+80
950 DATA 16,124,48,185,126,56,40,108
960 FOR N=1 TO 3:PM(N)=PMB+512+128*N:YP(N)=-8+82*(N=1 OR N=3):NEXT N:XP(1)=55:XP(2)=125:XP(3)=200
970 PM0=PMB+512:XP0=170:YP0=-2:PM1=PMB:PM2=PMB+30:PM3=PMB+60
990 RETURN
1000 COLOR 1:X=145:Y=-6:N=-2
1010 FOR M=1 TO 6
1020 N=N+2:X=X-20:Y=Y+12
1030 FOR Q=0 TO N
1040 XX=X+Q*12
1050 PLOT XX,Y:DRAWTO XX+12,Y:DRAWTO XX+4,Y+4:DRAWTO XX-8,Y+4:DRAWTO XX,Y:PLOT XX+4,Y+4:DRAWTO XX+4,Y+12
1060 PLOT XX-8,Y+4:DRAWTO XX-8,Y+12
1070 SOUND 1,XX,10,4:COLOR 2
1080 FOR YY=Y+5 TO Y+11:PLOT XX-7,YY:DRAWTO XX+3,YY:NEXT YY:COLOR 1:NEXT Q:NEXT M:PLOT 17,78:DRAWTO 149,78
1085 RETURN
1090 SOUND 1,0,0,0:DL=PEEK(560)+256*PEEK(561):NUMBLOCK=0:SHAPE=PM1:BOARD=1:VEL=1
1100 A=DL+85
1110 POKE A,71:POKE A+3,6:POKE A+4,6:POKE A+5,65:POKE A+6,PEEK(A+7):POKE A+7,PEEK(A+8):POKE 710,12
1120 POKE 656,0:POKE 657,22:PRINT "{inv}score{/inv} {inv}ROUND{/inv}"
1130 POKE 656,0:POKE 657,2:PRINT SCORE;:POKE 657,15:PRINT ROUND;
1140 POKE 656,1:POKE 657,7:? "LIVES:";LIVES;:D=USR(ADR(JUMP$),PM0+YP0,PM1):POKE 53248,XP0
1150 FOR Q=1 TO 3:D=USR(ADR(JUMP$),PM(Q)+YP(Q),PM3):POKE 53248+Q,XP(Q):NEXT Q:RETURN
Download
The original program from the Antic disk, to LOAD or ENTER instead of typing it: HOOKEY.BAS.
Credits
- Program listing: Hookey! — program listing (Antic, September 1983 (Vol. 2, No. 6), "In the Public Domain") — David Plotkin (concept by Robert DeWitt)
- Picture: Round 1 begins: the kid on top of the rock pile, and the three truant officers closing in. — David Plotkin (concept by Robert DeWitt) (program); screenshot by the site
- Antic Software Archive — disk files (September 1983 - Vol. 2 No. 6): HOOKEY.BAS — David Plotkin (concept by Robert DeWitt), 1983
- Antic magazine scan (OCR text layer): Antic_Vol_2-06_1983-09_Education_text.pdf — Internet Archive
