Overflow

Type
Game
Category
Action game
Author
Eric Anschuetz, Robert Anschuetz and John Weisgerber
Published in
Antic, July 1985 (Vol. 4, No. 3)
Year
1985
Language
Atari BASIC
Requirements
Any Atari 8-bit computer, Atari BASIC, joystick in port 1; disk or cassette
Overflow playfield: ten rows of dark red sewage pipes on each side of a central shaft with the plumber at the top, score line and PRESS START prompt below

About the program

Overflow was the "bonus game" in Antic's July 1985 issue. It came from the Eastern Michigan University team of brothers Eric and Robert Anschuetz and John Weisgerber, who wrote several games for the magazine. The article opens with a spoof letter to an etiquette columnist about sewage backing up during a dinner party. The answer, of course, is to hurl your plunger at each overflowing pipe.

You're a plumber riding up and down a vertical shaft in the middle of the screen. Ten bands of sewage slide left and right on either side of you. If one reaches the central pipe, the game is over. Throw the plunger at a band that is moving towards you and you push it back. That scores 10 points and reverses its direction. At 250 points every band speeds up, and the pipe colour changes at 500.

Typing it in

The program is plain Atari BASIC with no special characters. Antic printed a TYPO II checksum beside each line of the magazine listing. They aren't part of the program, and this disk version doesn't have them. The DATA lines at 480–490 define the custom character shapes and the plunger graphics, so check them carefully. Line 50 lowers the top of RAM (location 106), so press RESET or type GRAPHICS 0 after a crash before you RUN it again.

How to play

Press START at the title screen. Push the joystick up or down to ride the lift, and push it left or right to fire the plunger in that direction. Only bands moving towards the centre can be pushed back. A hit on a band that is already moving away just wastes the throw. The game ends as soon as any sewage touches the shaft, and the high score is kept until you stop the program.

How it works

The authors explained the trick in the article. The playfield is ANTIC mode 5, and every one of its ten rows has its own Load Memory Scan (LMS) instruction. All ten point at the same page of memory, which holds a band of "water" bytes (line 470). Line 140 moves a band by adding that row's increment from the array Q() to the low byte of its LMS address, so each row scrolls independently without any data being moved. When the plunger hits a band, the sign of that row's increment is simply flipped.

The plumber, the plunger and the central pipe are players. Vertical movement is done by POKEing locations 88/89 (the screen pointer) to "print" a string into player memory at the right height (lines 160–200). Collisions are read from the GTIA collision registers at 53253 and 53255.

Listing

10 REM OVERFLOW
20 REM BY ANSCHUETZ/WEISGERBER/ANSCHUETZ
30 REM (c) 1985, ANTIC PUBLISHING
40 TUNL=50:WATR=148:MT=0
50 POKE 106,PEEK(740)
60 MEM=PEEK(106):DL=(MEM-5)*256:CH=(MEM-4)*256:JW=MEM-12:EA=MEM-11:RA=(MEM-9)*256:S=(MEM-7)*256
70 GRAPHICS 2:POKE 709,50:DIM Q(10),A$(46),B$(16):POKE 755,0:POSITION 6,4:? #6;"OVERFLOW"
80 POKE 710,30:POKE 712,30:? :? "    Anschuetz/Weisgerber/Anschuetz":GOTO 410
90 POKE 709,TUNL:POKE 710,WATR:POKE 712,0:POKE 707,TUNL
100 POKE 89,JW:POKE 756,MEM-4:POKE 559,62:POKE 560,0:POKE 561,MEM-5:POKE 53251,120:POKE 53248,123
110 ? :? :? :? :FOR X=1 TO 10:Q(X)=INT(RND(0)*2)*2-1:NEXT X:SC=0:POKE 656,0:POKE 657,16:? "OVERFLOW"
120 POKE 657,4:? "SCORE:0    ";:POKE 657,26:? "HIGH:";HC;:YX=33:POKE 88,YX:POSITION 0,0:? #6;A$(17,30)
130 QL=DL+1:C=0:FOR X=DL+4 TO DL+31 STEP 3:Y=INT(RND(0)*11)+101:Y=Y+(Y/2<>INT(Y/2)):POKE X,Y:NEXT X
140 C=C+1:QL=QL+3:POKE QL,PEEK(QL)+Q(C)
150 POKE 53278,0:IF QL>DL+28 THEN QL=DL+1:C=0
160 ST=STICK(0):IF ST=14 THEN YX=YX-16*(YX>33):POKE 88,YX:POSITION 0,0:? #6;A$(17,46)
170 POKE 709,TUNL:POKE 710,WATR
180 IF ST=13 THEN YX=YX+16*(YX<177):POKE 88,YX-16:POSITION 0,0:? #6;A$(1,30)
190 IF ST=7 AND J=0 THEN PLX=133:PLY=YX+3:J=4:POKE 89,EA:POKE 88,YX+3:POSITION 0,0:? #6;B$(1,8):POKE 89,JW
200 IF ST=11 AND J=0 THEN PLX=115:PLY=YX+3:J=-4:POKE 89,EA:POKE 88,YX+3:POSITION 0,0:? #6;B$(9,16):POKE 89,JW
210 IF PEEK(53255)>3 THEN POKE 707,WATR:GOTO 360
220 IF J<>0 THEN 240
230 GOTO 140
240 IF PEEK(53253)>3 THEN 270
250 POKE 53249,PLX:PLX=PLX+J
260 IF PEEK(53253)<4 THEN 290
270 HQ=(PLY-20)/16:IF SGN(Q(HQ))<>SGN(J) THEN 330
280 SOUND 0,100,10,10:SC=SC+10:Q(HQ)=-Q(HQ):POKE 657,10:? SC;:GOTO 310
290 IF PLX>200 OR PLX<48 THEN 330
300 GOTO 140
310 POKE 77,0:IF SC=250 THEN SOUND 0,60,10,12:GOTO 350
320 IF SC=500 THEN SOUND 0,60,10,12:POKE 53259,3:POKE 53251,112:FOR X=1 TO 100:NEXT X
330 POKE 53249,0:J=0:POKE 89,EA:POKE 88,PLY:POSITION 0,0:? #6;A$(1,8):POKE 89,JW:POKE 53278,0
340 SOUND 0,0,0,0:GOTO 140
350 FOR X=1 TO 10:Q(X)=Q(X)*2:NEXT X:FOR X=DL+4 TO DL+31 STEP 3:Y=PEEK(X):POKE X,Y+(Y/2=INT(Y/2)):NEXT X:GOTO 330
360 J=0:POKE 656,3:POKE 657,9:? "PRESS <START> TO BEGIN";:IF SC>HC THEN HC=SC
370 YC=YC+(YC<255)-255*(YC=255):POKE 704,YC:IF PEEK(53279)<>6 THEN 370
380 FOR X=DL+4 TO DL+31 STEP 3:POKE X,108:NEXT X:POKE 89,EA:POKE 88,PLY:POSITION 0,0:? #6;A$(1,8):POKE 53251,120
390 POKE 704,198
400 POKE 89,JW:POKE 88,YX:POSITION 0,0:? #6;"               ":POKE 707,TUNL:POKE 53249,0:POKE 53259,1:GOTO 110
410 FOR X=0 TO 511:POKE X+CH,PEEK(X+57344):NEXT X:FOR X=8 TO 23:READ A:POKE X+CH,A:NEXT X
420 FOR X=DL TO DL+2:POKE X,112:NEXT X:FOR X=DL+3 TO DL+30 STEP 3:POKE X,69:POKE X+1,108:POKE X+2,S/256:NEXT X
430 POKE DL+33,66:POKE DL+34,PEEK(660):POKE DL+35,PEEK(661):FOR X=DL+36 TO DL+38:POKE X,2:NEXT X:POKE DL+39,65
440 FOR X=RA+32 TO RA+191:POKE X,255:NEXT X:FOR X=JW*256 TO RA:POKE X,0:NEXT X:FOR X=1 TO 46:A$(X,X)=" ":NEXT X
450 FOR X=17 TO 30:READ A:A$(X)=CHR$(A+32):NEXT X:A$(46,46)=" ":FOR X=1 TO 16:READ A:B$(X)=CHR$(A):NEXT X
460 POKE 623,1:POKE 54279,MEM-16:POKE 53277,3:POKE 704,198:POKE 705,198:POKE 707,TUNL:POKE 53259,1
470 FOR X=S TO S+108:POKE X,2:POKE X+147,2:NEXT X:FOR X=S+109 TO S+146:POKE X,1:NEXT X:SOUND 1,160,8,2:GOTO 90
480 DATA 84,170,170,170,170,170,170,69,84,255,255,255,255,255,255,69
490 DATA 14,14,14,4,31,31,14,14,14,14,10,10,10,10,33,35,35,255,255,35,35,33,160,128,128,255,255,128,128,160

Download

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

Credits