Drop
- Type
- Game
- Category
- Catching game
- Author
- John Zakour
- Published in
- The Best of Antic, Volume 1 (Antic Publishing), one of the book's new games
- Language
- Atari BASIC
- Requirements
- Joystick in port 1, Atari BASIC; 32K or more RAM recommended (the program builds two fonts at $4000 and $4400)
- Tags
- antic, best-of-antic, graphics-1, character-set, animation, joystick, arcade, beginner, atari-basic
- Related
- Skull Chase, Crystal Caves, Diver, Fallout, Risky Rescue, Starsector Defense
About the program
Drop was another of the six brand-new games in The Best of Antic, Volume 1. Its book introduction is honest about it: you can never beat this game, you can only get better at it. Faces appear at the top of the playfield and fall toward the bottom. You slide a dish left and right to catch them. Miss one and the game is over. Every catch scores, and the faces fall faster each time. The book doubted anyone would ever score more than 1000.
It is a good first program to study. It's short, it uses only PRINT #6 in a big-text mode, and it shows two neat tricks with character sets.
What you need
A joystick in port 1. The book lists 16K, but lines 1005–1170 build two character sets at addresses 16384 and 17408 ($4000 and $4400), so use a machine with at least 32K. Any 48K or 64K Atari, or an emulator, is fine.
Typing it in
Inverse-video characters appear as {inv}…{/inv}. Press the Atari key, type the characters, then press it again. The inverse ! in lines 220 and 240 is the lead face. The plain ! in lines 245 and 247 is drawn in a different colour, because in GRAPHICS 1 inverse video selects another colour register. Watch the spaces in " #$% ". They erase the dish's old position as it moves.
How to play
Push the joystick left or right to move the dish. The first face falls on its own. A second joins once the first passes row 9, and a third after row 15. After a miss, press the fire button to play again. The high score for the session is shown.
How it works
- Lines 1005–1030 copy the ROM font (from 57344, $E000) into two RAM sets. Lines 1100–1170 then redefine the characters used for the faces and the dish. The two sets differ in the face and in the
&used for the side walls. - Lines 236–238 swap
POKE 756,64andPOKE 756,68on every step, flipping between the two fonts, so the faces change expression and the dashed walls seem to crawl. This is character-set animation: one POKE changes every face on the screen at once. - Line 200 reads the joystick with a lookup table:
SA(PEEK(632))is +1 for right, -1 for left and 0 otherwise. That is quicker than a chain of IFs. DLAis the delay between steps. Each catch takes 0.35 off it, so the game speeds up and the score per catch (11-DLA) goes up.- Line 240 sets the pitch of the falling sound from the face's height with POKEs to the POKEY registers at 53762 and 53763.
Listing
1 REM ******** DROP ********
2 REM BY JOHN ZAKOUR
5 GOTO 100
10 IF X=2 THEN X=3:RETURN
20 IF X=15 THEN X=14:RETURN
30 RETURN
100 DIM SA(15)
105 GOSUB 1000:C=1:HI=0
110 FOR N=1 TO 15:SA(X)=0:NEXT N:SA(7)=1:SA(11)=-1
115 GRAPHICS 1+16:SETCOLOR 4,4,0
116 POSITION 2,5:PRINT #6;"d":POSITION 2,7:PRINT #6;"{inv}r{/inv}":POSITION 2,9:PRINT #6;"o":POSITION 2,11:PRINT #6;"{inv}p{/inv}"
117 POKE 756,64
120 Y=19:X=10:DL=1
121 FOR PY=2 TO 18
122 POSITION 4,PY:PRINT #6;"&":POSITION 17,PY:PRINT #6;"{inv}&{/inv}"
123 NEXT PY
124 DLA=10
125 DY=1:DX=INT(12*RND(1)+5)
127 DX2=INT(12*RND(1)+5):DY2=1
130 DX3=INT(9*RND(1)+5):DY3=1
160 POSITION X,Y:PRINT #6;" #$% "
200 S=SA(PEEK(632))
210 IF S<>0 THEN X=X+S:GOSUB 10:POSITION X,Y:PRINT #6;" #$% "
220 POSITION DX,DY:PRINT #6;"{inv}!{/inv}"
230 DL=DL+1
235 IF DL<DLA THEN 200
236 IF C=1 THEN POKE 756,64:C=2:GOTO 240
238 POKE 756,68:C=1
240 DL=1:POSITION DX,DY:PRINT #6;" ":DY=DY+1:POSITION DX,DY:PRINT #6;"{inv}!{/inv}":POKE 53762,DY+10:POKE 53763,163
245 IF DY>9 THEN POSITION DX2,DY2:PRINT #6;" ":DY2=DY2+1:POSITION DX2,DY2:PRINT #6;"!"
247 IF DY>15 THEN POSITION DX3,DY3:PRINT #6;" ":DY3=DY3+1:POSITION DX3,DY3:PRINT #6;"!"
250 IF DY<>19 THEN 200
255 IF DX=X+1 OR DX=X+2 OR DX=X+3 THEN 260
257 GOTO 266
260 SC=SC+INT(11-DLA):DLA=DLA-0.35:POSITION 1,1:PRINT #6;SC:DX=DX2:DY=DY2:DX2=DX3:DY2=DY3:GOTO 130
265 DX=DX2:DY=DY2:GOTO 130
266 GOSUB 2000
267 SOUND 0,164,10,8:FOR S=1 TO 150:NEXT S:SOUND 0,0,0,0:FOR S=1 TO 5:NEXT S:SOUND 0,164,10,8:FOR S=1 TO 150:NEXT S
268 SOUND 0,0,0,0:FOR S=1 TO 5:NEXT S:SOUND 0,217,10,10:FOR S=1 TO 300:NEXT S:SOUND 0,0,0,0
270 POSITION 6,8:PRINT #6;"{inv}game{/inv} over":SOUND 1,0,0,0:POKE 77,0
275 IF SC>HI THEN HI=SC
277 POSITION 5,9:PRINT #6;"{inv}hit <{/inv}button{inv}>{/inv}":POSITION 6,12:PRINT #6;"HIGH ";HI
279 IF STRIG(0)<>0 THEN 270
280 SC=0:GRAPHICS 1+16:SETCOLOR 4,4,0:GOTO 120
400 GOTO 200
1000 GRAPHICS 2+16:POSITION 6,8:PRINT #6;"PLEASE":POSITION 7,9:PRINT #6;"{inv}WAIT{/inv}"
1002 POSITION 2,2:PRINT #6;"catch the falling":POSITION 4,4:PRINT #6;"{inv}faces{/inv}!!!!!"
1005 FOR I=96 TO 720
1010 POKE 16384+I,PEEK(57344+I)
1020 POKE 17408+I,PEEK(57344+I)
1030 NEXT I
1100 FOR I=16392 TO 16439
1110 READ D
1120 POKE I,D
1130 NEXT I
1140 FOR I=17416 TO 17463
1150 READ D
1160 POKE I,D
1170 NEXT I
1180 DATA 126,129,165,129,165,189,129,126
1182 DATA 24,24,24,24,24,24,24,24
1184 DATA 0,0,0, 63,64,64,63,31
1186 DATA 0,0,0,255,0,0,255,255
1188 DATA 0,0,0,252,2,2,252,248
1189 DATA 0,0,0,0,24,24,24,24
1190 DATA 0,0,255,153,255,189,129,255
1192 DATA 0,0,0,0,24,24,24,24
1194 DATA 0,0,0, 63,64,64,63,31
1196 DATA 0,0,0,255,0,0,255,255
1198 DATA 0,0,0,252,2,2,252,248
1199 DATA 24,24,24,24,0,0,0,0
1200 POKE 756,64
1205 SOUND 0,31,10,8:FOR S=1 TO 50:NEXT S:SOUND 0,0,0,0
1210 RETURN
2000 FOR LD=1 TO 15:SOUND 2,75,8,14:SOUND 3,76,8,14:POKE 712,PEEK(53770)
2010 POSITION X,Y:PRINT #6;"{inv}#$%{/inv}":FOR S=1 TO 10:NEXT S:POSITION 4,Y:PRINT #6;"# $ %"
2020 NEXT LD
2025 SOUND 0,0,0,0:SOUND 1,0,0,0:SOUND 2,0,0,0:SOUND 3,0,0,0:SETCOLOR 4,4,0
2030 RETURN
3000 REM THANKS:PAM C,JB,JBJ,ED,DAVID,LARRY,& COREY
Download
The original program from the Antic disk, to LOAD or ENTER instead of typing it: DROP.BAS.
Credits
- Program listing: Drop — program listing (The Best of Antic, Volume 1 (Antic Publishing), one of the book's new games) — John Zakour
- Picture: Drop after a missed face: the dashed walls, the faces and the dish are all redefined characters. — John Zakour (program); screenshot by the site
- Antic article text (Best of Antic Book) — Drop — John Zakour
- Antic Software Archive — disk files (Best of Antic Book): DROP.BAS — AtariMagazines.com (Kevin Savetz)
- Antic article text — ioboard.php — AtariMagazines.com (Kevin Savetz)
