home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1987 April / 1987-04.d64 / omicron (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  6KB  |  172 lines

  1. 2 poke 792,193
  2. 10 ifpeek(13274)<>169thenload"omicron ml",8,1
  3. 20 sys13274
  4. 27 poke 808,234
  5. 30 poke56,48:clr:bl=51908:f=15:scr=1024
  6. 40 ifpeek(788)=0thenfort=0to149:readd$:next:gosub1510:goto60
  7. 50 gosub1200
  8. 60 gosub1000
  9. 70 gosub780
  10. 80 gosub580
  11. 90 sys51838:poke56322,255:if(peek(53280)andf)=0then220
  12. 100 lv=lv-1:poke251,48
  13. 110 fort=0to64:poke163,0:poke164,3
  14. 120 poke53280,t:poke53232,(3andt)+220
  15. 130 next
  16. 140 poke164,0:cs=cs+1
  17. 150 iflv=0then170
  18. 160 goto80
  19. 170 poke53178,0:poke53179,0
  20. 180 poke53272,21:print"[147]"spc(11)"[159]g a m e   o v e r"
  21. 190 fort=0to2000:next
  22. 200 fort=0to7:sl=sl+peek(832+t)*10^(7-t):next
  23. 210 ld=df:goto60
  24. 220 rem :::::::::: game won :::::::::::
  25. 230 ifl<15then430
  26. 240 poke53178,0:poke251,48:poke53281,1:fort=2to7:w(t)=peek(1442+t)-176:next
  27. 250 print"[147],,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,":fort=0to9:print:next
  28. 260 printspc(11)"[144]congratulations!"
  29. 270 print""spc(11)"[195][207][206][199][210][193][212][213][204][193][212][201][207][206][211][161]":fort=0to8:print:next
  30. 280 print",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,";
  31. 290 fort=0to75
  32. 300 x=int(rnd(1)*34+4):y=int(rnd(1)*19+3):pl=x+(y*40)+scr:ifpeek(pl)<>32then340
  33. 310 pokepl+54272,1:pokepl+54273,0
  34. 320 pokepl,39+rnd(0)*2:pokepl+1,8
  35. 330 sys49680:poke53280,t
  36. 340 next
  37. 350 print"[147]":poke53272,21
  38. 360 poke251,80:print"       you have survived omicron!"
  39. 370 print"       bonus"(df+1)*5000"points awarded for"
  40. 380 print"            each remaining ship."
  41. 390 print"[156] "lv"ships *"(df+1)*5000"="(df+1)*5000*lv"extra points."
  42. 400 fort=0to4500:next:poke251,48
  43. 410 fort=0to7:poke832+t,w(t):next
  44. 420 poke836,peek(836)+(df+1)*5*lv:goto170
  45. 430 rem :::::::: level completed ::::::
  46. 440 poke53178,1:poke53179,0
  47. 450 ifcs<>0then510
  48. 460 poke 808,234:print"[158]                                    "
  49. 470 print"  bonus 1000 for excellent play !!  "
  50. 480 print"[145]  [194][207][206][213][211] [177][176][176][176] [198][207][210] [197][216][195][197][204][204][197][206][212] [208][204][193][217] [161][161]  "
  51. 490 print"                                    "
  52. 500 poke251,64:fort=0to2000:next:poke251,0:poke836,peek(836)+1
  53. 510 cs=0:l=l+1:if(3and(l))<>0then570
  54. 520 print"                    "
  55. 530 print"   bonus ship !!!   "
  56. 540 print"[145]   [194][207][206][213][211] [211][200][201][208] [161][161][161]   "
  57. 550 print"                    "
  58. 560 poke251,80:fort=1to2000:next:poke251,0:lv=lv+1:iflv>9thenlv=9
  59. 570 goto80
  60. 580 rem :::::: between levels :::::::::
  61. 590 ifcs>0thenpoke53232,209:poke53184,18:poke53200,60
  62. 600 poke53178,1:poke53179,0:poke251,48:poke53216,1
  63. 610 dr=int(rnd(0)*2)
  64. 620 fort=0to7:poke840+t,0:next
  65. 630 poke844,l:poke841,q(df,0,landf):poke842,q(df,1,landf):poke165,q(df,2,landf)
  66. 640 sys13262:poke49408+32,3
  67. 650 fort=1to15:poke49408+32+t,1:poke53232+t,216:poke53216+t,14
  68. 660 poke53200+t,rnd(0)*48+170:poke53184+t,rnd(0)*90+40:poke49408+48+t,dr
  69. 670 ad=0:ifdr=1thenpoke49408+96+t,2:ad=2
  70. 680 poke49408+t+80,t:poke49408+7*16+t,((rnd(0)*256)and252)+ad
  71. 690 next
  72. 700 poke1531,lv+176:poke1571,lv+240
  73. 710 poke1522,(l+1)/10+176:poke1562,(l+1)/10+240:lc=l+1
  74. 720 iflc>9thenlc=lc-10:goto720
  75. 730 poke1523,lc+176:poke1563,lc+240
  76. 740 poke164,80:poke163,1
  77. 750 poke49408,0:poke49408+16,0:sys51908:fort=0to4:sys49680:next
  78. 760 poke53178,255:poke53179,255
  79. 770 return
  80. 780 rem ::::::: new game setup ::::::::
  81. 790 poke53280,0:lv=5
  82. 800 l=0:sl=0:cs=0:print"[147]":poke53272,31:sys51800
  83. 810 fort=0to11:poke828+t,0:next
  84. 820 fort=53160to53248:poket,0:next
  85. 830 x=16384+scr:fort=0to255step4
  86. 840 pokex+t,rnd(0)*25+134:pokex+t+1,rnd(0)*48+58:pokex+t+2,rnd(0)*25+16
  87. 850 pokex+t+3,rnd(0)*48+170:next
  88. 860 print"[147],,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,";
  89. 870 fort=1to8:print","spc(38)",";:next
  90. 880 print",        ,,,,,,,,,,,,,,,,,,,,,,        ,";
  91. 890 fort=0to3:print",        ,[154]                    ,        ,";:next
  92. 900 print",        ,,,,,,,,,,,,,,,,,,,,,,        ,";
  93. 910 fort=1to8:print","spc(38)",";:next
  94. 920 print",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,";
  95. 930 print",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,";:poke2023,44:poke56295,6
  96. 940 print""spc(10)"[154]    score=000000    "
  97. 950 print"[145]"spc(10)"    [211][195][207][210][197][189][176][176][176][176][176][176]    "
  98. 960 print""spc(10)"  level=00 ships=0  "
  99. 970 print"[145]"spc(10)"  [204][197][214][197][204][189][176][176] [211][200][201][208][211][189][176]  "
  100. 980 poke53184,18:poke53200,60:poke53232,209
  101. 990 return
  102. 1000 rem :::::::: title screen :::::::::
  103. 1010 poke53178,0:poke53179,0:poke251,48
  104. 1020 poke53280,0:poke53281,0:print"[147]";
  105. 1030 l$(0)="rookie":l$(1)="advanced":l$(2)="pro":l$(3)="expert"
  106. 1040 sp$="[154]                           "
  107. 1050 print""sp$:print""spc(13)" o m i c r o n ":printsp$
  108. 1060 print"[153]   select a skill level and get ready."
  109. 1070 print"[129]"spc(10)"your selections are...":sp=13
  110. 1080 printspc(sp)"f1 ... expert"
  111. 1090 printspc(sp)"f3 ... pro"
  112. 1100 printspc(sp)"f5 ... advanced"
  113. 1110 printspc(sp)"f7 ... rookie"
  114. 1120 ifsl>hythenhy=sl:wd=ld
  115. 1130 printspc(2)"[159]last game's score:"sl"on "l$(ld)"."
  116. 1140 printspc(2)"highest score yet:"hy"on "l$(wd)"."
  117. 1150 a(3)=1:a(6)=2:a(5)=3:a(4)=4
  118. 1160 z=peek(203):ifz>6orz<3then1160
  119. 1170 x=a(z):df=x-1
  120. 1180 ifx<1then1160
  121. 1190 return
  122. 1200 rem :::::: double characters ::::::
  123. 1210 poke 53280,0:poke53281,0
  124. 1215 print"[147][158]creating new character set...please wait"
  125. 1220 poke56334,peek(56334)and254:poke1,peek(1)and251
  126. 1230 b=15360:a=53252:fork=0to63:fort=0to3
  127. 1240 pokeb+k*8+t*2,255-peek(53248+k*8+t):pokeb+1+k*8+t*2,255-peek(53248+k*8+t)
  128. 1250 poke15872+k*8+t*2,255-peek(a+k*8+t):poke15873+k*8+t*2,255-peek(a+k*8+t)
  129. 1260 next:next:poke1,55:poke56334,1
  130. 1270 rem ::::::::: 16 sprites ::::::::::
  131. 1280 sa=51968+40
  132. 1290 fort=0to149:readv$
  133. 1300 l$=left$(v$,1)
  134. 1310 ifasc(l$)>64thenhn=asc(l$)-55
  135. 1320 ifasc(l$)<65thenhn=asc(l$)-48
  136. 1330 r$=right$(v$,1)
  137. 1340 ifasc(r$)>64thenln=asc(r$)-55
  138. 1350 ifasc(r$)<65thenln=asc(r$)-48
  139. 1360 b=hn*16+ln:pokesa+t,b:next
  140. 1370 poke53265,27:poke56333,127:poke788,0:poke789,203
  141. 1380 pokesa+109,peek(648)+3:poke53274,129
  142. 1390 data a5,fd,29,01,aa,49,01,a8,bd,b2,cf,8d,1c,d0
  143. 1400 data bd,b4,cf,8d,1d,d0,bd,b6,cf,8d,17,d0,bd,b8
  144. 1410 data cf,8d,1b,d0,bd,ba,cf,8d,15,d0,ad,1e,d0,99
  145. 1420 data bc,cf,ad,1f,d0,99,be,cf,a9,01,8d,19,d0,a5
  146. 1430 data fd,29,01,0a,0a,0a,aa,a0,00,84,fe,a9,01,85
  147. 1440 data fc,bd,c0,cf,0a,99,00,d0,90,06,a5,fc,05,fe
  148. 1450 data 85,fe,bd,d0,cf,99,01,d0,8a,84,ff,29,07,a8
  149. 1460 data bd,e0,cf,99,27,d0,bd,f0,cf,99,f8,07,a4,ff
  150. 1470 data 18,26,fc,e8,c8,c8,c0,10,d0,cd,a5,fe,8d,10
  151. 1480 data d0,ad,1f,d0,e6,fd,a9,00,8d,12,d0,ad,0d,dc
  152. 1490 data 29,01,f0,03,4c,31,ea,4c,bc,fe
  153. 1500 rem :::::::::: game setup :::::::::
  154. 1510 dimq(3,2,15)
  155. 1520 ford=0to3:fork=0to2:fort=0to15
  156. 1530 readv:ifk=2thenv=15-v
  157. 1540 ifk=1thenv=v*32+31
  158. 1550 q(d,k,t)=v:next:next:next
  159. 1560 return
  160. 1570 data 1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2
  161. 1580 data 1,1,2,2,3,3,4,4,5,6,3,4,4,3,3,3
  162. 1590 data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  163. 1600 data 1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2
  164. 1610 data 1,2,3,4,5,5,2,3,4,4,5,5,7,6,6,6
  165. 1620 data 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
  166. 1630 data 1,1,1,1,1,2,2,2,2,2,2,3,3,3,3,3
  167. 1640 data 3,4,5,7,7,2,3,3,4,5,5,4,6,3,4,4
  168. 1650 data 1,1,1,1,2,2,2,2,1,1,2,2,1,2,2,2
  169. 1660 data 4,4,4,3,3,2,2,1,3,3,3,4,7,4,4,4
  170. 1670 data 1,3,5,2,3,6,7,7,3,3,5,3,2,4,5,7
  171. 1680 data 1,1,1,2,2,3,3,4,2,3,1,2,2,2,2,3
  172.