Darkstar
- Type
- Game
- Category
- Trail (snake-style) action game
- Author
- Michael Mitchell
- Published in
- Antic, July 1985 (Vol. 4, No. 3)
- Year
- 1985
- Language
- Atari BASIC
- Requirements
- Any Atari 8-bit computer, any memory size, Atari BASIC, joystick in port 1; disk or cassette
- Tags
- antic, action, joystick, graphics-7, locate, light-cycle, short-listing, 1985
About the program
Darkstar was a "bonus game" in Antic's July 1985 issue, by Michael Mitchell, a San Francisco high-school student. He was also the author of Rainbow DOS, which Antic was about to release as public domain. The magazine printed two versions, one in ACTION! and this one in Atari BASIC. Disk subscribers also got a compiled run-time copy of the ACTION! version. The article warned that the two weren't identical. The BASIC game has a simpler title screen and its own explosion routine, and it is much slower, so scores tend to be higher.
The story is suitably silly. It's 2001, aliens from the planet Spectra are building bases on Earth, and you fly the Air Force's secret jet, Darkstar. Its waste valve has jammed open, so it leaves a glowing radioactive trail behind it, and an angry President has fenced the whole area in with a force field.
What you need
Any 8-bit Atari with Atari BASIC and a joystick. It runs in any memory size, from disk or cassette.
Typing it in
The only special characters are the inverse-video words on the title screen in line 50. {inv}STAR{/inv} means press the Atari (inverse) key, type the text and press it again. In GRAPHICS 2, inverse letters come out in a different colour. Antic's printed listing had TYPO II checksums, which are not part of the program.
How to play
Press fire on the title screen. Your jet starts moving across a GRAPHICS 7 field framed by the force field. Steer with the joystick. The jet never stops, and it leaves a solid trail. A new base appears each time you destroy one, and flying over it scores 10 points (the article quotes 30 per base, perhaps for the ACTION! version). Touching your own trail or the border sets off an explosion. You get three jets. After the last one the GAME OVER screen shows your score, and pressing fire starts again.
How it works
The whole game rests on LOCATE (line 130). Before each step it reads the colour of the pixel ahead. Colour 1 is a base and colour 3 is a trail or the wall. The jet then plots colour 3 where it is, which builds the wall you must avoid. The bases are little colour-1 squares drawn at random positions (lines 110–120). The explosion at line 210 sweeps three sound channels downwards while it POKEs changing values into the display list's screen-address bytes, so the picture jumps around wildly. POKE 77,0 keeps the attract mode from kicking in, and POKE 559,0 blanks the screen while it is being redrawn.
Variations to try
Change SH=2 in lines 40 and 290 to give yourself more jets, or draw two bases at a time by running lines 110–120 twice. You can also try the bases in a different colour by changing the SETCOLOR 0 in line 100.
Listing
10 REM DARKSTAR, LISTING 2
20 REM BY MICHAEL MITCHELL
30 REM (c) 1985, ANTIC PUBLISHING
40 GRAPHICS 17:SOUND 0,191,10,15:SOUND 2,190,10,15:SH=2:SS=STICK(0)
50 POSITION 5,5:? #6;"DARK {inv}STAR{/inv}":POSITION 2,10:? #6;"by {inv}mike mitchell{/inv}":POSITION 1,16:? #6;"PRESS {inv}FIRE{/inv} to {inv}begin{/inv}"
60 X=X+1:SETCOLOR 0,X,10:SETCOLOR 1,X+3,10:SETCOLOR 2,X+5,10:SETCOLOR 3,X+7,10:IF STRIG(0)=0 THEN 80
70 GOTO 50
80 POKE 559,0:POKE 53768,133:FOR S=1 TO 2500:NEXT S:GRAPHICS 23:POKE 559,0:SOUND 0,0,0,0:SOUND 2,0,0,0
90 COLOR 3:XX=1:YY=0:X=50:Y=50:PLOT 2,2:DRAWTO 159,2:DRAWTO 159,79:DRAWTO 2,79:DRAWTO 2,2:POKE 559,34
100 SETCOLOR 0,10,15:SETCOLOR 2,5,7:SC=SC+10
110 A=RND(0)*152+3:B=RND(50)*70+5:COLOR 1:PLOT A,B:DRAWTO A+2,B
120 POKE 77,0:DRAWTO A+2,B+2:DRAWTO A,B+2:DRAWTO A,B
130 LOCATE X,Y,Z:IF Z=3 THEN 210
140 COLOR 3:PLOT X,Y:POKE 53279,5:SS=STICK(0):IF SS=14 THEN XX=0:YY=-1
150 IF Z=1 THEN FOR B=10 TO 1 STEP -1:SETCOLOR 4,B,B:SOUND 0,10,8,B:NEXT B:X=X+XX:Y=Y+YY:SETCOLOR 4,0,0:GOTO 100
160 IF SS=13 THEN XX=0:YY=1
170 IF SS=11 THEN XX=-1:YY=0
180 IF SS=7 THEN XX=1:YY=0
190 X=X+XX:Y=Y+YY:GOTO 130
200 REM EXPLOSION SUBROUTINE
210 S=PEEK(560)+256*PEEK(561)+5:L=0:H=0:FOR LL=70 TO 0 STEP -1.3:L=L+60:IF L>255 THEN L=L-256:SOUND 0,LL,8,13
220 SOUND 1,LL+5,8,14:SOUND 2,LL+10,8,12
230 POKE S,L:POKE S+1,H:NEXT LL:SH=SH-1:IF SH<0 THEN GOSUB 300:GRAPHICS 18:GOTO 250
240 GOSUB 300:GRAPHICS 7+16:GOTO 90
250 SOUND 0,191,10,15:SOUND 2,190,10,15
260 POSITION 5,3:? #6;"GAME OVER":POSITION 5,5:? #6;"SCORE ";SC:X=X+1
270 SETCOLOR 0,X,X:IF X>350 THEN GOSUB 300:GOTO 40
280 IF STRIG(0)=0 THEN GOTO 80
290 SH=2:GOTO 260
300 FOR D=0 TO 3:SOUND D,0,0,0:NEXT D:RETURN
Download
The original program from the Antic disk, to LOAD or ENTER instead of typing it: DARKSTAR.BAS.
Credits
- Program listing: Darkstar — program listing (Antic, July 1985 (Vol. 4, No. 3)) — Michael Mitchell
- Picture: The colour-cycling title screen of the BASIC version of Darkstar. — Michael Mitchell (program); screenshot by the site
- Antic, July 1985 - Vol. 4 No. 3: article (atarimagazines.com) — Michael Mitchell, 1985
- Antic disk, July 1985 - Vol. 4 No. 3: DARKSTAR.BAS (detokenized listing) — AtariMagazines.com (Kevin Savetz), 1985
