-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathNOVASTAR.BAS
629 lines (629 loc) · 18 KB
/
NOVASTAR.BAS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
10 MODE 8
20 :REM PRE-RELEASE
30 REM ****************************************
40 REM * NOVA STAR by Nicholas Pratt *
50 REM * written April 23 on the Agon Light 2 *
60 REM * greets to the community *
70 REM * and thanks for the hard work of the *
80 REM * AGON LIGHT DEVELOPMENT TEAM *
90 REM * CONTACT : [email protected] *
100 REM ****************************************
110 :
120 VDU 23,1,0 : REM DISABLE TEXT CURSOR
130 :
140 REM UNCHANGING VARIABLES *******************
150 :
160 NOBG% = 12 : REM N OF BAD GUYS
170 PLAYASN% = 13 : REM PLAYA SPRITE NUMBER
180 SKULLSPITSN% = 17
190 SPACESKULLSN% = 16
200 XPLOSIONSN% = 18
210 :
220 REM ARRAY SETUP ****************************
230 :
240 :REM SCOREB VALUES SCORE,LIVES,LEVEL,OLDLEVEL
250 DIM SCOREB%(3)
260 : REM SKULL SPRITE,ON,ACTION,X,Y
270 DIM SKULL%(1,4)
280 : REM SKULLSPIT O/OF,SPEED,X,Y
290 DIM SKULLSP%(3)
300 : REM SPRITE NUMBER, ONOFF, XPOS, YPOS
310 DIM AMSS%(2,3) : REM ALIEN MISSILE
320 DIM MSS%(2,3) : REM PLAYA MISSILE
330 : REM ARRAY FOR ALIENS-SPRITEN,ON,STATE,X,Y
340 DIM JELLY%(NOBG%-1,4)
350 :
360 REM ****************************************
370 :
380 REFIRE% = 0 :
390 OLDREFIRE% = 0 : ADECENT% = 1
400 PLAYAX% = 160 : REM PLAYA START POS
410 :
420 :
430 PROC_SETUPMISSILES
440 :
450 :
460 FOR I% = 0 TO NOBG%-1
470 JELLY%(I%,0) = I%
480 JELLY%(I%,1) = 1 : REM SET JELLYS TO ON
490 NEXT
500 :
510 :
520 PROC_DRAWSCREEN
530 PROC_INITSCOREBOARD
540 PROC_INITSKULL
550 PROC_DRAWSPACESKULL
560 PROC_DRAWSKULLSPIT
570 PROC_DRAWALIEN
580 PROC_DRAWPLAYA
590 PROC_DRAWEXPLOSION
600 VDU 23,27,7,19 : REM ACTIVATE NUMBER OF SPRITES
610 :
620 PROC_STARTSCREEN
630 PROC_NEWLEVEL
640 :
650 :
660 PROC_DRAWSCREEN
670 PROC_DRAWSTARS
680 :
690 :
700 : REM GAME LOOP ********************************
710 :
720 *FX 19
730 :
740 VDU 23,27,4,PLAYASN%-1
750 VDU 23,27,13,PLAYAX%;130;
760 :
770 PROC_MOVESKULL
780 :
790 PROC_YOURMOVE
800 :
810 PROC_DETECTHIT
820 IF SKULLSP%(0)= 1 THEN PROC_SKULLSPITB
830 :
840 D% = 0
850 :
860 : REM IF JELLY OFF SKIP MOVE
870 FOR I% = 0 TO NOBG%-1
880 IF JELLY%(I%,1) = 3 THEN JELLY%(I%,4)=JELLY%(I%,4)+2
890 IF JELLY%(I%,1) = 0 THEN D% = D%+1
900 IF JELLY%(I%,1)>= 1 THEN PROC_MOVEJELLY(I%)
910 NEXT
920 IF D% = NOBG% THEN SCOREB%(2) = SCOREB%(2) + 1
930 IF SCOREB%(2) <>SCOREB%(3) THEN PROC_NEWLEVEL
940 :
950 :
960 VDU 23,27,15 :REM REFRESH SPRITES IN GPU
970 :
980 GOTO 720
990 END
1000 :
1010 : REM END GAME LOOP ****************************
1020 :
1030 :
1040 DEF PROC_MOVEJELLY(K%) :
1050 :
1060 VDU 23,27,4,K%
1070 VDU 23,27,13,JELLY%(K%,3);JELLY%(K%,4);
1080 JELLY%(K%,3) = JELLY%(K%,3)+JELLY%(K%,2)
1090 IF JELLY%(K%,3) < 110 THEN PROC_HEADRIGHT(K%)
1100 IF JELLY%(K%,3) > 230 THEN PROC_HEADLEFT(K%)
1110 IF JELLY%(K%,4) > 130 THEN PROC_ALIENBASE
1120 ENDPROC
1130 :
1140 DEF PROC_DRAWSTARS
1150 :
1160 FOR I% = 1 TO 57
1170 GCOL 0,RND(7)
1180 VDU 25,69,RND(595)+402;RND(595)+302;
1190 NEXT
1200 ENDPROC
1210 :
1220 DEF PROC_INITSCOREBOARD
1230 :
1240 SCOREB%(0)=0 : REM SCORE
1250 SCOREB%(1)=3 : REM LIVES
1260 SCOREB%(2)=1 : REM LEVEL
1270 SCOREB%(3)=1 : REM OLEVEL
1280 ENDPROC
1290 :
1300 DEF PROC_INITSKULL
1310 :
1320 SKULL%(0,0) = PLAYASN%+3
1330 SKULL%(0,1) = 1
1340 SKULL%(0,2) = 1
1350 SKULL%(0,3) = 170
1360 SKULL%(0,4) = 28
1370 ENDPROC
1380 :
1390 :
1400 DEF PROC_SCOREBOARD
1410 :
1420 VDU 31,8,4 : PRINT " "
1430 VDU 31,3,4 : PRINT "SCORE ";SCOREB%(0)
1440 VDU 31,3,6 : PRINT "LIVES ";SCOREB%(1)
1445 VDU 31,8,8 : PRINT " "
1450 VDU 31,3,8 : PRINT "LEVEL ";SCOREB%(2)
1460 ENDPROC
1470 :
1480 DEF PROC_DRAWSCREEN
1490 :
1500 : REM N
1510 MOVE 180,905 : GCOL 0,2 : DRAW 240,1010
1520 DRAW 280,1010 : DRAW 280,970 : DRAW 300,1010
1530 DRAW 340,1010 : DRAW 300,905 : DRAW 260,905
1540 DRAW 260,960 : DRAW 240,905 : DRAW 180,905
1550 : REM O
1560 MOVE 320,905 : DRAW 360,1010 : DRAW 420,1010
1570 DRAW 400,905 : DRAW 320,905 : MOVE 360,940
1590 DRAW 380,980 : DRAW 390,980 : DRAW 380,940 : DRAW 360,940
1600 : REM V
1610 MOVE 440,905 : DRAW 430,1010 : DRAW 460,1010
1620 DRAW 460,960 : DRAW 500,1010 : DRAW 520,1010
1630 DRAW 480,905 : DRAW 440,905
1640 : REM A
1650 MOVE 500,905 : DRAW 540,1010 : DRAW 580,1010
1660 DRAW 600,905 : DRAW 560,905 : DRAW 560,920
1670 DRAW 540,920 : DRAW 540,905 : DRAW 500,905
1680 MOVE 540,960 : DRAW 560,980 : DRAW 560,960 : DRAW 540,960
1690 : REM S
1700 MOVE 720,905 : DRAW 740,930 : DRAW 780,930
1710 DRAW 720,960 : DRAW 730,1010 : DRAW 780,1010
1720 DRAW 800,980 : DRAW 740,980 : DRAW 800,950
1730 DRAW 820,905 : DRAW 720,905
1740 : REM T
1750 MOVE 810,1010 : DRAW 890,1010 : DRAW 900,970
1760 DRAW 870,970: DRAW 880,905 : DRAW 840,905
1770 DRAW 840,970 : DRAW 820,970 : DRAW 810,1010
1780 : REM A
1790 MOVE 920,905 : DRAW 920,1010 : DRAW 960,1010
1800 DRAW 1000,905 : DRAW 960,905 : DRAW 960,920
1810 DRAW 940,920 : DRAW 940,905 : DRAW 920,905 : MOVE 940,960
1820 DRAW 940,980 : DRAW 960,960 : DRAW 940,960
1830 : REM R
1840 MOVE 1020,905 : DRAW 980,1010 : DRAW 1050,1010
1850 DRAW 1080,960 : DRAW 1040,960 : DRAW 1140,905
1860 DRAW 1060,905 : DRAW 1030,940 : DRAW 1040,905
1870 DRAW 1020,905 : MOVE 1020,980 : DRAW 1020,995
1880 DRAW 1040,980 : DRAW 1020,980
1890 GCOL 0,7 : REM STAR
1900 MOVE 590,970 : DRAW 650,980 : DRAW 660,1020
1910 DRAW 670,980 : DRAW 720,970 : DRAW 670,960
1920 DRAW 660,890 : DRAW 650,960 : DRAW 600,970
1930 :
1940 : REM DRAW SQUARE
1950 :
1960 MOVE 400,300
1970 DRAW 1000,300 : DRAW 1000,900
1980 DRAW 400,900 : DRAW 400,300
1990 : REM GROUND
2000 MOVE 0,500 : DRAW 400,500 : MOVE 1000,500 : DRAW 1280,500
2010 MOVE 0,170 : DRAW 300,500 : MOVE 1280,170 : DRAW 1000,480
2020 MOVE 360,0 : DRAW 450,300 : MOVE 850,0 : DRAW 800,300
2030 MOVE 0,400 : DRAW 400,400 : MOVE 1000,400 : DRAW 1280,400
2040 MOVE 0,100 : DRAW 1280,100
2050 ENDPROC
2060 :
2070 :
2080 DEF PROC_HEADRIGHT(L%)
2090 :
2100 H% = JELLY%(L%,4)
2110 W% = JELLY%(L%,3)
2120 FOR T% = 0 TO NOBG%-1
2130 IF JELLY%(T%,4) = H% THEN JELLY%(T%,2)=1+SCOREB%(2)
2140 IF JELLY%(T%,4) = H% THEN JELLY%(T%,4)=H%+ADECENT%
2150 IF JELLY%(T%,3) < 110 THEN JELLY%(T%,3)=111
2160 NEXT
2170 ENDPROC
2180 :
2190 DEF PROC_HEADLEFT(L%)
2200 :
2210 H% = JELLY%(L%,4)
2220 W% = JELLY%(L%,3)
2230 FOR T%= 0 TO NOBG%-1
2240 IF JELLY%(T%,4)=H% THEN JELLY%(T%,2)=-1+(0-SCOREB%(2))
2250 IF JELLY%(T%,4)=H% THEN JELLY%(T%,4)=H%+ADECENT%
2260 IF JELLY%(T%,3) > 230 THEN JELLY%(T%,3) = 229
2270 NEXT
2280 ENDPROC
2290 :
2300 DEF PROC_DRAWPLAYA
2310 :
2320 : REM NEW BITMAP FOR PLAYA
2330 :
2340 RESTORE 5880
2350 VDU 23,27,0,1
2360 VDU 23,27,1,9;7;
2370 FOR I% = 1 TO 63
2380 READ B%
2390 IF B%=1 THEN VDU 255,0,255,255
2400 IF B%=2 THEN VDU 0,255,255,255
2410 IF B%=0 OR B%=255 THEN VDU B%,B%,B%,B%
2420 NEXT
2430 VDU 23,27,4,PLAYASN%-1 :REM SELECT SPRITE
2440 VDU 23,27,5 : REM CLEAR FRAME
2450 VDU 23,27,6,1 :REM ADD BITMAP N
2460 REM VDU 23,27,11 : REM SHOW CURRENT SPRITE
2470 ENDPROC
2480 :
2490 DEF PROC_DRAWEXPLOSION
2500 :
2510 VDU 23,27,0,5
2520 VDU 23,27,1,12;12;
2530 RESTORE 6170
2540 FOR I% = 1 TO 144
2550 READ B%
2560 IF B%=0 THEN VDU B%,B%,B%,B%
2570 IF B%=1 THEN VDU 255,0,0,255
2580 IF B%=2 THEN VDU 255,255,255,255
2590 IF B%=3 THEN VDU 255,255,0,255
2600 IF B%=4 THEN VDU 0,0,255,255
2610 NEXT
2620 VDU 23,27,4,XPLOSIONSN%,23,27,5,23,27,6,5
2630 ENDPROC
2640 :
2650 DEF PROC_MOVESKULL
2660 :
2670 VDU 23,27,4,SPACESKULLSN%
2680 VDU 23,27,13,SKULL%(0,3);SKULL%(0,4);
2690 IF SKULL%(0,3)>=229 THEN SKULL%(0,2) = -6
2700 IF SKULL%(0,3)<= 110 THEN SKULL%(0,2) = 6
2710 SKULL%(0,3) = SKULL%(0,3) + SKULL%(0,2)
2720 Z% = PLAYAX% - SKULL%(0,3)
2730 IF Z% < 3 AND Z% > -3 THEN PROC_SKULLSPITA
2740 ENDPROC
2750 :
2760 DEF PROC_SKULLSPITA
2770 :
2780 IF SKULLSP%(0) = 0 THEN SKULLSP%(2) = SKULL%(0,3)
2790 IF SKULLSP%(0) = 0 THEN SKULLSP%(3) = 35
2800 SKULLSP%(0) = 1
2810 ENDPROC
2820 :
2830 DEF PROC_SKULLSPITB
2840 :
2850 E%=0
2860 VDU 23,27,4,SKULLSPITSN%
2870 VDU 23,27,11
2880 VDU 23,27,13,SKULLSP%(2);SKULLSP%(3);
2890 SKULLSP%(3) = SKULLSP%(3) + 8
2900 D% = SKULLSP%(2) - PLAYAX%
2910 IF D% < 8 AND D% > -8 THEN E% =1
2920 IF SKULLSP%(3) > 125 AND E%=1 THEN PROC_ALIENBASE
2930 IF SKULLSP%(3) > 137 THEN VDU 23,27,12
2940 IF SKULLSP%(3) > 137 THEN SKULLSP%(0) = 0
2950 ENDPROC
2960 :
2970 DEF PROC_YOURMOVE
2980 :
2990 PM% = INKEY(10) : REM PLAYAMOVE
3000 IF PM% = 8 THEN PLAYAX% = PLAYAX% - 10
3010 IF PM% = 21 THEN PLAYAX% = PLAYAX% + 10
3020 IF PLAYAX% > 228 THEN PLAYAX% = 228
3030 IF PLAYAX% < 110 THEN PLAYAX% = 110
3040 IF PM% = 32 THEN PROC_MISSFIRE
3050 FOR I%= 0 TO 2
3060 VDU 23,27,4,MSS%(I%,0)
3070 IF MSS%(I%,1) = 3 THEN MSS%(I%,3) = MSS%(I%,3) -5
3080 VDU 23,27,13,MSS%(I%,2);MSS%(I%,3);
3090 IF MSS%(I%,3) < 40 THEN VDU 23,27,12
3100 IF MSS%(I%,3) < 40 THEN MSS%(I%,1) = 0
3110 IF MSS%(I%,3) < 40 THEN SCOREB%(0) = SCOREB%(0)-2
3120 NEXT
3130 REFIRE% = REFIRE% - 2
3140 ENDPROC
3150 :
3160 DEF PROC_DRAWALIEN
3170 :
3180 RESTORE 5790
3190 VDU 23,27,0,0 :REM SELECT BITMAP 0
3200 VDU 23,27,1,8;8;
3210 FOR I% = 1 TO 64
3220 READ B%
3230 IF B% = 1 THEN VDU 0,255,0,255
3240 IF B% = 2 THEN VDU 0,0,255,255
3250 IF B% = 0 OR B% = 255 VDU B%,B%,B%,B%
3260 NEXT I%
3270 :
3280 : REM POPULATE ALIEN BITMAP
3290 :
3300 FOR I%=0 TO NOBG%-1
3310 VDU 23,27,4,I% :REM SELECT SPRITE
3320 VDU 23,27,5 : REM CLEAR FRAME
3330 VDU 23,27,6,0 :REM ADD BITMAP N
3340 VDU 23,27,11
3350 NEXT
3360 ENDPROC
3370 :
3380 DEF PROC_MISSFIRE
3390 :
3400 SOUND 0,-3,100,3
3410 FOR I% = 0 TO 2
3420 IF MSS%(I%,1) = 0 THEN MSS%(I%,3) = 130
3430 IF MSS%(I%,1) = 0 AND REFIRE% <= 0 THEN MSS%(I%,1)= 1
3440 IF MSS%(I%,1) = 1 THEN MSS%(I%,2) = PLAYAX%+6
3450 IF MSS%(I%,1) = 1 THEN REFIRE%=5
3460 IF MSS%(I%,1) = 1 THEN MSS%(I%,1) = 3
3470 IF MSS%(I%,1) = 3 THEN VDU 23,27,4,MSS%(I%,0),23,27,11
3480 NEXT
3490 ENDPROC
3500 :
3510 DEF PROC_DETECTHIT :
3520 :
3530 FOR I% = 0 TO 2
3540 FOR J% = 0 TO NOBG%-1
3550 R%=1 : S%=1
3560 Y% = MSS%(I%,3) - JELLY%(J%,4)
3570 X% = MSS%(I%,2) - JELLY%(J%,3)
3580 IF Y% > -8 AND Y% < 8 THEN R%=0
3590 IF X% > -8 AND X% < 8 THEN S%=0
3600 IF JELLY%(J%,1)=0 THEN R%=1
3610 IF R% = 0 AND S% = 0 THEN PROC_SPLODY(J%,I%)
3620 NEXT
3630 NEXT
3640 ENDPROC
3650 :
3660 DEF PROC_SPLODY(F%,P%)
3670 :
3680 REM OSCORE% = SCORE%
3690 SCOREB%(0) = SCOREB%(0) + 10
3700 SOUND 1,-5,24,2
3710 JELLY%(F%,1) = 0
3720 VDU 23,27,4,JELLY%(F%,0)
3730 VDU 23,27,12
3740 MSS%(P%,1) = 0
3750 VDU 23,27,4,MSS%(P%,0),23,27,12
3760 MSS%(P%,3) = 240
3770 ENDPROC
3780 :
3790 DEF PROC_NEWLEVEL
3800 :
3810 SCOREB%(3) = SCOREB%(2)
3820 IF SCOREB%(2) = 3 THEN ADECENT% = 2
3830 IF SCOREB%(2) = 5 THEN ADECENT% = 5
3840 IF SCOREB%(2) = 7 THEN ADECENT% = 6
3850 IF SCOREB%(2) = 9 THEN ADECENT% = 7
3860 IF SCOREB%(2) = 10 THEN ADECENT% = 8
3870 IF SCOREB%(2) = 12 THEN ADECENT% = 9
3880 PROC_SCOREBOARD
3890 PROC_INITSKULL
3900 SOUND 0,-2,120,1
3910 SOUND 0,-5,100,2
3920 SOUND 0,-5,40,4
3930 SOUND 0,-7,36,1
3940 SOUND 0,-5,40,1
3950 FOR Z%=0 TO 2
3960 MSS%(Z%,1) = 0
3970 VDU 23,27,4,MSS%(Z%,0),23,27,12
3980 MSS%(Z%,3) = 240
3990 NEXT
4000 VDU 23,27,4,SKULLSPITSN%,23,27,12
4010 SKULLSP%(0) = 0
4020 RESTORE 5650
4030 FOR Z% = 0 TO NOBG%-1
4040 READ B%
4050 JELLY%(Z%,3) = B%
4060 NEXT
4070 FOR Z% = 0 TO NOBG%-1
4080 READ B%
4090 JELLY%(Z%,4) = B%
4100 NEXT
4110 PROC_TURNONSPRITES
4120 FOR Z%=0 TO NOBG%-1
4130 READ B%
4140 JELLY%(Z%,2) = B%
4150 R%=RND(38-SCOREB%(2))
4160 VDU 23,27,4,Z%,23,27,11 : REM SHOW CURRENT SPRITE
4170 VDU 23,27,13,JELLY%(Z%,3);JELLY%(Z%,4);
4180 JELLY%(Z%,1) = 1
4190 IF R%=24 THEN JELLY%(Z%,1) = 3
4200 NEXT
4210 F%=0
4220 FOR Z% = 0 TO NOBG%-1
4230 IF JELLY%(Z%,2)<0 THEN F% = -1
4240 IF JELLY%(Z%,2)>0 THEN F% = 1
4250 JELLY%(Z%,2) = JELLY%(Z%,2) + F%
4260 NEXT
4270 ENDPROC
4280 :
4290 DEF PROC_SETUPMISSILES
4300 :
4310 : REM ASSIGN SPRITE NUMBER FOR MISSILES
4320 :
4330 FOR I%= 0 TO 2
4340 REM AMSS%(I%,0) = PLAYASN%+I%
4350 MSS%(I%,0) = PLAYASN%+I%
4360 NEXT
4370 :
4380 : REM BITMAP FOR MISSILES
4390 :
4400 VDU 23,27,0,2
4410 VDU 23,27,1,3;3;0,0,0,0,255,255,255,255,0,0,0,0
4420 VDU 255,255,255,255,255,0,0,255,255,255,255,255
4430 VDU 0,0,0,0,255,255,255,255,0,0,0,0
4440 FOR I% = 0 TO 2
4450 REM VDU 23,27,4,AMSS%(I%,0)
4460 REM VDU 23,27,5
4470 REM VDU 23,27,6,2
4480 VDU 23,27,4,MSS%(I%,0)
4490 VDU 23,27,5
4500 VDU 23,27,6,2
4510 NEXT
4520 ENDPROC
4530 :
4540 DEF PROC_ALIENBASE
4550 :
4560 VDU 23,27,4,PLAYASN%,23,27,12
4570 VDU 23,27,4,XPLOSIONSN%
4580 VDU 23,27,13,PLAYAX%;127;
4590 VDU 23,27,11
4600 FOR I% = 1 TO 100
4610 S% = INKEY(1)
4620 VDU 23,27,15
4630 NEXT
4640 VDU 23,27,12
4650 SKULLSP%(3) = 30
4660 SCOREB%(1)=SCOREB%(1)-1
4670 IF SCOREB%(1)=0 THEN PROC_GAMEOVER
4680 PROC_NEWLEVEL
4690 ENDPROC
4700 :
4710 DEF PROC_STARTSCREEN
4720 :
4730 A% = -1
4740 PROC_DRAWSTARS
4750 FOR I%= 0 TO NOBG%-1
4760 VDU 23,27,4,I%
4770 VDU 23,27,12
4780 NEXT
4790 VDU 23,27,4,SKULL%(0,0)
4800 VDU 23,27,13,170;23;
4810 VDU 23,27,11
4820 VDU 31,14,5 : PRINT" You exit warp"
4830 VDU 31,14,6 : PRINT"and strike gold!"
4840 VDU 31,14,7 : PRINT" SPACE JELLYS!"
4850 VDU 31,14,8 : PRINT" ATTACK!"
4860 VDU 31,14,9,: PRINT" You terrifying"
4870 VDU 31,14,10: PRINT" space bastard!"
4880 VDU 31,16,12
4890 PRINT"PRESS SPACE "
4900 VDU 31,17,13 :PRINT" TO START "
4910 REPEAT
4920 B% = SKULL%(0,3) : C% = SKULL%(0,4)
4930 A% = INKEY(2)
4940 IF B%<230 AND C%<29 THEN SKULL%(0,3) = B%+1
4950 IF B%>=230 AND C%<124 THEN SKULL%(0,4) = C%+1
4960 IF B%>110 AND C%>=124 THEN SKULL%(0,3) = B%-1
4970 IF B%<=111 AND C%>28 THEN SKULL%(0,4) = C%-1
4980 VDU 23,27,13,SKULL%(0,3);SKULL%(0,4);
4990 VDU 23,27,15
5000 UNTIL A%=32
5010 REM VDU 23,27,12
5015 CLG
5020 GCOL 0,0
5030 MOVE 405,305 : MOVE 405,855 : PLOT 80,955,855
5040 MOVE 405,305 : MOVE 955,305 : PLOT 80,955,855
5050 PROC_SCOREBOARD
5060 PROC_DRAWSCREEN
5070 ENDPROC
5080 :
5090 DEF PROC_GAMEOVER
5100 :
5110 PROC_SCOREBOARD
5120 VDU 31,17,13
5130 PRINT " GAME OVER "
5140 A% = INKEY(500)
5150 GOTO 380
5160 ENDPROC
5170 :
5180 DEF PROC_DRAWSPACESKULL
5190 :
5200 RESTORE 5960
5210 REMN VDU 23,27,0,3
5220 VDU 23,27,1,13;10;
5230 FOR I% = 1 TO 130
5240 READ B%
5250 IF B%=1 THEN VDU 255,0,0,255 ELSE VDU B%,B%,B%,B%
5260 NEXT
5270 VDU 23,27,4,SPACESKULLSN%
5280 VDU 23,27,5
5290 VDU 23,27,6,3
5300 VDU 23,27,13,170;23;
5310 VDU 23,27,11
5320 ENDPROC
5330 :
5340 DEF PROC_DRAWSKULLSPIT
5350 :
5360 RESTORE 6070
5370 VDU 23,27,0,4
5380 VDU 23,27,1,4;9;
5390 FOR I% = 1 TO 36
5400 READ B%
5410 IF B%=0 THEN VDU 0,0,0,0
5420 IF B%=1 THEN VDU 255,255,255,255
5430 IF B%=2 THEN VDU 255,255,0,255
5440 IF B%=3 THEN VDU 255,0,0,255
5450 NEXT
5460 VDU 23,27,4,SKULLSPITSN%
5470 VDU 23,27,5,23,27,6,4
5480 ENDPROC
5490 :
5500 DEF PROC_TURNONSPRITES
5510 :
5520 FOR I%= 0 TO NOBG%-1
5530 VDU 23,27,4,I%
5540 VDU 23,27,11
5550 NEXT
5560 VDU 23,27,4,PLAYASN%-1
5570 VDU 23,27,11
5580 VDU 23,27,15
5590 ENDPROC
5600 :
5610 : REM DATA BLOCK
5620 :
5630 :
5640 : REM ALIEN START X
5650 DATA 130,145,160,175,190,205
5660 DATA 130,145,160,175,190,205
5670 REM DATA 215,237,259,281,303,325
5680 REM DATA 217,239,261,283,305,327
5690 : REM ALIEN START Y
5700 DATA 40,40,40,40,40,40
5710 DATA 55,55,55,55,55,55
5720 REM DATA 90,90,90,90,90,90
5730 REM DATA 105,105,105,105,105,105
5740 : REM ALIEN MOVEMENT ALIENS
5750 DATA 1,1,1,1,1,1,-1,-1,-1,-1,-1,-1
5760 REM DATA 1,1,1,1,1,1
5770 REM DATA -1,-1,-1,-1,-1,-1
5780 : REM JELLY DATA
5790 DATA 0,0,0,255,255,0,0,0
5800 DATA 0,0,255,2,2,255,0,0
5810 DATA 0,255,1,2,1,2,255,0
5820 DATA 255,2,2,2,2,2,2,255
5830 DATA 0,0,255,0,255,0,255,0
5840 DATA 0,0,255,0,255,0,255,0
5850 DATA 0,255,0,255,0,0,0,255
5860 DATA 1,0,0,0,1,0,0,1
5870 : REM PLAYA DATA
5880 DATA 0,0,0,0,255,0,0,0,0
5890 DATA 0,0,0,255,255,255,0,0,0
5900 DATA 0,0,255,255,255,255,255,0,0
5910 DATA 0,255,255,1,255,1,255,255,0
5920 DATA 2,255,1,1,255,1,1,255,2
5930 DATA 2,255,255,255,255,255,255,255,2
5940 DATA 2,0,255,0,255,0,255,0,2
5950 : REM SPACESKULL
5960 DATA 1,0,1,0,1,0,1,0,1,0,1,0,1
5970 DATA 1,1,255,255,255,255,255,255,255,255,1,1,1
5980 DATA 255,255,255,255,255,255,255,255,255,255,255,255,255
5990 DATA 0,255,255,255,1,1,255,1,1,255,255,255,0
6000 DATA 0,255,255,255,1,255,255,255,255,255,255,255,0
6010 DATA 255,255,0,255,255,255,0,255,255,0,255,0,0
6020 DATA 255,255,0,0,0,255,255,255,0,0,255,255,0
6030 DATA 0,255,255,255,0,0,255,0,0,255,255,0,0
6040 DATA 0,255,0,0,0,255,0,255,0,0,255,255,0
6050 DATA 0,255,255,0,0,0,0,0,0,255,255,0,0
6060 : REM SKULLSPIT 1=WHITE 2=YELLOW 3=RED
6070 DATA 2,0,0,2
6080 DATA 0,2,3,0
6090 DATA 2,3,1,3
6100 DATA 2,3,1,3
6110 DATA 3,3,1,1
6120 DATA 2,1,1,3
6130 DATA 2,3,1,3
6140 DATA 1,2,1,2
6150 DATA 0,1,1,0
6160 : REM EXPLOSION 1 RED, 2 WHITE ,3 YELLO 4 BLUE
6170 DATA 0,0,1,1,0,0,2,0,0,0,0,0
6180 DATA 0,0,0,1,2,0,1,0,0,0,0,0
6190 DATA 0,0,0,2,2,1,2,3,0,0,1,0
6200 DATA 2,1,0,0,3,2,2,1,2,2,0,1
6210 DATA 2,1,1,0,1,3,3,4,2,1,1,0
6220 DATA 0,2,1,1,4,3,3,4,1,1,0,2
6230 DATA 0,2,2,3,3,3,4,3,1,2,2,0
6240 DATA 0,0,2,3,3,3,3,3,3,4,2,2
6250 DATA 0,0,1,3,3,2,2,3,3,4,1,0
6260 DATA 0,0,2,1,3,2,2,3,3,1,1,0
6270 DATA 0,0,0,2,3,4,2,3,1,1,0,0
6280 DATA 0,0,0,2,2,2,2,2,0,0,0,0