10 MEMORY 23999
20 ON BREAK GOSUB 560
30 CALL &6B78
31 CLS
32 MODE 0
33 ccd$="ALIENS":|PRINTAT,45,60,30,@ccd$
34 ccd$="ESCAPA DE LA NOSTROMO.BUSCA LAS PIEZAS":|PRINTAT,-25,70,5,@ccd$
35 cvd$="AL ENCONTRARLAS PASA ENTRE MEDIAS":|PRINTAT,-25,80,5,@cvd$
36 cud$="RIPLEY Q.A.O.P.ESP.PULSA INTRO":|PRINTAT,-25,90,5,@cud$
37 IF INKEY (18)=-1 THEN GOTO 37
38 CLS
40 DEFINT a-z
60 MODE 0:BORDER 0:INK 0,0
62 FOR y=0 TO 400 STEP 2
64 PLOT 0,y,10:DRAW 78,y    
66 PLOT 640-80,y,10:DRAW 640,y  
68 NEXT
69 FOR i=0 TO 31:|SETUPSP,i,0,0:NEXT:' reset sprites
89 |PRINTSPALL,0,0,1,0
90 |SETUPSP,31,9,16
100 |SETUPSP,31,0,1+32:dir=1:' printable y colisionador
105 |LOCATESP,31,85,35
106 |SETUPSP,31,7,32
110 cod=32:cor=32:|COLSPALL,@cor,@cod 
111 |COLSP, 34, 3, 2
112 vidas=50:d$="ENERGY"+STR$(vidas):|PRINTAT,10,180,18,@d$
120 score=0:c$="SCORE"+STR$(SCORE):|PRINTAT,10,180,40,@c$
121 cruz=0:ru$="MOTOR"+STR$(cruz):|PRINTAT,10,170,18,@ru$
122 seta=0:se$="TRAJE"+STR$(seta):|PRINTAT,10,170,40,@se$
123 build=1:bi$="EXPERT"+STR$(build):|PRINTAT,10,160,18,@bi$
125 |SETLIMITS,10,70,5,159
130 c=1:x=20:y=100:e=11:f=12
159 'rutina movimiento
160 c=c+1
170  IF INKEY(27)=0 THEN x=x+2:IF dir<>3 THEN dir=3:|SETUPSP,31,7,7: GOTO 190
180  IF INKEY(34)=0 THEN x=x-2:IF x<0 THEN x=0:ELSE IF dir<>4 THEN dir=4:|SETUPSP,31,7,6
190  IF INKEY(67)=0 THEN y=y+4:IF x=xa AND dir <> 1 THEN dir=1:|SETUPSP,31,7,4: GOTO 210
200  IF INKEY(69)=0 THEN y=y-4:IF y<0 THEN y=0:ELSE IF x=xa AND dir <>2 THEN dir=2:|SETUPSP,31,7,5:
210  IF xa=x AND ya=y THEN dir=0 ELSE |ANIMA,31
211 |MAP2SP,Y,X:|COLSPALL: IF cod<32 THEN x=xa:y=ya:|MAP2SP,y,x ELSE xa=x:ya=y
212 IF build=1 THEN GOTO 220
213 IF build>1 THEN GOSUB 1000 ELSE GOTO 220
220 'rutina disparo UP
230 IF C-LAST<4 THEN 300
240 IF INKEY(47) THEN 300
250 SP=23+SP MOD 6:LAST=c
260 |SETUPSP,SP,9,19:'sprite disparo
261 ENT -5,7,10,1,7,-10,1: SOUND 1,25,20,12,,5
270 |SETUPSP,SP,0,1+8+32
280 |SETUPSP,SP,6,-3,0
290 |LOCATESP,SP,87,38
300 |AUTOALL,1:|PRINTSPALL:|COLSPALL
341 |MAP2SP,Y,X
345 'rutina enemigos 
350 IF c AND 15 THEN 460: ' CICLO DE LANZAMIENTO DE ENEMIGOS CADA 16 c
360 ex=10+RND*50:r=RND*1
370 FOR i=1 TO 1
380 e=e+1: IF e=23 THEN e=11 
390 |SETUPSP,e,9,17
400 |SETUPSP,e,0,128+8+3
410 |SETUPSP,e,15,r
420 |LOCATESP,e,-80,ex:|ROUTESP,e,i*6
430 NEXT
431 IF c AND 63 THEN 460: ' CICLO DE LANZAMIENTO DE ENEMIGOS CADA 16 c
432 fx=10+RND*50:r=RND*1
433 FOR i=1 TO 1
434 f=f+1: IF f=23 THEN f=11 
435 |SETUPSP,f,9,18
436 |SETUPSP,f,0,128+8+3
437 |SETUPSP,f,15,r
438 |LOCATESP,f,-80,fx:|ROUTESP,f,i*8
439 NEXT
450 |PRINTSPALL
459 REM rutina coleccionables
460 IF cor<32 THEN GOSUB 480 
461 IF ((Y>600) AND (Y<699)) AND ((x>220) AND (x<260))THEN cruz=1:ru$=STR$(cruz):|PRINTAT,22,170,28,@ru$:ENT 1,10,-100,3:
462 IF ((Y>700) AND (Y<800)) AND ((x>320) AND (x<360))THEN seta=1:se$=STR$(seta):|PRINTAT,22,170,50,@se$:ENT 1,10,-100,3:
463 IF SETA>1 THEN SETA=1:IF CRUZ >1 THEN CRUZ=1
464 IF seta AND cruz = 1 THEN GOTO 580
470 GOTO 160 
480 ' rutina colision
481 IF cor> 30 THEN GOSUB 699
490 BORDER 7: CALL &BD19:BORDER 0
500 IF cor=31 THEN 550 ELSE score=score+10:c$=STR$(score):ENT 1,10, 100,3: SOUND 1,638,30,15,0,1:|PRINTAT,30,180,50,@c$:
510 |SETUPSP,cor,7,3:|SETUPSP,cor,0,4+1
520 |SETUPSP,cod,7,3:|SETUPSP,cod,0,4+1
521 IF (score>20) AND (score<40)THEN GOTO 530
522 RETURN
530 ' rutina EXPERIENCIA JUGADOR
531 build=build+1:bi$=STR$(build):ENT 1,10,-100,3:SOUND 1,638,30,15,0,1::|PRINTAT,22,160,30,@bi$
532 IF build>1 THEN GOSUB 1000 ELSE GOTO 220
533 FOR z=1 TO 1
534 vidas=vidas+20:NEXT
535 RETURN
550 '
560 CLS
570 cad$="GAME OVER. PULSA INTRO":|PRINTAT,10,50,20,@cad$
571 IF INKEY (18)=-1 THEN GOTO 571
580 ENT 1,10,-100,3:SOUND 1,638,30,15,0,1:END
698 ' rutina contador vida
699 vidas=vidas-5:d$=STR$(vidas):BORDER 7: CALL &BD19:BORDER 0:ENT 3,100,5,3:SOUND 1,142,100,15,0,3:|PRINTAT,22,180,30,@d$:IF vidas>1 THEN 160 ELSE 550
700 RETURN
1000 'rutina disparo build 2
1010 IF C-LAST<4 THEN 1090
1020 IF INKEY(47) THEN 1090
1030 IF C-LAST<4 THEN 1160
1040 IF INKEY(47) THEN 1160
1050 FRONT=23+FRONT MOD 6:LAST=c
1060 |SETUPSP,FRONT,9,21:'sprite disparo
1070 ENT -5,7,10,1,7,-10,1: SOUND 1,25,20,12,,5
1080 |SETUPSP,FRONT,0,1+8+32
1090 IF dir<3 THEN 1120
1100 IF dir=3 THEN vdx=1:vdy=0:GOTO 1140
1110 vdx=-1:vdy=0:GOTO 1140:'dir 4
1120 IF dir=1 THEN vdx=0:vdy=-3:GOTO 1140
1130 vdx=0:vdy=3
1140 |SETUPSP,FRONT,5,vdy,vdx 
1150 |LOCATESP,FRONT,87,38
1160 |AUTOALL,1:|PRINTSPALL:|COLSPALL
1170 RETURN