Alien Invasion Written by mjhayes@pcgeek.net This program was designed to use the graphics from the "Night Stalker" cartridge, but you can use any cartridge that has the familiar "Intellivision Man" graphics. First you must find the location of the sprite and substitute the values of M and N in the first program. I refer to the sprite as the Intellivision woman because the original hand-written copy I have comes complete with instructions and hand-drawn pics, and at the time I thought it would be cool to create a game with a female protagonist. Not that one can tell the difference otherwise from the Intellivision graphics. First, you are asked to enter a level from 0 to 100. Type the number of the level you want to start at, then press RTN. The following is the game introduction: Aliens are attacking your world. They have stun guns and boxes full of bombs. You must destroy all of the boxes before the aliens detonate the bombs. Use the keypad buttons 2, 4, 6, and 8 to move. The aliens freeze you with their stun gun before they drop boxes. Since you are frozen, you will not see the boxes as they fall; you will only see them when they hit the ground. After the effects of the stun gun wear off on you, you have approximately thirty seconds before the aliens' stun guns recharge enough to zap you again. During this time, step on as many boxes as you can. All the boxes that are the same color as the image of the rightmost box at the top of the screen will blow up when you are stunned again. Make a plan while you are stunned to determine the fastest way to step on all the boxes that are about to blow up. After you step on all of those boxes, don't wait for the next round of boxes to fall; step on as many as you can. This process will repeat until the images of boxes fill the entire top of the screen. After that, you advance to the next level. The game ends if any bombs detonate or if you walk out of the battlefield. If you beat the highest level, you will see the end sequence. If you don't like using the keypad to move, and would like to use the disk instead, first type the program as-is, then make the following changes: 245 H=0-H 250 IF[H=1]XP[0]=XP[0]+8 260 IF[H=1]D=D+1 270 IF[H=5]YP[0]=YP[0]-8 280 IF[H=5]D=D-20 290 IF[H=9]XP[0]=XP[0]-8 300 IF[H=9]D=D-1 310 IF[H=13]YP[0]=YP[0]+8 320 IF[H=13]D=D+20 10 FM(4)=6 ; All text will be displayed in yellow. 20 SET A$="ENTER LEVEL (0-100)" 30 SET B$="MOVE TO NEXT LEVEL." 40 SET C$="GAME OVER" ; Pre-define the longer text to save memory. 50 C=4 60 D=2 70 E=10 80 L=65535 90 M=2 100 N=16 110 P=600 120 V=15 ; The values of C, E, L, P, and V are used for sound. The values of D, M, and N are used for generating the sprite. 130 CALL GRAB ; Create the Intellivision woman. 140 CO(0)=6 ; Make her yellow. 150 SQ(0)=30 ; Give her animation. RUN 10 CLR 20 PUT A$ 30 INPU B 40 FOR C=0 TO 139 50 BK(C)=6 ; Draw the twilight sky. 60 NEXT C 70 XP(0)=80 80 YP(0)=80 ; Put the sprite into position. 90 VS(0)=1 ; Make her visible. 100 D=189 ; D contains the number of the background card in which the person is standing. 110 CALL ENVT ; Make a sound. 120 FOR G=1 TO 19 ; Main game loop{ 130 FOR J=-9 TO B ; Drop boxes.{ 140 K=RN(0)+140 ; Randomly determine where to drop the box. 150 F=RN(0) 160 IF(F>15)F=F-16 170 IF(F>15)GOTO 160 ; Randomly determine color of the box. 180 IF(F=5)F=4 190 IF(F=6)F=3 ; Make sure it isn't green or yellow. 200 BK(K)=F ; Draw the box. 210 NEXT J ; } 220 BK(G)=F ; Draw the image of a box at the top of the screen. 230 FOR I=1 TO 60 ; Time alloted to stomp boxes{ 240 CALL HAND ; Poll the left hand controller. 250 IF(H=2)YP(0)=YP(0)-8 ; Was 2 pressed? 260 IF(H=2)D=D-20 270 IF(H=4)XP(0)=XP(0)-8 ; Was 4 pressed? 280 IF(H=4)D=D-1 290 IF(H=6)XP(0)=XP(0)+8 ; Was 6 pressed? 300 IF(H=6)D=D+1 310 IF(H=8)YP(0)=YP(0)+8 ; Was 8 pressed? 320 IF(H=8)D=D+20 330 IF(D<140)GOTO 510 340 IF(D>239)GOTO 510 350 IF(XP(0)<8)GOTO 510 360 IF(XP(0)>160)GOTO 510 ; Did the player walk off the battlefield? 370 BK(D)=5 ; Stomp the box if there is one. 380 NEXT I ; } 390 FOR I=140 TO 239 ; Feature: the player is now "stunned."{ 400 IF(BK(I)=BK(G))GOTO 510 ; Do any detonating boxes remain? 410 NEXT I ; } 420 NEXT G ; } 430 IF(B>99)GOTO 560 ; Was that the last level? 440 B=B+1 450 PUT B$ 460 FOR I=0 TO 99 470 NEXT I ; Empty loop -- time delay. 480 VS(0)=-1 490 CLR 500 GOTO 120 ; Next level. 510 VS(0)=-1 ; Game over{ 520 PUT C$ 530 FOR I=0 TO 99 540 NEXT I ; Another time delay. 550 GOTO 10 ; Play again.} 560 VS(0)=-1 ; Endgame{ 570 YP(0)=56 580 XP(0)=80 ; Put player into position. 590 XS(0)=1 600 YS(0)=1 ; Zoom in player. 610 FOR I=0 TO 239 620 BK(I)=9 ; Draw midday sky. 630 IF(I>139)BK(I)=4 ; Draw grass. 640 NEXT I 650 VS(0)=1 660 PRIN "YOU WIN, BIG DEAL..." ; "You win, big deal..." appeared in a couple Lynx games, and I thought it was cute, so I threw it in here. 670 CALL HUSH ; Silence the spaceship noise. 680 N=60 690 GSUB 810 ; Play a note. 700 N=70 710 GSUB 810 720 N=69 730 GSUB 810 740 N=65 750 GSUB 810 760 N=67 770 GSUB 810 780 FOR I=0 TO 30 790 NEXT I ; Time delay -- the last note is held. 800 GOTO 670 ; Play the five-tone sequence forever!} 810 CALL NOTE ; Subroutine to play a note{ 820 CALL TONE ; Why two subprocedure calls are required I don't know. CALL NOTE updates internal values for the note, and CALL TONE plays the note itself. 830 FOR I=0 TO 4 840 NEXT I ; Time delay. 850 RET ; }