ANTIC v6.10 / FEBRUARY 1988 / PAGE 9
Unless you’re a real fanatic or a tournament contender, I’ll bet that you don’t play much chess anymore. Let’s face it, most “regular folks” find chess boring!
But now imagine a revitalized, fast-ACTION! chess — where the players don’t take turns.
That’s right… no turns. Killer Chess players make legal chess moves as fast as they can, deciding on instant strategies that they would have spent dull minutes pondering in a traditional game. Stodgy old chess becomes a fast-gun shootout.
Welcome to Killer Chess, written in ACTION! the fast, powerful programming language from Optimized Systems Software. You and your human opponent will use an Atari 8-bit computer and a pair of joysticks to battle it out in a radical new version of a traditional game.
TYPING IT IN: Insert the ACTION! cartridge into your 8-bit Atari and type in Listing 1, KILLER. ACT. Type carefully, because there isn’t a TYPO II for ACTION! After you have a copy of the complete program safely saved, go to the monitor by pressing [CONTROL] [SHIFT] [M] and compile the program by typing [C] [RETURN]. When the cursor starts blinking again, type [R] [RETURN] and the title page should appear.
MONTHLY DISK USERS: You can play Killer Chess without owning the ACTION! cartridge. Just insert your Antic Monthly Disk into your disk drive, remove all cartridges from your Atari (XL/XE owners should press the [OPTION] key) and turn on your Atari. When the DOS menu appears, just type [L] [RETURN], then type KILLER.EXE [RETURN].
When the title screen is seen, press [START] to begin a game. When the game begins, both players will be able to simultaneously move their respective cursors around the board. With joystick 0, player 1 controls the white cursor and white pieces. With joystick 1, player 2 controls the gray cursor and gray pieces.
Simply place the cursor over any piece you want to move and press the joystick button. Now move the cursor over a square that would be a legal move for that piece and press the button again. If the move is illegal, the computer will tell you so — with a rather unpleasant sound — and let you try again. Otherwise the piece will be placed at the new square. If you accidentally pick up a piece and don’t want to move it, just replace the cursor over the piece you selected and press the button again. The piece will be dropped.
To capture an enemy, simply make a legal move on top of it. The offending piece will be removed from play. You can capture a piece your opponent is “holding.” The piece isn’t actually moved until it is set down again.
To win, just land one of your characters on top of the opponent’s King. To return to the title screen, press [START] or wait about 10 seconds.
Killer Chess does not have castling or en passant moves, which are allowed under advanced chess rules but would be too confusing here.
The biggest programming problem in Killer Chess was detecting illegal chess moves. My solution is quite simple and can be applied to any chess program. The method is even fast enough to be used with BASIC.
Here’s what I did: When a piece is selected, its old position is recorded. Each new position chosen by a player is also recorded. The old position is then subtracted from the new position and stored in a “delta” value, one delta for X and one for Y. Delta means how much something changes. So if the new X position is 5 more than the previous one, the Delta X would be five. If the new Y position is 1 less than the old. Delta Y would be -1.
I then used IF statements to determine if the piece was allowed to move to that spot. For instance, a pawn is only allowed to move forward, so I checked to make sure that Delta X is equal to nothing but 1. If the old position was equal to its starting position, I allowed it to move an extra space — because Pawns can move two spaces on their first move.
If the Pawn’s new position is on top of an opponent’s piece, I allowed for a Delta Y movement of either 1 or -1. Combined with the Delta X, that would result in diagonal movement. Simple, really. It just took a bit of planning to work out the values for the special conditions of each chess piece.
If you think this issue’s Killer Chess is your kind of imaginative, fast-response Atari game challenge, you’ll also enjoy our February Super Disk Bonus — which consists of two additional clever games by the same author, Greg Knauss.
Frog and Reardoor, the bonus games, feature outstanding graphic imagery. They have strong, simple storylines and require fast thinking as well as fast eye-hand coordination. Frog has a nature scenario that kids are sure to like. Reardoor is a nerve-wracking space shoot-up where you must zap monsters at uncomfortably close quarters.
All of Knauss’s games are written in ACTION!, the powerful 8-bit programming language by Optimized Systems Software. However, the machine language “runtime” versions of Frog and Reardoor — also Killer Chess — on this month’s Antic Disk can be played on any 8-bit Atari computer without the OSS ACTION! cartridge. (Runtime listings are impossible to print in the magazine, due to their extreme length.)
For ACTION! programmers, the original source code of all three games is also on the monthly disk.
Frog gives you or your kids the chance to vicariously live the everyday life of this commonplace amphibian. You will see a frog sitting complacently on a lily pad while fat, black flies make their way back and forth above the pond. Use your joystick to jump the frog in any direction and press the trigger button to zap the frog’s tongue way out for a fly feed.
Reardoor’s setting is not unlike the Transporter Room on the Enterprise. Except instead of Kirk and Spock beaming up, you have marooned space colonists and vicious lizard-like aliens desperately trying to board your rescue spacecraft.
You’ll see three closed airlock doors and the control panel. The three airlocks will open, revealing two colonists and one alien. The doors close again in an instant and whatever was standing in them will have entered the ship. You must prevent each alien from boarding, by firing the gun mounted in the airlock where the monster is lurking. You do this by pressing the key bearing the number of the doorway you want to clear out.
At higher difficulty levels, the aliens begin to realize that their friends are being blown to bits, so they don the spacesuits of dead humans — but the faceplates, belts and boots turn green. Eventually the ranks of aliens thin out and they occasionally let three humans enter the airlocks simultaneously.
However, if nine aliens succeed in boarding your spaceship, they’ll (rather stupidly) enter the main reactor and destroy everything for the surrounding four or five miles.
Frog (FROG.EXE), Reardoor (REARDOOR.EXE) and an instruction file covering both games are on this month’s Antic Disk. These runtime programs cannot be played directly from the monthly disk menu. For complete loading instructions, choose selection 5 on the Main Menu of Side B and read the game HELP manual.
Your February 1988 Antic Disk — featuring all three ACTION! games in runtime as well as every program in this issue — will be shipped to you within 24 hours after receiving your order. Just phone Toll-Free to the Antic Disk Desk at (800) 234-7001. The monthly disk is only $5.95 (plus $2 for shipping and handling) on your Visa or MasterCard. Or mail a check for $5.95 (plus $2 shipping and handling) to Antic Disk Desk, 544 Second Street, San Francisco, CA 94107.
Only $5.95 for Antic Monthly Disk!
; KILLER CHESS ; BY GREG KNAUSS ; (c)1987, ANTIC PUBLISHING CARD PM,CH BYTE I,J,K,STK,PLR,LOC,CAP,OK BYTE ARRAY X(2),Y(2),OX(2),OY(2), HOLD(2),PAU(2),SND(2),DIS(2) INT X1,Y1,DX,DY,DUM1,DUM2 PROC CURSOR() ; SHAPE FOR CURSORS [255 129 129 129 129 129 129 255] PROC CHRS() ; BOARD EDGE [ 0 0 0 0 0 0 0 0 0 0 0 0 15 15 15 15 0 0 0 0 0 0 0 0 0 0 0 0 255 255 255 255 0 0 0 0 240 240 240 240 15 15 15 15 15 15 15 15 240 240 240 240 240 240 240 240 15 15 15 15 0 0 0 0 255 255 255 255 0 0 0 0 240 240 240 240 0 0 0 0 ; PIECES 0 0 0 56 56 16 124 0 0 84 124 56 56 56 124 0 0 6 60 124 28 28 60 126 0 16 24 108 124 56 16 124 0 214 254 124 56 56 124 254 0 16 56 146 254 124 56 124 ; TITLE 0 247 108 112 112 108 246 3 0 62 102 96 96 102 60 0 24 0 56 24 24 24 60 0 224 96 124 102 102 102 247 0 56 24 24 24 24 24 60 0 0 0 60 102 126 96 62 0 0 0 220 102 96 96 240 0 0 0 62 96 60 6 124 0 ; "PRESS START" 0 238 170 238 140 138 0 0 0 238 136 206 130 238 0 0 1 225 129 225 33 225 1 0 255 17 123 27 219 27 255 0 255 17 85 17 83 85 255 0 240 16 176 176 176 180 240 0] PROC SETUP() GRAPHICS(18) POKE(559,0) POKE (559,46) ; COLORS SETBLOCK(706,2,66) POKE(704,14) POKE(705,8) POKE(708,10) POKE(710,4) POKE(709,142) POKE(711,15) ;DO 711 ; P/M GRAPHICS PM=(PEEK(106)-8)*256 POKE(54279,PM/256) POKE(53277,3) SETBLOCK(53258,2,3) ZERO(PM,1024) POKE(623,2) PM==+512 K=51 FOR I=32 TO 95 STEP 8 DO FOR J=0 TO 7 DO POKE(PM+I+J+256,K) POKE(PM+I+J+384,K) OD K=255-K OD ; REDEFINED CHARACTERS CH=(PEEK(106)-16)*256 MOVEBLOCK(CH,CHRS,512) POKE(756,CH/256) ; DRAW BOARD POSITION(5,1) PRINTD(6,"..........") FOR I=2 TO 9 DO POSITION(5,I) PRINTD(6,". .") OD POSITION(5,10) PRINTD(6,"..........") POSITION(6,2) PRINTD(6,"+,-./-,+") POSITION(6,3) PRINTD(6,"********") POSITION(7,5) PRINTD(6,"........") POSITION(7,6) PRINTD(6,"........") POSITION(6,8) PRINTD(6,"********") POSITION(6,9) PRINTD(6,"+,-./-,+") POSITION(7,11) PRINTD(6,"......") POKE(53250,96) POKE(53251,128) POKE(559,46) ; WAIT FOR [START] I=0 DO POKE(54282,0) POKE(53273,I) I==+3 UNTIL PEEK(53279)=6 OD ; DRAW PIECES POSITION(6,2) PRINTD(6,"+* *+") POSITION(6,3) PRINTD(6,",* *,") POSITION(6,4) PRINTD(6,"-* *-") POSITION(6,5) PRINTD(6,".* *.") POSITION(6,6) PRINTD(6,"/* */") POSITION(6,7) PRINTD(6,"-* *-") POSITION(6,8) PRINTD(6,",* *,") POSITION(6,9) PRINTD(6,"+* *+") POSITION(7,11) PRINTD(6," ") RETURN PROC MAIN() ; GAME LOOP DO SETUP() X(0)=6 Y(0)=5 X(1)=13 Y(1)=6 HOLD(0)=0 HOLD(1)=0 PAU(0)=0 PAU(1)=0 PLR=1 ; PLAYER TURN LOOP DO ; ALTERNATE PLAYERS PLR=1-PLR ; RESET THESE FOR EACH TURN X1=0 Y1=0 POKE(77,0) IF PAU(PLR)=0 THEN SOUND(PLR,0,0,0) FI ; MOVE WHICH WAY??? STK=STICK(PLR) IF STK=14 OR STK=10 OR STK=6 THEN Y1=-1 FI IF STK=13 OR STK=9 OR STK=5 THEN Y1=1 FI IF STK=11 OR STK=10 OR STK=9 THEN X1=-1 FI IF STK=7 OR STK=6 OR STK=5 THEN X1=1 FI ; KEEP PLAYER ON BOARD LOC=LOCATE(X(PLR)+X1,Y(PLR)+Y1) IF LOC<10 THEN X1=0 Y1=0 FI ; MOVE CURSOR IF Y1<>0 THEN ZERO(PM+128*PLR+16+8*Y(PLR),8) FI X(PLR)==+X1 Y(PLR)==+Y1 POKE(53248+PLR,8*X(PLR)+48) MOVEBLOCK(PM+128*PLR+16+8*Y(PLR), CURSOR,8) ; WAIT! HE'S PLACING A PIECE! IF HOLD(PLR)>0 AND STRIG(PLR)=0 AND PAU(PLR)=0 THEN CAP=0 OK=0 DX=0 DY=0 ; SOMETHING TO CAPTURE! IF LOC<>32 THEN CAP=1 FI ; FIND DELTA VALUES DUM1=X(PLR) DUM2=OX(PLR) DX=DUM1-DUM2 DUM1=Y(PLR) DUM2=OY(PLR) DY=DUM1-DUM2 ; FLIP FOR PLAYER 2 IF PLR=1 THEN DX=-DX DY=-DY FI ; IS IT LEGAL??? ; PAWN IF HOLD(PLR)=1 THEN IF DX=1 AND DY=0 AND CAP=0 THEN OK=1 FI IF DX=2 AND DY=0 AND CAP=0 AND OX(PLR)=7+PLR*5 THEN OK=1 FI IF DX=1 AND (DY=1 OR DY=-1) AND CAP=1 THEN OK=1 FI FI ; ROOK IF HOLD(PLR)=2 THEN IF (DX<>0 AND DY=0) OR (DX=0 AND DY<>0) THEN OK=1 FI FI ; KNIGHT IF HOLD(PLR)=3 THEN IF (DX=2 AND DY=1) OR (DX=-2 AND DY=1) THEN OK=1 FI IF (DX=2 AND DY=-1) OR (DX=-2 AND DY=-1) THEN OK=1 FI IF (DX=1 AND DY=2) OR (DX=-1 AND DY=2) THEN OK=1 FI IF (DX=1 AND DY=-2) OR (DX=-1 OR DY=-2) THEN OK=1 FI FI ; BISHOP IF HOLD(PLR)=4 AND (DX=DY OR DX=-DY) THEN OK=1 FI ; QUEEN IF HOLD(PLR)=5 THEN IF DX=DY OR DX=-DY THEN OK=1 FI IF (DX<>0 AND DY=0) OR (DX=0 AND DY<>0) THEN OK=1 FI FI ; KING IF HOLD(PLR)=6 THEN IF (DX=1 AND DY=1) OR (DX=0 AND DY=1) OR (DX=-1 AND DY=1) THEN OK=1 FI IF (DX=1 AND DY=0) OR (DX=-1 AND DY=0) THEN OK=1 FI IF (DX=1 AND DY=-1) OR (DX=0 AND DY=-1) OR (DX=-1 AND DY=-1) THEN OK=1 FI FI ; CAN'T CAPTURE OWN PIECES OR ; BORDER IF LOC>128*PLR+41 AND LOC<128*PLR+127 OR LOC<10 THEN OK=0 FI ; DIDN'T MOVE IF DX=0 AND DY=0 THEN OK=1 FI ; MAKE SURE JUMPS WEREN'T MADE, ; EXCEPT BY KNIGHT IF HOLD(PLR)<>3 THEN I=OX(PLR) J=OY(PLR) X1=0 Y1=0 IF DX<0 THEN X1=-1 FI IF DX>0 THEN X1=1 FI IF DY<0 THEN Y1=-1 FI IF DY>0 THEN Y1=1 FI IF PLR=1 THEN X1=-X1 Y1=-Y1 FI IF (DX<-1 OR DX>1) OR (DY<-1 OR DY>1) THEN DO I==+X1 J==+Y1 K=LOCATE(I,J) IF K<>32 THEN OK=0 FI UNTIL (I=X(PLR)-X1 AND J=Y(PLR)-Y1) OR K<10 OD FI FI ; LEGAL MOVE! IF OK=1 THEN COLOR=32 PLOT(OX(PLR),OY(PLR)) COLOR=HOLD(PLR)+128*PLR+41 ; QUEEN ME! IF HOLD(PLR)=1 AND X(PLR)=7*(1-PLR)+6 THEN COLOR=128*PLR+46 FI ; KILL OTHER PLAYERS HOLD IF THAT'S ; WHAT WAS CAPTURED IF X(PLR)=OX(1-PLR) AND Y(PLR)=OY(1-PLR) THEN HOLD(1-PLR)=0 POSITION(11*(1-PLR)+4,2) PRINTD(6," ") FI ; WHO'D HE LAND ON?? K=LOCATE(X(PLR),Y(PLR)) ; WHOEVER IT WAS, KILL HIM PLOT(X(PLR),Y(PLR)) COLOR=32 PLOT(11*PLR+4,2) ; A KING DIED! IF K-128*(1-PLR)-41=6 THEN EXIT FI HOLD(PLR)=0 SND(PLR)=100*PLR+100 DIS(PLR)=14 FI ; ILLEGAL MOVE... IF OK=0 THEN SND(PLR)=255 DIS(PLR)=2 FI PAU(PLR)=5 FI ; PICK UP PIECE IF HOLD(PLR)=0 AND STRIG(PLR)=0 AND PAU(PLR)=0 AND LOC<>32 AND LOC>128*PLR+41 AND LOC<128*PLR+127 THEN ; Grab HOLD HOLD(PLR)=LOC-128*PLR-41 OX(PLR)=X(PLR) OY(PLR)=Y(PLR) COLOR=LOC PLOT(11*PLR+4,2) SND(PLR)=100*PLR+100 DIS(PLR)=10 PAU(PLR)=5 FI ; DELAY FOR CH=1 TO 2000 DO OD ; PAUSE FOR HUMANS IF PAU(PLR)>0 THEN PAU(PLR)==-1 SOUND(PLR,SND(PLR),DIS(PLR), PAU(PLR)*2) FI ; NEXT PLAYER OD ; VICTORY ROUTINE SNDRST() ZERO(PM,256) COLOR=32 FOR I=2 TO 9 DO FOR J=6 TO 13 DO LOC=LOCATE(J,I) IF LOC>128*(1-PLR) AND LOC<128*(1-PLR)+127 THEN PLOT(J,I) FI OD OD PLOT(4,2) PLOT(15,2) ; PAUSE CH=0 DO CH==+1 FOR I=1 TO 100 DO OD UNTIL CH=7500 OR PEEK(53279)=6 OD ; START NEW GAME OD
; FROG ; BY GREG KNAUSS ; (c)1987, ANTIC PUBLISHING BYTE TIME,SEC,PIC,JMP,SCR,DEL,FLY,FS, PM,DX,DY,EX,EY,OY,S,T,W,U,D,M BYTE ARRAY FY(4) INT DIR,TN,OX INT ARRAY FD(4) CARD DRB,CH,DL,X,Y,I,J,K CARD ARRAY FX(4) PROC PLRVBI() [162 3 189 244 6 240 89 56 221 240 6 240 83 141 254 6 106 141 255 6 142 253 6 24 169 0 109 253 6 24 109 252 6 133 204 133 206 189 240 6 133 203 173 254 6 133 205 189 248 6 170 232 46 255 6 144 16 168 177 203 145 205 169 0 145 203 136 202 208 244 76 87 6 160 0 177 203 145 205 169 0 145 203 200 202 208 244 174 253 6 173 254 6 157 240 6 189 236 6 240 48 133 203 24 138 141 253 6 109 235 6 133 204 24 173 253 6 109 252 6 133 206 189 240 6 133 205 189 248 6 170 160 0 177 203 145 205 200 202 208 248 174 253 6 169 0 157 236 6 202 48 3 76 2 6 76 98 228 0 0] PROC MYVBI() TIME==+1 [76 $E45F] PROC DLI() [72 238 0 5 173 0 5 141 10 212 201 1 208 12 169 99 141 9 212 169 198 141 23 208 104 64 201 2 208 7 169 40 141 26 208 104 64 201 3 208 15 169 130 141 26 208 141 24 208 169 9 141 25 208 104 64 169 224 141 9 212 169 15 141 23 208 169 0 141 0 5 104 64] PROC DLIST() [112 112 112 66 0 0 5 5 7 6 130 5 5 5 132 132 5 5 4 132 2 65] PROC FROG1() [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 54 108 255 227 126 128 252 252 238 118 54 59 108 216 254 130 198 252 0 252 220 204 238 102 116 160 208 240 240 240 240 224 224 224 224 192 128 192 224 192 128 0 0 0 0 128 192 192 192 224 224 224 224 240 240 240 240 240 240 240 248 248 248 248 192 54 108 255 193 99 190 128 206 198 231 198 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 240 124 126 255 199 187 127 127 119 250 124 0 0 128 128 128 64 224 224 224 96 96 240 240 240 240 240 240 240 120 120 120 56 188 188 140 156 188 156 8 0 0 0 128 196 238 223 158 188 184 184 56 120 120 248 240 240 240 240 240 224 224 224 224 224 192 64 64 192 128 128 128 0 0 0] PROC FROG2() [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 15 62 126 255 227 221 254 254 238 95 62 0 0 1 1 1 2 7 7 7 6 6 15 15 15 15 15 15 15 30 30 30 28 61 61 49 57 61 57 16 0 0 0 1 35 119 251 121 61 29 29 28 30 30 31 15 15 15 15 15 7 7 7 7 7 3 2 2 3 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 108 54 255 199 126 1 63 63 119 110 108 220 54 27 127 65 99 63 0 63 59 51 119 102 46 5 11 15 15 15 15 7 7 7 7 3 1 3 7 3 1 0 0 0 0 1 3 3 3 7 7 7 7 15 15 15 15 15 15 15 31 31 31 31 3 108 54 255 131 198 125 1 115 99 231 99] PROC TOUNGE() [0 255 127 63 31 15 7 3 1 0 128 192 224 240 248 252 254 255] PROC DRAGON() [66 165 153 126 24 0 0 0 0 0 0 24 126 153 165 66] PROC CHRS() [0 0 0 0 0 0 0 0 0 0 10 42 10 0 0 0 0 0 0 0 0 0 0 0 0 42 170 170 170 170 0 0 2 170 85 170 170 170 170 0 170 165 90 170 170 170 170 0 170 85 170 170 170 169 170 170 170 85 170 169 150 106 170 170 165 90 165 90 170 170 170 170 85 89 169 169 170 170 170 170 85 165 170 170 106 106 106 170 90 85 165 170 170 170 170 170 170 85 90 165 170 170 170 170 170 85 170 90 165 170 170 170 170 170 85 170 90 165 170 170 170 170 85 170 170 106 170 170 170 170 90 165 170 170 170 170 170 170 170 85 170 170 170 170 170 170 170 85 170 170 170 170 170 170 170 170 85 170 170 170 170 170 170 170 85 170 170 170 170 170 170 170 90 170 170 160 170 170 170 170 170 170 170 0 0 170 170 170 170 170 160 0 0 0 170 170 170 160 0 0 0 0 0 128 0 0 0 0 16 156 216 156 216 156 16 16 16 16 16 16 0 0 0 0 16 16 16 16 16 16 0 0 16 16 16 16 16 16 16 16] PROC FLIES() [3 12 48 192] PROC CLRS() [66 202 202 4 196 15 134 0 134] PROC PAUSE() SNDRST() POSITION(15,0) PRINT("* Paused *") POKE(764,255) WHILE PEEK(764)=255 DO OD POSITION(15,0) PRINT(" ") POKE(764,255) RETURN PROC SHOOT() T==+TN IF T=10 OR T=95 THEN TN=-TN FI IF T=50 THEN TN=0 FI POKE(53248,X+OX) POKE(1780,Y+OY) POKE(1772,T/5) IF TN<>0 THEN FOR M=0 TO 3 DO IF PEEK(53256+M)=1 THEN FX(M)=3000 SOUND(1,50,10,10) SCR==+1 POSITION(9,14) PRINTC(SCR) SOUND(1,0,0,0) FI OD IF PEEK(53263)=1 THEN SOUND(1,100,10,10) DY=0SEC==+30 SCR==+5 POKE(53251,0) POSITION(9,14) PRINTC(SCR) SOUND(1,0,0,0) FI FI POKE(53278,0) RETURN PROC PLACE() SHOOT() OX=-28 IF DIR=1 THEN OX=11 FI OY=23 IF PIC MOD 3=1 THEN OY=4 FI IF PIC MOD 3=2 THEN OY=25 FI RETURN PROC MOVE() POKE(16,112) POKE(53774,112) IF PEEK(764)=33 THEN PAUSE() FI POKE(53250,X) POKE(53249,X+8) POKE(1782,Y) POKE(1781,Y) IF STRIG(0)=0 AND TN=0 AND JMP=2 THEN TN=DIR T=50 PLACE() FI IF DY<4 THEN FOR DEL=1 TO 50 DO OD FI IF DX>3 AND DY>3 THEN DX==+1 IF DX>EX THEN DX==-2 FI DY==+1 IF DY>EY THEN DY==-2 FI IF EX=DX OR EY=DY THEN EX=RAND(240)+10 EY=RAND(70)+20 FI POKE(53251,DX) POKE(1783,DY) POKE(1775,(DX MOD 2)*8+1) FI IF SEC MOD 20=0 THEN DX=250+RAND(2)*10 DY=5 EX=RAND(255) EY=RAND(100)+50 FI IF SEC MOD 20=15 AND DX>3 AND DY>3 THEN EX=125+RAND(10) EY=0 FI IF TIME>58 AND SEC>0 THEN TIME=0 SEC==-1 POSITION(35,14) PRINTB(SEC) PRINT(" ") FI SHOOT() FLY==+1 IF FLY=4 THEN FLY=0 FI FX(FLY)==+FD(FLY)*FS IF FX(FLY)>2450 OR FD(FLY)=0 THEN FOR M=0 TO 1 DO U=PEEK(FLIES+FLY) D=FY(FLY) W=PEEK(DRB+768+D+M)-U POKE(DRB+768+D+M,W) OD FD(FLY)=1 IF RAND(10)>5 THEN FD(FLY)=-1 FI FX(FLY)=RAND(400) IF FD(FLY)=-1 THEN FX(FLY)=2150+RAND(400) FI FY(FLY)=50+RAND(100) FOR M=0 TO 1 DO U=PEEK(FLIES+FLY) D=FY(FLY) W=PEEK(DRB+768+D+M)+U POKE(DRB+768+D+M,W) OD FI D=FX(FLY)/10 POKE(53252+FLY,D) RETURN PROC ANIMATE() POKE(1773,PIC*32+1) POKE(1774,PIC*32+1) RETURN PROC SPLASH() T=50 TN=0 FOR I=0 TO 31 DO Y==+1 POKE(1785,32-I) POKE(1786,32-I) MOVE() OD X=0 MOVE() POKEC(548,$E462) I=SEC DO SEC==-1 POSITION(35,14) PRINTB(SEC) PRINT(" ") SOUND(0,200,10,10) FOR DEL=1 TO 5 DO MOVE() OD SOUND(0,0,0,0) FOR DEL=1 TO 5 DO MOVE() OD IF SEC=I-30 OR SEC=0 THEN EXIT FI OD POKEC(548,PLRVBI) PIC=1 X=50 DIR=1 JMP=2 FOR I=1 TO 32 DO Y==-1 POKE(1785,I) POKE(1786,I) ANIMATE() MOVE() OD PIC=0 RETURN PROC SETUP() DO GRAPHICS(0) POKE(559,0) POKE(752,1) DL=PEEKC(88) POKE(16,112) POKE(53774,112) POKEC(DLIST+4,DL) FOR I=0 TO 1 DO POKE(82,I*34+1) POSITION(I*34+1,5) PRINTE(": :") PRINTE("= :=") PRINTE("=:==") PRINTE("====") PRINTE("====") PRINTE("====") PRINTE("<=;<") OD POSITION(8,11) PRINT("!#$%&'()*+,-./0123456789") POSITION(2,14) PRINT("Score: 0") POSITION(29,14) PRINT("Time: 120") CH=(PEEK(106)-8)*256 MOVEBLOCK(CH,CHRS,1024) POKE(DLI+15,CH/256) MOVEBLOCK(1536,PLRVBI,160) PM=PEEK(106)-24 DRB=PM*256+1 POKE(1788,PM+4) POKE(53277,3) POKE(54279,PM) POKE(1771,PM-1) POKE(53256,3) POKE(623,17) MOVEBLOCK(DRB-256,TOUNGE,20) MOVEBLOCK(DRB,FROG1,192) MOVEBLOCK(DRB+256,FROG2,192) MOVEBLOCK(DRB+512,DRAGON,16) ZERO(DRB+768,1280) MOVEBLOCK(704,CLRS,9) T=50 SETBLOCK(1773,3,1) POKE(1784,1) POKE(1785,32) POKE(1786,32) POKE(1787,8) POKE(1280,0) POKEC(548,PLRVBI) POKEC(546,MYVBI) POKEC(560,DLIST) POKEC(512,DLI) POKE(54286,192) FOR I=0 TO 3 DO FX(I)=0 FY(I)=0 FD(I)=0 OD SEC=121 SCR=0 FS=5 FLY=0 DY=0 X=120 Y=160 DIR=1 PIC=0 TN=0 ANIMATE() MOVE() POSITION(8,3) PRINT("FROG") POSITION(13,4) PRINT("By Greg Knauss") POSITION(7,0) PRINT("(c)1987 Antic Publishing") POKE(559,62) WHILE PEEK(53279)<>6 AND STRIG(0)=1 DO OD POSITION(8,3) PRINT(" ") POSITION(13,4) PRINT(" ") POSITION(7,0) PRINT(" ") DO IF SEC=0 THEN EXIT FI JMP=0 S=STICK(0) IF S=7 THEN PIC=1 DIR=1 JMP=1 FI IF S=11 THEN PIC=4 DIR=-1 JMP=1 FI IF S=14 THEN JMP=2 FI IF S=13 THEN DIR=-DIR PIC=3-PIC FI IF X<80 OR X>167 THEN SPLASH() FI IF JMP=1 THEN ANIMATE() PLACE() FOR I=0 TO 9 DO X==+DIR Y==-1 MOVE() SOUND(0,Y-90,10,4) OD FOR I=0 TO 9 DO X==+DIR Y==+1 MOVE() SOUND(0,Y-90,10,4) OD PIC==-1 PLACE() SOUND(0,0,0,0) FI IF JMP=2 THEN PIC==+1 ANIMATE() PLACE() FOR I=0 TO 126 DO SOUND(0,Y,10,6-I/20) IF I MOD 9=0 THEN X==+DIR FI Y==-1 MOVE() OD PIC==+1 ANIMATE() PLACE() SOUND(0,0,0,0) FOR I=0 TO 126 DO IF I MOD 9=0 THEN X==+DIR FI Y==+1 MOVE() OD PIC==-2 PLACE() FI IF S<>15 AND X>79 AND X<168 THEN FOR I=1 TO 70 DO ANIMATE() MOVE() OD FI IF S=15 THEN ANIMATE() MOVE() FI FS=SCR/2+5 POKE(77,0) FOR DEL=1 TO 20 DO OD OD POSITION(5,3) PRINT("GAME OVER!") POSITION(9,14) PRINTB(SCR) FOR I=1 TO 500 DO MOVE() OD POSITION(10,0) PRINT("Press the trigger...") WHILE STRIG(0)=1 DO MOVE() OD OD
; REAR DOOR ; BY GREG KNAUSS ; (c)1987, ANTIC PUBLISHING BYTE IT,KEY,KILL,ALN,MEN,LVL BYTE ARRAY LOCK(3) CARD PM,I,J,WAIT,SCR PROC DL() Display List. [112 112 70 0 0 7 130 5 5 5 5 5 5 5 133 2 2 2 2 2 65 DL] PROC DLI() Display List interrupter. [72 238 0 5 173 0 5 141 10 212 201 2 240 17 169 0 141 9 212 169 42 141 23 208 169 15 141 24 208 104 64 169 224 141 9 212 169 15 141 23 208 169 0 141 24 208 141 0 5 104 64] PROC CHR() Character set for men, aliens, and airlocks. [85 85 85 85 85 85 85 85 0 0 0 0 0 0 0 0 85 85 85 85 84 84 84 84 85 85 85 0 0 63 63 63 85 85 85 0 0 252 252 252 85 85 85 85 21 21 21 21 85 85 84 80 64 64 0 0 84 80 0 0 0 0 0 0 0 0 0 0 0 21 31 31 0 0 0 0 0 84 100 68 21 5 0 0 0 0 0 0 85 85 21 5 1 1 0 0 0 0 0 0 64 64 64 106 0 0 0 16 16 16 16 160 21 28 19 21 0 0 0 0 84 196 52 84 0 0 0 0 0 0 0 4 4 4 4 10 0 0 0 0 1 1 1 169 106 106 90 85 85 85 85 85 111 159 160 80 64 64 64 64 250 250 0 0 0 0 1 1 175 175 0 0 0 0 64 64 249 246 10 5 1 1 1 1 169 169 165 85 85 85 85 85 85 105 170 170 170 170 170 170 85 85 149 170 170 170 170 170 64 0 0 0 0 0 0 0 1 1 2 10 10 10 10 10 64 64 64 160 160 160 160 160 1 0 0 0 0 0 0 0 85 86 170 170 170 170 170 170 89 170 170 170 170 170 170 170 170 170 170 170 170 170 170 170 170 175 191 191 170 170 170 170 0 255 255 255 170 170 170 170 10 10 250 250 170 170 170 170 160 160 175 175 170 170 170 170 0 255 255 255 170 170 170 170 170 250 254 254 170 170 170 170 85 85 85 85 85 85 87 87 85 85 85 85 85 255 255 239 85 85 85 85 85 253 255 239 85 85 85 87 87 95 95 95 87 119 253 253 253 255 255 255 251 255 255 247 247 127 127 102 191 255 253 125 125 247 247 103 85 117 253 255 255 255 255 255 85 85 85 85 85 213 213 213 95 95 95 95 95 87 87 87 247 247 215 215 247 245 245 253 221 255 255 255 255 255 255 255 223 255 255 255 255 253 253 253 127 127 95 95 127 127 127 255 213 213 213 213 213 85 85 85 87 85 85 85 85 85 85 85 213 221 253 85 87 87 95 95 255 127 127 255 255 253 245 245 253 245 245 253 255 255 127 127 95 221 253 85 85 85 213 213 85 105 170 170 170 170 170 170 85 85 149 170 170 170 170 170 95 127 191 191 255 255 255 255 245 245 234 234 234 170 170 170 127 127 95 175 175 171 171 171 213 245 245 250 254 254 254 254 85 86 170 170 170 170 170 170 89 170 170 170 170 170 170 170 171 191 186 171 170 170 170 170 255 255 254 250 170 170 170 170 170 234 170 170 170 170 170 170 171 175 170 170 170 170 170 170 255 255 254 191 170 170 170 170 170 250 186 170 170 170 170 170 255 255 255 255 255 255 255 255 0 0 0 0 255 255 255 255 255 255 255 255 0 0 0 0 0 0 0 0 15 63 255 255 0 0 0 0 240 252 255 255 255 255 63 15 0 0 0 0 255 255 252 240 0 0 0 0 0 48 240 48 48 48 252 0 0 252 12 252 192 192 252 0 0 252 12 60 12 12 252 0] PROC BULLET() Data for bullet picture. [0 60 126 126 255 255 255 255 255 255 255 255 126 126 60 0 0 0 60 126 126 255 255 255 255 255 255 126 126 60 0 0 0 0 0 60 126 126 255 255 255 255 126 126 60 0 0 0 0 0 0 0 60 126 126 126 126 126 60 0 0 0 0 0 0 0 0 0 0 60 126 126 126 126 60 0 0 0 0 0 0 0 0 0 0 0 24 60 60 24 0 0 0 0 0 0 0 0 0 0 0 0 0 60 60 0 0 0 0 0 0 0 0 0 0 0 0 0 0 24 24 0 0 0 0 0 0 0 170 200 73 90 114 52 155 60 109 152 61 116 82 90 145 137] PROC CLD() Close door. FOR J=0 TO 95 DO FOR I=0 TO 2 DO POKE(PM+1096+I*256+J,255) OD OD RETURN PROC OPD() Open door. FOR J=0 TO 96 DO FOR I=0 TO 2 DO POKE(PM+1192+I*256-J,0) OD OD RETURN PROC GOODGUY() Colonist picture. PRINTE("!!#$%&!!") PRINTE("!'()*+,!") PRINTE("!-./012!") PRINTE("!345678!") PRINTE("9:;<=>?@") PRINTE("ABCDEFGA") RETURN PROC GUYS() Routine to pick up who stands why. IT=RAND(3) IF LVL>6 THEN IT=RAND(4) FI FOR J=0 TO 2 DO POKE(82,4+J*12) POSITION(4+J*12,3) IF J=IT OR LVL=0 THEN IF LVL<3 THEN PRINTE("!!HIJ!!!") PRINTE("!KLMNOP!") PRINTE("!QRSTUV!") PRINTE("!WXYZ[!!") PRINTE("\]^_...") PRINTE("A......A") ELSEIF LVL>2 AND LVL<5 THEN PRINTE("!!#$%&!!") PRINTE("!'()*+,!") PRINTE("!-./012!") PRINTE("!345678!") PRINTE("9:;<=>?@") PRINTE("ABCDEFGA") ELSEIF LVL>4 THEN GOODGUY() I=RAND(3) POSITION(4+J*12,I*2+4) IF I=0 THEN PRINT(".!!#$%&!!") ELSEIF I=1 THEN PRINT("!345678!") ELSE PRINT("ABCDEFGA") FI FI ELSE GOODGUY() FI OD RETURN PROC SETUP() GRAPHICS(0) POKE(559,0) POKE(752,1) SETBLOCK(704,4,6) POKE(708,0) POKE(709,4) POKE(710,8) POKE(711,180) POKE(712,8) PM=PEEKC(88) POKEC(DL+3,PM) PM=(PEEK(106)-8)*256 ZERO(PM,1024) MOVEBLOCK(PM+8,CHR,1024) POKE(DLI+15,PM/256) PM=(PEEK(106)-24)*256 POKE(54279,PM/256) POKE(53277,3) ZERO(PM,2048) POKE(623,1) SETBLOCK(53256,3,3) FOR I=0 TO 2 DO POKE(53248+I,64+I*48) OD Draw screen. POSITION(26,0) PRINT("REARDOOR") POSITION(7,1) PRINT("(c) 1987 Antic Publishing") FOR J=0 TO 2 DO POKE(82,3+J*12) POSITION(3+J*12,2) PRINTE(" .........") PRINTE(" ") PRINTE(" ") PRINTE(" ") PRINTE(" ") PRINTE(" ") PRINTE(" ") PRINTE("..........") OD POSITION(2,3) PRINT(".") POSITION(14,3) PRINT(".") POSITION(26,3) PRINT(".") POKE(82,0) POSITION(0,10) PRINT(" U.S.S. Audacity ") PRINT("........................................") PRINT("| By Greg Knauss |") PRINT("| Score: Level: 1 |") PRINT("........................................") POSITION(9,13) PRINTC(SCR) RETURN PROC LOCKS() Routine to reset airlock open keys. POSITION(2,1) PRINT("Please enter ") PRINT("the key to open lock #") FOR I=0 TO 2 DO POSITION(37,1) PRINTC(I+1) POKE(764,255) WHILE PEEK(764)=255 DO OD LOCK(I)=PEEK(764) FOR J=0 TO 150 DO SOUND(0,20,10,15-J/10) OD OD SNDRST() POSITION(2,1) PRINT(" Copyright 1987 ") PRINT("Antic Publishing") RETURN PROC GAME() Main routine. SCR=0 LOCK(0)=31 LOCK(1)=30 LOCK(2)=26 DO SETUP() ALN=0 MEN=0 LVL=1 SCR=0 CLD() POKE(1280,0) POKEC(512,DLI) POKEC(560,DL) POKE(54286,192) POKE(559,62) Selections from title screen. WHILE PEEK(53279)<>6 DO IF PEEK(53279)=5 THEN LVL==+1 IF LVL=6 THEN LVL=1 FI POSITION(37,13) PRINTB(LVL) FOR I=1 TO 10000 DO OD FI IF PEEK(53279)=3 THEN LOCKS() FI OD POSITION(1,1) PRINT("Men on board: 0") PRINT(" Aliens on board: 0") POSITION(9,13) PRINT("0 ") POSITION(1,12) PRINT(" WARNING: Aliens ") PRINT("entering sector. ") Main loop. WAIT=200 DO GUYS() OPD() POKE(764,255) SOUND(0,WAIT,10,4) SOUND(1,WAIT+2,10,4) POKE(16,112) POKE(53774,112) FOR I=1 TO WAIT*100-LVL*250 DO KILL=5 See if key hit. If yes, open door. KEY=PEEK(764) IF KEY=LOCK(0) OR KEY=LOCK(1) OR KEY=LOCK(2) THEN IF KEY=LOCK(0) THEN J=76 KILL=0 ELSEIF KEY=LOCK(1) THEN J=124 KILL=1 ELSE KEY=LOCK(2) J=172 KILL=2 FI Shoot bullet. MOVEBLOCK(PM+1892,BULLET,16) POKE(53251,J) SNDRST() FOR I=1 TO 160 DO IF I MOD 18=0 THEN MOVEBLOCK(PM+1892, BULLET+(I/16)*16-16,16) FI SOUND(0,I+50,8,15-I/11) OD POKE(707,76) SNDRST() Hit alien? IF KILL=IT THEN FOR I=1 TO 100 DO SOUND(0,100-I,2,10-I/10) SOUND(1,I,2,10-I/10) OD MEN==+2 SCR==+LVL EXIT FI Hit colonist? IF KILL<>5 AND KILL<>IT THEN FOR I=1 TO 10000 DO OD IF IT<>3 THEN ALN==+1 MEN==+1 ELSE MEN==+2 FI SCR==-10*LVL IF SCR>5000 THEN SCR=0 FI EXIT FI FI OD End of main loop. Close the door. CLD() POKE(707,6) POKE(53251,0) ZERO(PM+1892,16) Do alien and men updates if no key pressed. IF KEY=255 AND IT<>3 THEN ALN==+1 MEN==+2 FI IF KEY=255 AND IT=3 THEN MEN==+3 FI Print stuff. POSITION(15,1) PRINTB(MEN) POSITION(38,1) PRINTB(ALN) POSITION(9,13) PRINTC(SCR) PRINT(" ") Game ends if 9 aliens are on board. IF ALN>8 THEN EXIT FI Speed the game up. Increase Level. IF WAIT>85-LVL*5 THEN WAIT==-5 ELSE WAIT=200 LVL==+1 SNDRST() SOUND(0,100,10,2) FOR I=1 TO 10000 DO OD SNDRST() POSITION(15,1) PRINT("0 ") SCR==+MEN MEN=0 POSITION(9,13) PRINTC(SCR) POSITION(1,12) PRINT(" Aliens repelled. ") PRINT("Press any key... ") FOR I=1 TO 10000 DO OD POKE(764,255) WHILE PEEK(764)=255 DO OD Back into the fray... POSITION(1,12) PRINT(" WARNING: ") PRINT(" ") POSITION(11,12) IF LVL=2 THEN PRINT("Aliens searching sector.") ELSEIF LVL=3 THEN PRINT("Aliens have located ship.") ELSEIF LVL=4 THEN pRINT("Alien platoon advancing.") ELSEIF LVL=5 THEN PRINT("Alien platoon entrenching.") ELSEIF LVL=6 THEN PRINT("Alien unit approaching.") ELSEIF LVL=7 THEN PRINT("Alien unit attacking.") ELSEIF LVL=8 THEN PRINT("Hull weakening.") ELSEIF LVL=9 THEN PRINT("Life support weakening.") ELSEIF LVL>9 THEN PRINT("Computer dead.") FI FI POSITION(37,13) PRINTB(LVL) OD Game's over. Make ship go boom! SOUND(0,WAIT-5,10,4) SOUND(1,WAIT-3,10,4) LVL=0 GUYS() OPD() Warning bell and whoosh sound. SNDRST() SOUND(1,200,8,2) FOR J=1 TO 6 DO SOUND(0,200,10,10) FOR I=1 TO 200 DO IT=RAND(4)+3 POKE(DL,IT*16) OD SOUND(0,0,0,0) FOR I=1 TO 200 DO IT=RAND(4)+3 POKE(DL,IT*16) OD OD FOR I=1 TO 600 DO IT=RAND(4)+3 POKE(DL,IT*16) SOUND(0,250-I/3,8,I/46+2) SOUND(1,252-I/3,2,I/46+2) OD Boom! GRAPHICS(19) POKE(DL,112) FOR I=1 TO 1500 DO J=RAND(16)*16 IT=J+(15-I/100) POKE(54282,0) POKE(53274,IT) FOR MEN=0 TO 2 DO ALN=RAND(255) POKE(53248+MEN,ALN) POKE(53266+MEN,256-IT) OD SOUND(0,100,8,15-I/100) SOUND(1,150,8,15-I/100) OD And back to the title page. OD