Zurk

Type
Game
Category
Arena shoot-out
Author
Michael Krueger and John Settles
Published in
Antic, March 1985 (Vol. 3, No. 11)
Year
1985
Language
Atari BASIC
Requirements
Any Atari 8-bit, joystick in port 1, Atari BASIC
A GRAPHICS 2 arena with a grey laser-barrier border and one grey barrier bar inside, two small fighter figures, three spare-life icons and SCORE 0 at the top

About the program

Your space garbage scow has crash-landed on the planet Zurk, and the locals have entered you in the 18-round Laserfighting event of the Zurkian Olympics. There is no second place. Only the winner of the Aluminum Medal of Zurk survives. Michael Krueger and John Settles of Vermillion, South Dakota, wrote this "fast-moving joystick BASIC game" for Antic's March 1985 issue.

The arena is a rectangle walled by deadly laser barriers, with more laser obstacles scattered inside. In the first six rounds you shoot it out with a Zurkian Laserfighter dressed in black. In the next six, you also have to grab the Zurkian Olympic Star before the timer runs out. In the last six, the star explodes into small Zurkian Olympic Pests, which you must collect in time. You get four tries, plus an extra one for every 2000 points. What happens when you finally win is best discovered for yourself, though the listing gives it away in lines 800–890.

What you need

A joystick in port 1 and Atari BASIC. It runs on any Atari.

Typing it in

The character shapes are in DATA (read in lines 5015–5020), and the arena is built from them in lines 5050–5055. A few strings contain control characters, such as {CTRL-M} (the timer bar) and {CTRL-C} (the lives markers). Hold CTRL and press the letter. {CLEAR} is ESC then SHIFT-CLEAR, and {inv} text is inverse video (Atari key). Note that line 80 contains 5E-03, the scientific notation for 0.005, as Atari BASIC lists it. Antic asked readers to check the program with TYPO II and SAVE it before running.

How to play

Press the space bar to start. Move with the joystick in eight directions. Press the trigger to fire a laser bolt in the direction you last moved. The Laserfighter wanders toward you and shoots sideways when you come close. Touching any laser wall, or being hit, costs a try.

How it works

  • The game runs in GRAPHICS 18 (GRAPHICS 2 with no text window). Every object is a redefined character POKEd straight into screen memory at SC, 20 bytes per row.
  • Joystick by table. Line 5040 fills J() so that J(STICK(0)) is the screen offset for that direction: -20 up, +20 down, ±1 sideways, and ±19 or ±21 diagonally. Line 30 moves the player with a single addition.
  • Bolts. A laser bolt is a character that a tight loop moves cell by cell (lines 60 and 200) until it hits something, with a rising tone from SOUND 0,Q,0,15 as it goes.
  • The opponent's aim. RN is the chance that the Laserfighter holds his fire. Every bolt you fire lowers it a little (line 80), so a trigger-happy player makes the enemy more dangerous.
  • A1=NOT(A1) flips between two animation frames each step.

Listing

5 REM ZURK
6 REM BY MICHAEL KRUEGER
7 REM AND JOHN SETTIES
8 REM ANTIC MAGAZINE
10 DIM C1(1),C2(1),J(15):GOSUB 5000:GOSUB 10000
15 FG=2000:RD=1:L=1:SP=50:RN=1:SCR=0:GY=4:OB=0:CL=0:GOSUB 5050:GOSUB 700
20 POKE P1,C1(A1):FOR T=1 TO SP:NEXT T:GOSUB 100:IF P1=P2 THEN 1000
22 IF STRIG(0)=0 AND ST=0 THEN 50
25 S=STICK(0):IF S=15 THEN FOR T=1 TO SP:NEXT T:GOTO 20
30 AD=J(S):P1=P1+AD:IF PEEK(P1)=1 OR PEEK(P1)=12 THEN GOSUB 90:IF ST=0 THEN 350
35 IF PEEK(P1)>12 THEN 1000
37 IF P1>SC+219 THEN POKE OP1,0:POKE P1,3:GOTO 980
40 A1= NOT (A1):POKE OP1,0:OP1=P1:GOTO 20
50 Q=0:MP=P1:OM=MP+AD:IF PEEK(OM)<>131 AND PEEK(OM)<>132 AND PEEK(OM)<>0 THEN 25
55 IF PEEK(OM)=131 OR PEEK(OM)=132 THEN 500
60 MP=MP+AD:IF  NOT (PEEK(MP)) THEN POKE OM,0:POKE MP,7:OM=MP:SOUND 0,Q,0,15:Q=Q+1:GOTO 60
65 SOUND 0,0,0,0:Q=0
70 POKE OM,0:IF PEEK(MP)=131 OR PEEK(MP)=132 THEN 500
80 RN=RN-5E-03:GOTO 25
90 ST=ST-1:POKE OP1,0:POKE P1,3:FOR I=15 TO 0 STEP -1:SOUND 0,10,8,I:NEXT I:RETURN
100 IF ST>0 THEN 300
105 IF RND(0)>0.5 THEN 130
110 IF P2>P1 THEN P2=P2-1:GOTO 150
120 IF P2<P1 THEN P2=P2+1:GOTO 150
130 IF P2>P1 THEN P2=P2-20:GOTO 150
140 IF P2<P1 THEN P2=P2+20
150 A2= NOT (A2)
160 IF PEEK(P2)>4 THEN P2=OP2:RETURN
170 POKE OP2,0:POKE P2,C2(A2):OP2=P2
180 IF ABS(P1-P2)>20 THEN RETURN
185 IF RND(0)<RN THEN RETURN
190 Q=0:MP=P2:D=-1:IF P2<P1 THEN D=+1
195 OM=MP+D:IF PEEK(OM)<>0 THEN RETURN
200 MP=MP+D:IF  NOT (PEEK(MP)) THEN POKE OM,0:POKE MP,135:OM=MP:SOUND 0,Q,0,15:Q=Q+1:GOTO 200
210 SOUND 0,0,0,0:Q=0
220 POKE OM,0:IF PEEK(MP)=3 OR PEEK(MP)=4 THEN 1000
230 RETURN
300 BN=BN-10:IF BN<0 THEN POP :GOTO 1000
310 SOUND 1,5,0,BN:POSITION 12,0:? #6;BN;"{CTRL-M}";:RETURN
350 POKE OP1,0:POKE P1,3:POSITION 6,0:? #6;"SCORE";:SOUND 1,0,0,0
360 IF BN>0 THEN SOUND 0,10,8,15:SCR=SCR+5:BN=BN-5:POSITION 12,0:? #6;SCR:SOUND 0,0,0,0:GOTO 360
361 IF L=4 THEN 960
362 CL=CL+1:IF CL=INT(L)-1 THEN CL=0:GOSUB 900:GOTO 20
364 FOR I=0 TO 15 STEP 0.5:SETCOLOR 4,0,I:NEXT I
365 FOR I=15 TO 0 STEP -0.5:SETCOLOR 4,0,I:NEXT I:SETCOLOR 4,9,4
370 POKE P1,3:M=P1-20:OM=M:ST=4
380 IF PEEK(M)<>0 THEN ST=ST-1:GOTO 385
382 IF PEEK(M)=0 THEN POKE OM,0:POKE M,12:OM=M:M=M-20:SOUND 0,M,8,15:GOTO 382
385 M=P1+1:OM=M
390 IF PEEK(M)<>0 THEN ST=ST-1:GOTO 395
392 IF PEEK(M)=0 THEN POKE OM,0:POKE M,12:OM=M:M=M+1:SOUND 0,M,8,15:GOTO 392
395 M=P1+20:OM=M
400 IF PEEK(M)<>0 THEN ST=ST-1:GOTO 405
402 IF PEEK(M)=0 THEN POKE OM,0:POKE M,12:OM=M:M=M+20:SOUND 0,M,8,15:GOTO 402
405 M=P1-1:OM=M
410 IF PEEK(M)<>0 THEN ST=ST-1:GOTO 415
412 IF PEEK(M)=0 THEN POKE OM,0:POKE M,12:OM=M:M=M-1:SOUND 0,M,8,15:GOTO 412
415 SOUND 0,0,0,0:POSITION 6,0:? #6;"BONUS":POSITION 12,0:? #6;"{CTRL-M}{CTRL-M}{CTRL-M}{CTRL-M}{CTRL-M}{CTRL-M}";:BN=ST*150:OP1=P1:GOTO 20
500 FOR I=7 TO 0 STEP -0.1:POKE 710,14:SOUND 0,150,10,15:FOR T=1 TO I:NEXT T:SOUND 0,0,0,0:POKE 710,148
510 NEXT I:POKE P2,207
511 IF L=4 THEN 930
512 IF L=1 THEN SCR=SCR+INT(L*100):GOSUB 900:GOTO 20
513 ST=1:BN=500:POKE 710,0
515 POSITION 6,0:? #6;"BONUS":POSITION 12,0:? #6;"{CTRL-M}{CTRL-M}{CTRL-M}{CTRL-M}{CTRL-M}{CTRL-M}";
517 R=SC+INT(RND(0)*240):IF PEEK(R)<>0 THEN 517
520 POKE R,1:GOTO 20
700 POSITION 1,0:? #6;"{CTRL-M}{CTRL-M}{CTRL-M}";:IF GY-1<=0 THEN RETURN
710 FOR I=1 TO GY-1:POSITION I,0:? #6;"{CTRL-C}";:NEXT I:RETURN
800 GRAPHICS 2+16:? #6:? #6:? #6;"{inv}ATTENTION PLEASE!{/inv}":? #6
810 ? #6;"YOU HAVE COMPLETED"
815 ? #6;"THE ZURKIAN OLYMPIC"
820 ? #6;"LASERFIGHTING EVENT"
825 ? #6;"SUCCESSFULLY, BUT"
830 ? #6;"THERE IS ONE SMALL"
835 ? #6;"PROBLEM..."
840 FOR I=1 TO 5:FOR J=0 TO 15 STEP 0.1:POKE 708,J:NEXT J:NEXT I
845 GRAPHICS 2+16:? #6:? #6:? #6:? #6;"THE JUDGES CONSUMED"
850 ? #6;"A VERY LARGE AMOUNT"
855 ? #6;"OF ZURKIAN VODKA &"
860 ? #6;"ARE UNFIT TO RATE"
865 ? #6;"YOU PROPERLY..."
870 FOR I=1 TO 5:FOR J=0 TO 15 STEP 0.1:POKE 708,J:NEXT J:NEXT I
875 GRAPHICS 2+16:POSITION 0,4:? #6;"THEREFORE THE RULES"
880 ? #6:? #6;"REQUIRE A REMATCH!"
885 FOR I=1 TO 5:FOR J=0 TO 15 STEP 0.1:POKE 708,J:NEXT J:NEXT I
890 GOSUB 5000:GOTO 15:GOTO 15
900 OB=OB+5:SP=SP-5:RD=RD+1:IF RD>6 THEN RD=1:L=L+1:IF L=2 THEN SP=20:RN=1:OB=0
910 GOSUB 5050:GOSUB 700
920 RETURN
930 FOR I=1 TO 50
940 Q=SC+INT(RND(0)*240):IF PEEK(Q)<>0 THEN 940
950 POKE Q,12:NEXT I:POSITION 6,0:? #6;"BONUS";:BN=3000:ST=50:GOTO 20
960 COLOR 32:FOR I=0 TO 3:PLOT 10-I,11:PLOT 9+I,11:FOR J=0 TO 255 STEP 9-(I*2):SOUND 0,J,12,J/17:NEXT J:NEXT I
970 SOUND 0,0,0,0:OP1=P1:GOTO 20
980 FOR I=5 TO 200 STEP 5:FOR J=0 TO 255 STEP I:SOUND 0,J,10,J/17:POKE 708,J:NEXT J:NEXT I:SETCOLOR 0,1,6
990 SOUND 0,0,0,0:GOTO 800
1000 SOUND 1,0,0,0:CL=0:POKE OP1,0:POKE P1,3
1005 FOR I=7 TO 0 STEP -0.1:POKE 708,14:SOUND 0,150,10,15:FOR T=1 TO I:NEXT T:POKE 708,22:SOUND 0,0,0,0
1006 NEXT I:POKE P1,0:ST=0:GY=GY-1:GOSUB 700:IF GY>0 THEN GOSUB 5050:GOTO 20
1010 GOSUB 10000:SCR=0:GOTO 15
5000 GRAPHICS 2+16:POKE 559,0:L1=PEEK(756):L2=PEEK(106)-8:SET1=L1*256:SET2=L2*256:IF PEEK(SET2+130)=102 THEN 5030
5010 FOR I=0 TO 511:POKE SET2+I,PEEK(SET1+I):NEXT I
5015 READ CHR:IF CHR=-1 THEN 5030
5020 P=SET2+CHR*8:FOR I=0 TO 7:READ B:POKE P+I,B:NEXT I:GOTO 5015
5030 SC=PEEK(88)+256*PEEK(89):POKE 756,L2
5040 J(15)=0:J(5)=21:J(6)=-19:J(7)=1:J(9)=19:J(10)=-21:J(11)=-1:J(13)=20:J(14)=-20:RETURN
5050 POKE 559,0:PRINT #6;"{CLEAR}";:COLOR 143:PLOT 0,0:PLOT 19,0:PLOT 19,11:PLOT 0,11:COLOR 13:PLOT 1,0:DRAWTO 18,0
5053 SETCOLOR 2,0,0:SETCOLOR 0,1,6:SETCOLOR 4,9,4:SETCOLOR 1,0,12:SETCOLOR 3,0,8
5055 PLOT 1,11:DRAWTO 18,11:COLOR 26:PLOT 0,1:DRAWTO 0,10:PLOT 19,1:DRAWTO 19,10
5057 COLOR 141:PLOT 5,5:DRAWTO 15,5
5058 POSITION 6,0:? #6;"SCORE":POSITION 12,0:? #6;SCR:IF SCR>=FG THEN GY=GY+1:FG=FG+1000
5060 GOSUB 700:P1=SC+30:P2=SC+210:OP1=P1:OP2=P2:C1(0)=3:C1(1)=4:C2(0)=131:C2(1)=132
5062 POKE P1,3:POKE P2,131
5064 FOR I=1 TO OB
5065 Q=SC+INT(RND(0)*240):IF PEEK(Q)<>0 THEN 5065
5066 POKE Q,207:NEXT I
5070 POKE 559,34:RETURN
6000 DATA 1,153,102,189,102,102,189,102,153
6010 DATA 3,56,184,144,254,58,58,232,14
6020 DATA 4,56,58,18,254,184,184,46,224
6030 DATA 13,0,255,255,255,255,255,255,0
6040 DATA 26,126,126,126,126,126,126,126,126
6050 DATA 15,0,126,126,126,126,126,126,0
6060 DATA 12,0,34,28,20,28,34,0,0
6070 DATA 60,128,192,160,144,136,132,130,129
6080 DATA 61,128,64,32,16,8,4,2,1
6090 DATA 63,0,0,0,0,0,0,0,255
9000 DATA -1
10000 GRAPHICS 1+16:POKE 756,L2:SETCOLOR 4,9,4:POKE 559,0
10010 ? #6:? #6
10014 ? #6;" {inv}___{/inv} {inv}_{/inv} {inv}_{/inv} {inv}___{/inv} {inv}_{/inv} {inv}_{/inv} "
10015 ? #6;" {inv}\]]]\]\]\]]]\]\]{/inv}"
10020 ? #6;" {inv}]{/inv}---{inv}\{/inv}-{inv}]{/inv}-{inv}\{/inv}---{inv}\{/inv}-{inv}]{/inv}-"
10030 ? #6;" {inv}_\]{/inv}-{inv}\{/inv}-{inv}]{/inv}-{inv}\{/inv}-{inv}]{/inv}-{inv}\{/inv}-{inv}]{/inv}-"
10040 ? #6;" {inv}\]{/inv}- {inv}\{/inv}-{inv}]{/inv}-{inv}\{/inv}--{inv}]\{/inv}--{inv}]{/inv}"
10050 ? #6;" {inv}\{/inv}-{inv}]]\{/inv}-{inv}]{/inv}-{inv}\{/inv}-{inv}]{/inv}-{inv}\{/inv}-{inv}]{/inv}-"
10060 ? #6;" {inv}]{/inv}---{inv}]{/inv}---{inv}]{/inv}-{inv}]{/inv}-{inv}]{/inv}-{inv}]{/inv}-"
10070 ? #6:? #6:? #6:? #6
10180 ? #6;"     {inv}CREATED BY{/inv}"
10190 ? #6;"  {inv}MICHAEL KRUEGER{/inv}"
10200 ? #6;"        AND"
10210 ? #6;"   JOHN SETTLES"
10220 ? #6:? #6:? #6:? #6;"{inv}PRESS SPACE TO PLAY{/inv}"
10222 IF SCR>=HI THEN HI=SCR
10225 ? #6:? #6;"LAST ";SCR;" HIGH ";HI;:POKE 559,34
10230 POKE 764,255:J=0.5:I=6
10240 IF PEEK(764)=33 THEN 10260
10245 I=I+J:IF I>15 OR I<6 THEN J=-J:GOTO 10245
10250 POKE 708,21-I:POKE 710,I:GOTO 10240
10260 GRAPHICS 2+16:POKE 756,L2:RETURN

Download

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

Credits