Advertisement
JamesBarnard

Feast Invaders Blits Basic

May 7th, 2012
467
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 114.29 KB | None | 0 0
  1. ;-----------------------------;
  2. ;----PLEASE IGNORE THE MESS---;
  3. ;---this is my first program--;
  4. ;-----------------------------;
  5. Graphics 800, 600
  6.  
  7. SetBuffer BackBuffer ()
  8.  
  9. AutoMidHandle True
  10.  
  11. Global logo
  12. logo=LoadImage ("sludgesoft.png")
  13. Global feastfontsmall = LoadAnimImage ("feastfontsmall.png", 11, 15, 0, 60)
  14.  
  15.  
  16.  
  17. DrawImage logo, 400, 300
  18. displaytextsmall ("loading....",659 ,590)
  19.  
  20. Flip
  21. FreeImage logo
  22.  
  23. Global timer
  24.  
  25. Global introframe
  26. Global intro
  27. Global stars
  28. Global counter
  29. Global spaciex
  30. Global spaciex1
  31. Global spaciex2
  32. Global spaciex3
  33. Global starx = 400
  34. Global stary = 300
  35. Global start1
  36. Global start2
  37.  
  38.  
  39. Global explode = LoadAnimImage ("explosion45x45x8.png", 45, 45, 0, 8)
  40. MaskImage explode, 255,255,255
  41. Global explode2 = LoadAnimImage ("explosion100x60x8.png", 100, 60, 0, 8)
  42. MaskImage explode2, 255,255,255
  43. Global explode3 = LoadAnimImage ("explosion166x147x10.png", 166, 147, 0, 10)
  44. MaskImage explode3, 255,255,255
  45. Global bossexplode = LoadAnimImage ("bossexplode.png", 250, 150, 0, 8)
  46. MaskImage bossexplode, 255,255,255
  47.  
  48. Global boss1 = LoadAnimImage ("satelliteboss.png", 150, 150, 0, 13)
  49. Global boss1bomb = LoadAnimImage ("boss1bomb.png", 40, 40, 0, 5)
  50. Global boss2 = LoadAnimImage ("batlethboss.png",200 ,200 ,0, 26)
  51. Global boss3 = LoadAnimImage ("boss3.png", 150, 150, 0, 12)
  52. Global boss4 = LoadAnimImage ("boss4.png", 263, 150, 0, 10)
  53. Global boss4bomb = LoadImage ("boss4bomb.bmp")
  54. Global boss4star = LoadImage ("boss4star.bmp")
  55. Global boss4minibomb = LoadImage ("boss4minibomb.bmp")
  56.  
  57. Global feastfont = LoadAnimImage ("feastfontnew.png", 33, 45, 0, 60)
  58.  
  59.  
  60.  
  61.  
  62. Global czone
  63. Global czone1 = LoadImage ("screen1.jpg")
  64. Global czone2 = LoadImage ("screen2.jpg")
  65. Global czone3 = LoadImage ("screen3.jpg")
  66. Global czone4 = LoadImage ("screen4.jpg")
  67.  
  68.  
  69. Global boss=0
  70.  
  71.  
  72.  
  73. Global shipcreate = LoadAnimImage ("shipcreate.png", 60, 46, 0, 10)
  74. MaskImage shipcreate, 255, 0, 0
  75.  
  76. Global ufo=LoadAnimImage ("ufo1.png", 117,35,0,16)
  77. Global ufovintage = LoadImage ("ufovintage.bmp")
  78. Global ufoalt = LoadImage ("ufo2.bmp")
  79. Global ship = LoadImage ("ship.bmp")
  80. Global shipmedium = LoadImage ("shipmedium.bmp")
  81. Global shipsmall = LoadImage ("shipsmall.bmp")
  82. Global shipvintage = LoadImage ("shipvintage.bmp")
  83. Global ship2 = LoadImage ("ship2.bmp")
  84. Global ship22 = LoadImage ("ship22.bmp")
  85.  
  86.  
  87. Global firevintage = LoadImage ("shotvintage.bmp")
  88. Global fire = LoadImage ("shot.bmp")
  89. Global explodevintage = LoadImage ("explodevintage.bmp")
  90.  
  91. Global sfalien = LoadAnimImage ("sfalien.png",40,40,0,8) ; type 0
  92. Global blobanim = LoadAnimImage ("blobalienanim.png",40,40,0,9) ; type 1
  93. Global glowalien = LoadAnimImage ("glowballalien.png",40,40,0,9) ; type 2
  94. Global gyroalien = LoadAnimImage ("gyroscopeblue.png",40,40,0,8) ; type 3
  95. Global valien = LoadImage ("flyingv.bmp") ; type 4
  96. Global ash = LoadImage ("ampashdown.png") ; type 5
  97. Global ashcab = LoadImage ("ampashdowncab.bmp") ; type 6
  98. Global custom = LoadAnimImage ("custom.png", 40,40,0,8) ; type 7
  99. Global domealien = LoadAnimImage ("dome.png",40,40,0,8) ; type 8
  100. Global malien = LoadImage ("m65alien.bmp") ; type 9
  101. Global topalien = LoadAnimImage ("top20alien.png", 40, 40, 0, 8) ; Type 10
  102. Global threealien = LoadAnimImage ("threealien.png",40,40,0,16) ; type 11
  103. Global marshall = LoadImage ("ampmarshall.bmp") ; type 12
  104. Global sixalien = LoadAnimImage ("six.bmp", 40, 40, 0, 8) ; Type 13
  105. Global gwalien = LoadAnimImage ("greenwindowalien.png",40,40,0,8) ; type 14
  106. Global ggalien = LoadAnimImage ("greenglowalien.png",40,40,0,8) ; type 15
  107. Global gralien = LoadAnimImage ("greenrocketalien.png",40,40,0,8) ; type 16
  108. Global jetbassalien = LoadAnimImage ("jetbass.png",40,40,0,8) ; type 17
  109. Global blueballsalien = LoadAnimImage ("blueballs.png",40,40,0,8) ; type 18
  110. Global ringalien = LoadAnimImage ("ringalien.png",40,40,0,8) ; type 19
  111. Global chromeringalien = LoadAnimImage ("chromeringalien.png",40,40,0,8) ; type 20
  112. Global badassalien = LoadImage ("badass.bmp") ; type 21
  113. Global bluealien = LoadAnimImage ("blueship.png",40,40,0,16) ; type 22
  114. Global sgalien = LoadImage ("sg.bmp") ; type 23
  115. Global scramblealien = LoadAnimImage ("scramble.png",40,40,0,16) ; type 24
  116. Global invader1 = LoadAnimImage ("invader1.bmp", 40, 40, 0, 2) ; type 25
  117. Global invader2 = LoadAnimImage ("invader2.bmp", 40, 40, 0, 2) ; type 26
  118. Global invader3 = LoadAnimImage ("invader3.bmp", 40, 40, 0, 2) ; type 27
  119. Global gyroalientwo = LoadAnimImage ("gyroscope.png",40,40,0,8) ; type 28
  120. Global newinvader1 = LoadAnimImage ("newinvader1.png",40,40,0,8) ; type 29
  121. Global newinvader2 = LoadAnimImage ("newinvader2.png",40,40,0,8) ; type 30
  122. Global newinvader3 = LoadAnimImage ("newinvader3.png",40,40,0,8) ; type 31
  123. Global hnhalien = LoadImage ("hnh.png") ; type 32
  124.  
  125.  
  126.  
  127.  
  128. Global greenlightning = LoadAnimImage ("greenlightning.bmp", 20, 96, 0, 2)
  129.  
  130. Global direction
  131. Global aliensalive = 0
  132. Global ufornd
  133.  
  134.  
  135. Global powerupflash = LoadImage ("powerup.bmp")
  136. Global powerupcircle = LoadAnimImage ("powerupcircle.bmp", 12, 12, 0, 8)
  137. Global asteroidbomb = LoadAnimImage ("asteroids.bmp", 25, 23, 0, 5)
  138. Global bbomb = LoadImage ("brunsdonbomb.bmp")
  139. Global ddshot = LoadImage ("duffdoubleshot.bmp")
  140. Global bbeam = LoadImage ("barnardbeam.bmp")
  141. Global nlazer = LoadImage ("nazerlazer.bmp")
  142.  
  143. Global bbombpic = LoadImage ("bbombone.bmp")
  144. Global bbombexppic = LoadAnimImage ("bbomb.png", 100, 100, 0, 20)
  145. Global nlazerpic = LoadImage ("nlazer.bmp")
  146. Global bbeampic = LoadImage ("bbeam.png")
  147.  
  148. Global bomb = LoadImage ("bomb.bmp")
  149. Global ybomb = LoadImage ("yellowbomb.bmp")
  150. Global gbomb = LoadImage ("greenbomb.bmp")
  151. Global pbomb = LoadImage ("purplebomb.bmp")
  152. Global fbomb = LoadImage ("firebomb.bmp")
  153. Global sludgebomb = LoadAnimImage ("sludgebomb.bmp", 10, 26, 0, 16)
  154. Global bluebomb = LoadImage ("bluebomb.bmp")
  155. Global boomerangbomb = LoadAnimImage ("boomerang.bmp", 18, 18, 0, 8)
  156. Global boomerangbombbig = LoadAnimImage ("boomerangbig.png", 30, 30, 0, 8)
  157. Global bombvintage = LoadAnimImage ("invaderbomb,25,11.bmp", 11, 25, 0,2)
  158.  
  159. Global background
  160. Global space = LoadImage ("space2.jpg")
  161. Global space2 = LoadImage ("space.jpg")
  162. Global space3 = LoadImage ("space3.jpg")
  163. Global space4 = LoadImage ("space4.jpg")
  164. Global space5 = LoadImage ("spacecity.jpg")
  165. Global space6 = LoadImage ("spaceblack.jpg")
  166. Global space7 = LoadImage ("space7.jpg")
  167. Global space8 = LoadImage ("sky.jpg")
  168.  
  169. Global gallery1
  170. Global gallery2
  171. Global gallery3
  172. Global gallery4
  173. Global gallery5
  174.  
  175. Global playerlives
  176.  
  177. ;-------------shity stuff to make levels run at will
  178. czone = czone1
  179. background = space5
  180.  
  181. bgx = 0
  182. bgy = 0
  183. Global x = 400
  184. Global y = 575
  185. Global s = 10
  186. Global spacer=50
  187. Global missilecount
  188. Global maxmissiles = 0
  189. Const missilestep = 20
  190. Global astep = 1
  191. Global drop = 15
  192. Global dropq = 0
  193. Global image
  194. Global exx
  195. Global exy
  196. Global bombx
  197. Global bomby
  198. Global brnd
  199. Global expkind
  200. Global level= 1
  201. Global animationstart
  202. Global animationtimer
  203. Global animframe
  204. Global animframetwo
  205. Global animframethree
  206. Global timeelapsed
  207. Global collide
  208. Global difficulty
  209. Global completed = 0
  210. Global htp1$
  211. Global htp2$
  212. Global htp3$
  213. Global htp4$
  214. Global althtp1$
  215. Global txtcnt
  216. Global shipx
  217. Global shoty
  218. Global expcount = 0
  219. Const expcountmax = 5
  220.  
  221. ;----------------------------SOUNDS-----------------
  222. Global deathchannel
  223. Global ufochannel
  224. Global rockradio
  225. Global rocktv
  226. Global explosionchannel
  227. Global powerupchannel
  228. Global missilechannel
  229.  
  230.  
  231. Global musicvol# = .6
  232. Global songnum = -1
  233.  
  234. Global ufosound = LoadSound ("ufo.wav")
  235. Global missilesound = LoadSound ("missile.wav")
  236. Global explosionsound = LoadSound ("explosion.wav")
  237. Global powerupsound = LoadSound ("ufoexplosion.wav")
  238. Global ufoexpsound = LoadSound ("ufoexp.wav")
  239. Global youdie = LoadSound ("youdie.wav")
  240. Global noshot = LoadSound ("noshot.wav")
  241. Global bbombsound = LoadSound ("bbomb.wav")
  242. Global bbeamsound = LoadSound ("bbeam.wav")
  243. Global nlazersound = LoadSound ("nlazer.wav")
  244. Global loopexpsound= LoadSound ("loopexp.wav")
  245. Global bossdeathsound = LoadSound ("bossdeath.wav")
  246. Global bossbombsound = LoadSound ("bossbomb.wav")
  247. Global bossbomb2sound = LoadSound ("bossbomb2.wav")
  248.  
  249. Global file
  250.  
  251. Global name1$
  252. Global name2$
  253. Global name3$
  254. Global name4$
  255. Global name5$
  256. Global name6$
  257. Global name7$
  258. Global name8$
  259. Global name9$
  260. Global name10$
  261.  
  262. Global score1$
  263. Global score2$
  264. Global score3$
  265. Global score4$
  266. Global score5$
  267. Global score6$
  268. Global score7$
  269. Global score8$
  270. Global score9$
  271. Global score10$
  272.  
  273. Global sco
  274. Global nam
  275. Global cheater$
  276. Global cheat
  277. Global chea
  278. Global che
  279.  
  280. Global sco1
  281. Global sco2
  282. Global sco3
  283. Global sco4
  284. Global sco5
  285. Global sco6
  286. Global sco7
  287. Global sco8
  288. Global sco9
  289. Global sco10
  290.  
  291. Global playerinput
  292. Global playernewscore
  293. Global playernewname$
  294. Global playernewname1$
  295. Global entryy
  296. Global position
  297.  
  298. Global begin1
  299. Global begin2
  300. Global begin3
  301. Global beginspace = 1
  302. Global beginframe
  303.  
  304.  
  305.  
  306.  
  307. ;---------------------------------TYPES----------------------------------------
  308. Type Alien
  309. Field X,Y
  310. Field Frame
  311. Field AnimationStart
  312. Field AnimationTimer
  313. Field time_elapsed
  314. Field extratime
  315. Field brnd
  316. Field cdown
  317. Field kind
  318. Field alienvariable
  319. Field alienva
  320. Field alienv
  321. End Type
  322.  
  323. Type ufo
  324. Field x
  325. Field AnimationStart
  326. Field time_elapsed
  327. Field frame
  328. End Type
  329.  
  330. Type ufoscore
  331. Field x
  332. Field y
  333. Field txt$
  334. Field fr
  335. End Type
  336.  
  337. Type powerup
  338. Field x
  339. Field y
  340. Field kind
  341. End Type
  342.  
  343.  
  344. Type missile
  345. Field image
  346. Field x
  347. Field y
  348. End Type
  349.  
  350. Type pubbomb
  351. Field x
  352. Field y
  353. Field animationstart
  354. Field state
  355. Field frame
  356. Field timeelapsed
  357. End Type
  358.  
  359. Type pubbeam
  360. Field x
  361. Field y
  362. Field animationstart
  363. Field state
  364. Field frame
  365. Field timeelapsed
  366. End Type
  367.  
  368. Type punlazer
  369. Field x
  370. Field y
  371. End Type
  372.  
  373. Type player
  374. Field x
  375. Field y
  376. Field nazerlazer
  377. Field duffdoubleshot
  378. Field brunsdonbomb
  379. Field barnardbeam
  380. Field lives
  381. Field alive ;0=dead, 1 = alive
  382. Field invinc
  383. Field score
  384. Field extralives
  385. End Type
  386.  
  387.  
  388. Type explosion
  389. Field exx
  390. Field exy
  391. Field exf
  392. Field kind
  393. Field exfr
  394. End Type
  395.  
  396. Type bossexplosion
  397. Field exx
  398. Field exy
  399. Field exf
  400. Field exfr
  401. End Type
  402.  
  403. Type bomb
  404. Field box
  405. Field boy
  406. End Type
  407.  
  408. Type shipbomb
  409. Field box
  410. Field boy
  411. Field frame
  412. End Type
  413.  
  414. Type bluebomb
  415. Field box
  416. Field boy
  417. Field dir
  418. End Type
  419.  
  420. Type boomerangbomb
  421. Field box
  422. Field boy
  423. Field dir
  424. Field incr
  425. Field edge
  426. End Type
  427.  
  428.  
  429. Type sludgebomb
  430. Field box
  431. Field boy
  432. End Type
  433.  
  434.  
  435. Type firebomb
  436. Field box
  437. Field boy
  438. End Type
  439.  
  440.  
  441. Type tribomb
  442. Field x1
  443. Field y1
  444. Field x2
  445. Field x3
  446. End Type
  447.  
  448. Type doublebomb
  449. Field x1
  450. Field y1
  451. Field x2
  452. End Type
  453.  
  454. Type bombone
  455. Field box
  456. Field boy
  457. Field frame
  458. Field count
  459. End Type
  460.  
  461. Type asteroid
  462. Field x
  463. Field y
  464. Field frame
  465. End Type
  466.  
  467. Type boss1
  468. Field x
  469. Field y
  470. Field mode
  471. Field life
  472. Field timer
  473. Field newtime
  474. Field frame
  475. Field random
  476. End Type
  477.  
  478. Type boss2
  479. Field x
  480. Field y
  481. Field mode
  482. Field life
  483. Field timer
  484. Field newtime
  485. Field frame
  486. Field random
  487. End Type
  488.  
  489. Type boss3
  490. Field x
  491. Field y
  492. Field mode
  493. Field life
  494. Field timer
  495. Field newtime
  496. Field frame
  497. Field random
  498. End Type
  499.  
  500. ;-----------------------------LOADING FUNCTIONS-----------------------------
  501.  
  502. Function loadoptions ()
  503. file = ReadFile ("options.dat")
  504. If file = 0
  505. difficulty = 1
  506. saveoptions ()
  507. CloseFile (file)
  508. Else
  509. For q = 0 To 1
  510. If q = 0 difficulty = ReadByte (file)
  511. If q = 1 completed = ReadByte (file)
  512. Next
  513. EndIf
  514.  
  515. End Function
  516.  
  517. Function saveoptions ()
  518. file = WriteFile ("options.dat")
  519. For q = 0 To 1
  520. If q = 0 WriteByte file, difficulty
  521. If q = 1 WriteByte file, completed
  522. Next
  523. CloseFile (file)
  524. End Function
  525.  
  526. ;-----------------------------INTROFUNCTIONS-----------------------------------
  527. ;------------------intromovie
  528. Function mainintro()
  529. intro = LoadAnimImage ("intro.jpg", 320, 240, 0, 200)
  530. introframe= -1
  531. timer=CreateTimer(10)
  532. rocktv = PlayMusic ("feastinvaders.mp3")
  533. Repeat
  534. frames=WaitTimer(timer)
  535. For k=1 To frames
  536. introframe = introframe+1
  537. If introframe>199 introframe=199
  538. Next
  539. Cls
  540. DrawImage intro, 400, 300, introframe
  541. Flip
  542. Until KeyHit (57) = 1 Or introframe = 199
  543. Delay 1000
  544. FreeImage intro
  545. FlushKeys ()
  546. StopChannel (rocktv)
  547.  
  548. End Function
  549.  
  550. ;------------------gameoveranimation
  551. Function gameoveranim()
  552. intro = LoadAnimImage ("gameoveranim.jpg", 320, 240, 0, 20)
  553. introframe= -1
  554. timer=CreateTimer(10)
  555. rocktv = PlayMusic ("gameoveranim.mp3")
  556. Repeat
  557. frames=WaitTimer(timer)
  558. For k=1 To frames
  559. introframe = introframe+1
  560. If introframe>19 introframe=19
  561. Next
  562. Cls
  563. DrawImage intro, 400, 300, introframe
  564. Flip
  565. Until KeyHit (1) = 1 Or introframe = 19
  566. Delay 1000
  567. FreeImage intro
  568. FlushKeys ()
  569. StopChannel (rocktv)
  570. aliensalive = 0
  571. boss = 0
  572. End Function
  573.  
  574.  
  575. ;------------------outromovie
  576. Function outro()
  577. If ChannelPlaying (rockradio) = 1
  578. StopChannel (rockradio)
  579. EndIf
  580. StopChannel (deathchannel)
  581.  
  582. intro = LoadAnimImage ("outro.jpg", 320, 240, 0, 100)
  583. introframe= -1
  584. timer=CreateTimer(10)
  585. rocktv = PlayMusic ("yeah.mp3")
  586. Repeat
  587. frames=WaitTimer(timer)
  588. For k=1 To frames
  589. introframe = introframe+1
  590. If introframe<84 spaciex=introframe
  591.  
  592. If introframe>83 And introframe<107
  593. spaciex = 85
  594. EndIf
  595.  
  596. If introframe>106 And introframe<128
  597. spaciex = 86
  598. EndIf
  599.  
  600. If introframe>127 And introframe<150
  601. spaciex = 87
  602. EndIf
  603.  
  604. If introframe>149 And introframe<169
  605. spaciex = 88
  606. EndIf
  607.  
  608. If introframe>168 And introframe<179
  609. spaciex = 89
  610. EndIf
  611.  
  612. If introframe>178 And introframe<192
  613. spaciex = 90
  614. EndIf
  615.  
  616. If introframe>191 And introframe<201
  617. spaciex = 91
  618. EndIf
  619.  
  620. If introframe>200 And introframe<212
  621. spaciex = 92
  622. EndIf
  623.  
  624. If introframe>211 And introframe<222
  625. spaciex = 93
  626. EndIf
  627.  
  628. If introframe>221 And introframe<234
  629. spaciex = 94
  630. EndIf
  631.  
  632. If introframe>233 And introframe<242
  633. spaciex = 95
  634. EndIf
  635.  
  636. If introframe>241
  637. spaciex = 96
  638. EndIf
  639.  
  640.  
  641. If introframe>700 introframe=700
  642. Next
  643. Cls
  644. DrawImage intro, 400, 300, spaciex
  645. Flip
  646. Until KeyDown (57) = 1 Or introframe = 300
  647. Delay 1000
  648. FreeImage intro
  649. StopChannel (rocktv)
  650.  
  651. End Function
  652.  
  653. ;--------------------HIGHSCORES------------------------------------------
  654. Function loadhighscores()
  655. cheat = 0
  656. file = ReadFile ("highscore.dat")
  657. If file = 0
  658. name1$ = "james"
  659. score1$ = "200000"
  660. name2$ = "gareth"
  661. score2$ = "150000"
  662. name3$ = "andy"
  663. score3$ = "100000"
  664. name4$ = "and"
  665. score4$ = "90000"
  666. name5$ = "coirin"
  667. score5$ = "80000"
  668. name6$ = "play"
  669. score6$ = "70000"
  670. name7$ = "f--ked up"
  671. score7$ = "60000"
  672. name8$ = "rock n roll"
  673. score8$ = "40000"
  674. name9$ = "for
  675. score9$ = "20000"
  676. name10$ = "the devil"
  677. score10$ = "10000"
  678. savehighscores ()
  679. Else
  680. For q = 0 To 29
  681.  
  682. If q=0 name1$ = ReadLine (file) : nam = Len(name1$)
  683. If q=1 score1$ = ReadLine (file) : sco = Len(score1$)
  684. If q = 2
  685. cheater$ = ReadLine (file)
  686. chea = Int(cheater$)
  687. che = sco+nam * 666 + Int(score1)
  688. If cheat = 0
  689. If che > chea Or che < chea cheat = 1
  690. EndIf
  691. EndIf
  692.  
  693. If q=3 name2$ = ReadLine (file) : nam = Len(name2$)
  694. If q=4 score2$ = ReadLine (file): sco = Len(score2$)
  695. If q=5
  696. cheater$ = ReadLine (file)
  697. chea = Int(cheater$)
  698. che = sco+nam * 667 + Int(score2)
  699. If cheat = 0
  700. If che > chea Or che < chea cheat = 1
  701. EndIf
  702. EndIf
  703.  
  704. If q=6 name3$ = ReadLine (file) : nam = Len(name3$)
  705. If q=7 score3$ = ReadLine (file) : sco = Len(score3$)
  706. If q=8
  707. cheater$ = ReadLine (file)
  708. chea = Int(cheater$)
  709. che = sco+nam * 662 + Int(score3)
  710. If cheat = 0
  711. If che > chea Or che < chea cheat = 1
  712. EndIf
  713. EndIf
  714.  
  715. If q=9 name4$ = ReadLine (file) : nam = Len(name4$)
  716. If q=10 score4$ = ReadLine (file) : sco = Len(score4$)
  717. If q=11
  718. cheater$ = ReadLine (file)
  719. chea = Int(cheater$)
  720. che = sco+nam * 663 + Int(score4)
  721. If cheat = 0
  722. If che > chea Or che < chea cheat = 1
  723. EndIf
  724. EndIf
  725.  
  726. If q=12 name5$ = ReadLine (file) : nam = Len(name5$)
  727. If q=13 score5$ = ReadLine (file) : sco = Len(score5$)
  728. If q=14
  729. cheater$ = ReadLine (file)
  730. chea = Int(cheater$)
  731. che = sco+nam * 664 + Int(score5)
  732. If cheat = 0
  733. If che > chea Or che < chea cheat = 1
  734. EndIf
  735. EndIf
  736.  
  737. If q=15 name6$ = ReadLine (file) : nam = Len(name6$)
  738. If q=16 score6$ = ReadLine (file) : sco = Len(score6$)
  739. If q=17
  740. cheater$ = ReadLine (file)
  741. chea = Int(cheater$)
  742. che = sco+nam * 676 + Int(score6)
  743. If cheat = 0
  744. If che > chea Or che < chea cheat = 1
  745. EndIf
  746. EndIf
  747.  
  748.  
  749. If q=18 name7$ = ReadLine (file) : nam = Len(name7$)
  750. If q=19 score7$ = ReadLine (file) : sco = Len(score7$)
  751. If q=20
  752. cheater$ = ReadLine (file)
  753. chea = Int(cheater$)
  754. che = sco+nam * 686 + Int(score7)
  755. If cheat = 0
  756. If che > chea Or che < chea cheat = 1
  757. EndIf
  758. EndIf
  759.  
  760. If q=21 name8$ = ReadLine (file) : nam = Len(name8$)
  761. If q=22 score8$ = ReadLine (file) : sco = Len(score8$)
  762. If q=23
  763. cheater$ = ReadLine (file)
  764. chea = Int(cheater$)
  765. che = sco+nam * 696 + Int(score8)
  766. If cheat = 0
  767. If che > chea Or che < chea cheat = 1
  768. EndIf
  769. EndIf
  770.  
  771.  
  772. If q=24 name9$ = ReadLine (file) : nam = Len(name9$)
  773. If q=25 score9$ = ReadLine (file) : sco = Len(score9$)
  774. If q=26
  775. cheater$ = ReadLine (file)
  776. chea = Int(cheater$)
  777. che = sco+nam * 606 + Int(score9)
  778. If cheat = 0
  779. If che > chea Or che < chea cheat = 1
  780. EndIf
  781. EndIf
  782.  
  783. If q=27 name10$ = ReadLine (file) : nam = Len(name10$)
  784. If q=28 score10$ = ReadLine (file) : sco = Len(score10$)
  785. If q=29
  786. cheater$ = ReadLine (file)
  787. chea = Int(cheater$)
  788. che = sco+nam * 616 + Int(score10)
  789. If cheat = 0
  790. If che > chea Or che < chea cheat = 1
  791. EndIf
  792. EndIf
  793.  
  794. Next
  795.  
  796. EndIf
  797.  
  798.  
  799. If cheat = 1
  800. exx = 0
  801. timer = CreateTimer (45)
  802. Repeat
  803.  
  804. frames=WaitTimer(timer)
  805. For k=1 To frames
  806. exx=exx+1
  807. Next
  808. Cls
  809. displaytextsmall("you god damn cheating motherf--ker!! all high scores are being reset", 26, 50)
  810. If exx>50 displaytextsmall("you god damn cheating motherf--ker!! all high scores are being reset", 26, 100)
  811. If exx>100 displaytextsmall("you god damn cheating motherf--ker!! all high scores are being reset", 26, 150)
  812. If exx>150 displaytextsmall("you god damn cheating motherf--ker!! all high scores are being reset", 26, 200)
  813. If exx>200 displaytextsmall("you god damn cheating motherf--ker!! all high scores are being reset", 26, 250)
  814. If exx>250 displaytextsmall("you god damn cheating motherf--ker!! all high scores are being reset", 26, 300)
  815. If exx>300 displaytextsmall("you god damn cheating motherf--ker!! all high scores are being reset", 26, 350)
  816. If exx>350 displaytextsmall("you god damn cheating motherf--ker!! all high scores are being reset", 26, 400)
  817. If exx>400 displaytextsmall("you god damn cheating motherf--ker!! all high scores are being reset", 26, 450)
  818. If exx>450 displaytextsmall("you god damn cheating motherf--ker!! all high scores are being reset", 26, 500)
  819. If exx>500 displaytextsmall("you god damn cheating motherf--ker!! all high scores are being reset", 26, 550)
  820. Flip
  821.  
  822. Until exx>550
  823. name1$ = "james"
  824. score1$ = "200000"
  825. name2$ = "gareth"
  826. score2$ = "150000"
  827. name3$ = "andy"
  828. score3$ = "100000"
  829. name4$ = "and"
  830. score4$ = "90000"
  831. name5$ = "coirin"
  832. score5$ = "80000"
  833. name6$ = "play"
  834. score6$ = "70000"
  835. name7$ = "f--ked up"
  836. score7$ = "60000"
  837. name8$ = "rock n roll"
  838. score8$ = "40000"
  839. name9$ = "for
  840. score9$ = "20000"
  841. name10$ = "the devil"
  842. score10$ = "10000"
  843. savehighscores ()
  844. EndIf
  845.  
  846. CloseFile (file)
  847.  
  848. End Function
  849. ;--------------
  850. Function enterhighscores()
  851. stars = LoadImage ("stars1.png")
  852. timer = CreateTimer (45)
  853. sco1 = Int(score1)
  854. sco2 = Int(score2)
  855. sco3 = Int(score3)
  856. sco4 = Int(score4)
  857. sco5 = Int(score5)
  858. sco6 = Int(score6)
  859. sco7 = Int(score7)
  860. sco8 = Int(score8)
  861. sco9 = Int(score9)
  862. sco10= Int(score10)
  863. If playernewscore > sco9
  864. name10$ = name9$
  865. score10$ = score9$
  866. EndIf
  867. If playernewscore > sco8
  868. name9$ = name8$
  869. score9$ = score8$
  870. EndIf
  871. If playernewscore > sco7
  872. name8$ = name7$
  873. score8$ = score7$
  874. EndIf
  875. If playernewscore > sco6
  876. name7$ = name6$
  877. score7$ = score6$
  878. EndIf
  879. If playernewscore > sco5
  880. name6$ = name5$
  881. score6$ = score5$
  882. EndIf
  883. If playernewscore > sco4
  884. name5$ = name4$
  885. score5$ = score4$
  886. EndIf
  887. If playernewscore > sco3
  888. name4$ = name3$
  889. score4$ = score3$
  890. EndIf
  891. If playernewscore > sco2
  892. name3$ = name2$
  893. score3$ = score2$
  894. EndIf
  895. If playernewscore > sco1
  896. name2$ = name1$
  897. score2$ = score1$
  898. EndIf
  899.  
  900. If playernewscore > sco10 And playernewscore < sco9+1
  901. entryy = 500
  902. score10 = playernewscore
  903. EndIf
  904. If playernewscore > sco9 And playernewscore < sco8+1
  905. entryy = 460
  906. score9 = playernewscore
  907. EndIf
  908. If playernewscore > sco8 And playernewscore < sco7+1
  909. entryy = 420
  910. score8 = playernewscore
  911. EndIf
  912. If playernewscore > sco7 And playernewscore < sco6+1
  913. entryy = 380
  914. score7 = playernewscore
  915. EndIf
  916. If playernewscore > sco6 And playernewscore < sco5+1
  917. entryy = 340
  918. score6 = playernewscore
  919. EndIf
  920. If playernewscore > sco5 And playernewscore < sco4+1
  921. entryy = 300
  922. score5 = playernewscore
  923. EndIf
  924. If playernewscore > sco4 And playernewscore < sco3+1
  925. entryy = 260
  926. score4 = playernewscore
  927. EndIf
  928. If playernewscore > sco3 And playernewscore < sco2+1
  929. entryy = 220
  930. score3 = playernewscore
  931. EndIf
  932. If playernewscore > sco2 And playernewscore < sco1+1
  933. entryy = 180
  934. score2 = playernewscore
  935. EndIf
  936. If playernewscore > sco1
  937. entryy = 140
  938. score1 = playernewscore
  939. EndIf
  940.  
  941. While Not KeyDown (28)
  942. frames=WaitTimer(timer)
  943. For k=1 To frames
  944.  
  945. starx = starx+3
  946. stary = stary -2
  947.  
  948. Next
  949. Cls
  950. TileBlock stars, starx, stary
  951. displaytextsmall ("god damn you got on the high score board enter your name",92 , 100)
  952. If entryy <> 140 displaytextsmall (name1$, 100, 140)
  953. If entryy <> 180 displaytextsmall (name2$, 100, 180)
  954. If entryy <> 220 displaytextsmall (name3$, 100, 220)
  955. If entryy <> 260 displaytextsmall (name4$, 100, 260)
  956. If entryy <> 300 displaytextsmall (name5$, 100, 300)
  957. If entryy <> 340 displaytextsmall (name6$, 100, 340)
  958. If entryy <> 380 displaytextsmall (name7$, 100, 380)
  959. If entryy <> 420 displaytextsmall (name8$, 100, 420)
  960. If entryy <> 460 displaytextsmall (name9$, 100, 460)
  961. If entryy <> 500 displaytextsmall (name10$, 100, 500)
  962. displaytextsmall (RSet (score1$, 10), 590, 140)
  963. displaytextsmall (RSet (score2$, 10), 590, 180)
  964. displaytextsmall (RSet (score3$, 10), 590, 220)
  965. displaytextsmall (RSet (score4$, 10), 590, 260)
  966. displaytextsmall (RSet (score5$, 10), 590, 300)
  967. displaytextsmall (RSet (score6$, 10), 590, 340)
  968. displaytextsmall (RSet (score7$, 10), 590, 380)
  969. displaytextsmall (RSet (score8$, 10), 590, 420)
  970. displaytextsmall (RSet (score9$, 10), 590, 460)
  971. displaytextsmall (RSet (score10$, 10),590, 500)
  972.  
  973.  
  974. playerinput = GetKey()
  975. If KeyHit (14)
  976. exx = Len (playernewname)
  977. exx = exx - 1
  978. For z = 1 To exx
  979. playernewname1 = playernewname1+Mid$(playernewname, z, 1)
  980. Next
  981. playernewname = playernewname1
  982. playernewname1=""
  983. EndIf
  984.  
  985. exx = Len(playernewname)
  986. If exx<30
  987.  
  988. If playerinput = 32
  989. playernewname = playernewname + Chr$ (playerinput)
  990. Upper$ (playernewname)
  991. EndIf
  992.  
  993. If playerinput >47 And playerinput < 58
  994. playernewname = playernewname + Chr$ (playerinput)
  995. Upper$ (playernewname)
  996. EndIf
  997.  
  998.  
  999. If playerinput >96 And playerinput < 123
  1000. playernewname = playernewname + Chr$ (playerinput)
  1001. Upper$ (playernewname)
  1002. EndIf
  1003.  
  1004. EndIf
  1005.  
  1006. displaytextsmall (playernewname, 100, entryy)
  1007.  
  1008. Flip
  1009. Wend
  1010. If entryy = 140 name1$ = playernewname
  1011. If entryy = 180 name2$ = playernewname
  1012. If entryy = 220 name3$ = playernewname
  1013. If entryy = 260 name4$ = playernewname
  1014. If entryy = 300 name5$ = playernewname
  1015. If entryy = 340 name6$ = playernewname
  1016. If entryy = 380 name7$ = playernewname
  1017. If entryy = 420 name8$ = playernewname
  1018. If entryy = 460 name9$ = playernewname
  1019. If entryy = 500 name10$ = playernewname
  1020. savehighscores()
  1021.  
  1022. End Function
  1023. ;------------------
  1024. Function savehighscores ()
  1025. file = WriteFile ("highscore.dat")
  1026. For q = 0 To 29
  1027. If q=0 WriteLine file,name1$ : nam = Len(name1$)
  1028. If q=1 WriteLine file,score1$ : sco = Len(score1$)
  1029. If q=2 sco = sco+nam * 666 + Int(score1) : WriteLine file, sco
  1030. If q=3 WriteLine file,name2$ : nam = Len(name2$)
  1031. If q=4 WriteLine file,score2$ : sco = Len(score2$)
  1032. If q=5 sco = sco+nam * 667 + Int(score2) : WriteLine file, sco
  1033. If q=6 WriteLine file,name3$ : nam = Len(name3$)
  1034. If q=7 WriteLine file,score3$ : sco = Len(score3$)
  1035. If q=8 sco = sco+nam * 662 + Int(score3) : WriteLine file, sco
  1036. If q=9 WriteLine file,name4$ : nam = Len(name4$)
  1037. If q=10 WriteLine file,score4$ : sco = Len(score4$)
  1038. If q=11 sco = sco+nam * 663 + Int(score4) : WriteLine file, sco
  1039. If q=12 WriteLine file,name5$ : nam = Len(name5$)
  1040. If q=13 WriteLine file,score5$ : sco = Len(score5$)
  1041. If q=14 sco = sco+nam * 664 + Int(score5) : WriteLine file, sco
  1042. If q=15 WriteLine file,name6$ : nam = Len(name6$)
  1043. If q=16 WriteLine file,score6$ : sco = Len(score6$)
  1044. If q=17 sco = sco+nam * 676 + Int(score6) : WriteLine file, sco
  1045. If q=18 WriteLine file,name7$ : nam = Len(name7$)
  1046. If q=19 WriteLine file,score7$ : sco = Len(score7$)
  1047. If q=20 sco = sco+nam * 686 + Int(score7) : WriteLine file, sco
  1048. If q=21 WriteLine file,name8$ : nam = Len(name8$)
  1049. If q=22 WriteLine file,score8$ : sco = Len(score8$)
  1050. If q=23 sco = sco+nam * 696 + Int(score8) : WriteLine file, sco
  1051. If q=24 WriteLine file,name9$ : nam = Len(name9$)
  1052. If q=25 WriteLine file,score9$ : sco = Len(score9$)
  1053. If q=26 sco = sco+nam * 606 + Int(score9) : WriteLine file, sco
  1054. If q=27 WriteLine file,name10$ : nam = Len(name10$)
  1055. If q=28 WriteLine file,score10$ : sco = Len(score10$)
  1056. If q=29 sco = sco+nam * 616 + Int(score10) : WriteLine file, sco
  1057. Next
  1058. CloseFile (file)
  1059. End Function
  1060.  
  1061.  
  1062. Function displayhighscores ()
  1063. stars = LoadImage ("stars1.png")
  1064. timer = CreateTimer (45)
  1065. beginframe = 0
  1066.  
  1067. Repeat
  1068. frames=WaitTimer(timer)
  1069. For k=1 To frames
  1070. starx = starx-3
  1071. If KeyHit (1) End
  1072. If KeyDown (57) game()
  1073. If KeyHit (24) options()
  1074. beginspace = beginspace+1
  1075. If beginspace>40 beginspace=1
  1076. beginframe = beginframe+1
  1077.  
  1078. Next
  1079. Cls
  1080. TileBlock stars, starx, stary
  1081. displaytextsmall ("hall of champions",306 , 100)
  1082. displaytextsmall (name1$, 100, 140)
  1083. displaytextsmall (name2$, 100, 180)
  1084. displaytextsmall (name3$, 100, 220)
  1085. displaytextsmall (name4$, 100, 260)
  1086. displaytextsmall (name5$, 100, 300)
  1087. displaytextsmall (name6$, 100, 340)
  1088. displaytextsmall (name7$, 100, 380)
  1089. displaytextsmall (name8$, 100, 420)
  1090. displaytextsmall (name9$, 100, 460)
  1091. displaytextsmall (name10$, 100, 500)
  1092. displaytextsmall (RSet (score1$, 10), 590, 140)
  1093. displaytextsmall (RSet (score2$, 10), 590, 180)
  1094. displaytextsmall (RSet (score3$, 10), 590, 220)
  1095. displaytextsmall (RSet (score4$, 10), 590, 260)
  1096. displaytextsmall (RSet (score5$, 10), 590, 300)
  1097. displaytextsmall (RSet (score6$, 10), 590, 340)
  1098. displaytextsmall (RSet (score7$, 10), 590, 380)
  1099. displaytextsmall (RSet (score8$, 10), 590, 420)
  1100. displaytextsmall (RSet (score9$, 10), 590, 460)
  1101. displaytextsmall (RSet (score10$, 10),590, 500)
  1102.  
  1103. If beginspace<31 displaytextsmall ("hit space to play", 606, 590)
  1104.  
  1105.  
  1106.  
  1107. Flip
  1108. Until beginframe > 700
  1109. FlushKeys()
  1110. End Function
  1111. ;--------------------ALIEN POINTS WORTH----------------
  1112. Function alienpoints ()
  1113. logo=LoadImage ("logo.png")
  1114. stars=LoadImage ("stars1.png")
  1115. timer=CreateTimer(45)
  1116. begin1= -150
  1117. begin2=1
  1118. beginframe = 0
  1119. spaciex=-19
  1120. spaciex1 = 0
  1121. spaciex2 = 0
  1122. spaciex3 = 0
  1123. Repeat
  1124. If KeyHit (1) End
  1125. If KeyDown (57) game()
  1126. If KeyHit (24) options()
  1127. frames=WaitTimer(timer)
  1128. For k=1 To frames
  1129. beginspace = beginspace+1
  1130. If beginspace>40 beginspace=1
  1131. begin1=begin1+1
  1132. stary=stary-2
  1133. If beginframe<19
  1134. If begin1>120
  1135. begin1=120
  1136. EndIf
  1137. EndIf
  1138. If begin1>119
  1139. begin2=begin2+1
  1140. If begin2>40
  1141. begin2 = 1
  1142. beginframe=beginframe+1
  1143. EndIf
  1144. If begin2<31 begin3 = 0
  1145. If begin2>30 begin3 = 1
  1146. If beginframe>1 spaciex=spaciex+2
  1147. If spaciex>337 spaciex=337
  1148. If spaciex=337
  1149. spaciex1=spaciex1+2
  1150. If spaciex1>337 spaciex1=337
  1151. EndIf
  1152. If spaciex1 = 337
  1153. spaciex2 = spaciex2+2
  1154. If spaciex2>318 spaciex2=318
  1155. EndIf
  1156. If spaciex2 =318
  1157. spaciex3 = spaciex3 + 2
  1158. If spaciex3>275 spaciex3 = 275
  1159. EndIf
  1160.  
  1161.  
  1162. EndIf
  1163. Next
  1164.  
  1165. Cls
  1166. TileBlock stars, starx, stary
  1167. If begin1>119
  1168. If beginspace<31
  1169. display_text ("play feast invaders", 70, begin1+ 150)
  1170. EndIf
  1171. If beginframe>1
  1172. displaytextsmall ("score advance table", 290, begin1+205)
  1173. displaytextsmall ("- 75 points", 357, begin1+260)
  1174. DrawImage gyroalien, spaciex, begin1+260
  1175. EndIf
  1176. EndIf
  1177. If spaciex=337
  1178. DrawImage sfalien, spaciex1, begin1+310
  1179. displaytextsmall ("- 75 points", 357, begin1+310)
  1180. EndIf
  1181. If spaciex1=337
  1182. DrawImage ufo , spaciex2, begin1+360
  1183. displaytextsmall ("- ? mystery", 378, begin1+360)
  1184. EndIf
  1185. If spaciex2 = 318
  1186. displaytextsmall (" every 10000 points", 295, begin1+420)
  1187. DrawImage shipmedium, spaciex3, begin1+420
  1188. EndIf
  1189.  
  1190. If beginspace<31 displaytextsmall ("hit space to play", 606, 590)
  1191.  
  1192. DrawImage logo, 400, begin1
  1193. Flip
  1194. Until begin1>715
  1195. FreeImage logo
  1196. FreeImage stars
  1197. End Function
  1198.  
  1199. ;---------------------sludgesoft
  1200. Function sludgesoft ()
  1201. logo=LoadImage ("sludgesoft.png")
  1202. timer=CreateTimer(45)
  1203. begin1= 0
  1204. Repeat
  1205. frames=WaitTimer(timer)
  1206. For k=1 To frames
  1207. begin1 = begin1+1
  1208.  
  1209. Next
  1210.  
  1211. Cls
  1212. DrawImage logo, 400, 300
  1213.  
  1214. Flip
  1215. Until begin1>100 Or KeyHit (1) = 1
  1216. FreeImage logo
  1217. End Function
  1218.  
  1219. ;-------------------------display powerups
  1220. Function displaypowerups ()
  1221. logo=LoadImage ("logo.png")
  1222. stars=LoadImage ("stars1.png")
  1223. timer=CreateTimer(45)
  1224. begin1= 1150
  1225. beginframe = 0
  1226. spaciex1 = 0
  1227. Repeat
  1228. If KeyHit (1) End
  1229. If KeyDown (57) game()
  1230. If KeyHit (24) options()
  1231. frames=WaitTimer(timer)
  1232. For k=1 To frames
  1233. stary = stary-3
  1234. spaciex1 = spaciex1+1
  1235. If spaciex1<550
  1236. begin1 = begin1-2
  1237. If begin1<400 begin1 = 400
  1238. EndIf
  1239. If spaciex1>850 begin1 = begin1-2
  1240. beginspace = beginspace+1
  1241. If beginspace>40 beginspace=1
  1242.  
  1243.  
  1244. Next
  1245.  
  1246. Cls
  1247. TileBlock stars, starx, stary
  1248. DrawImage logo, begin1, 120
  1249.  
  1250. If spaciex1<1000
  1251. If begin1<401
  1252. DrawImage ddshot, 91,388
  1253. displaytextsmall(" duff double shot - an extra missile pod for your ship",115 ,400)
  1254. EndIf
  1255. EndIf
  1256. If spaciex1<1050
  1257. If spaciex1>550
  1258. DrawImage bbeam, 97,438
  1259. displaytextsmall(" barnard beam - a slice of pure energy that kicks ass",121 ,450)
  1260. EndIf
  1261. EndIf
  1262. If spaciex1<1100
  1263. If spaciex1>700
  1264. DrawImage nlazer, 15,488
  1265. displaytextsmall(" nazer lazer - a plasma pulse that wont stop this side of dooms day",44 ,500)
  1266. EndIf
  1267. EndIf
  1268. If spaciex1<1150
  1269. If spaciex1>850
  1270. DrawImage bbomb, 168,538
  1271. displaytextsmall(" brunsdon bomb - the expanding red death",192 ,550)
  1272. EndIf
  1273. EndIf
  1274.  
  1275. If beginspace<31 displaytextsmall ("hit space to play", 606, 590)
  1276.  
  1277.  
  1278. Flip
  1279. Until begin1<-350
  1280. FreeImage logo
  1281. FreeImage stars
  1282. End Function
  1283.  
  1284. ;---------------------------how to play
  1285. Function howtoplay ()
  1286. logo=LoadImage ("logo.png")
  1287. stars=LoadImage ("stars1.png")
  1288. htp1 = "left and right arrow keys move your ship"
  1289. htp2 = "use the spacebar to fire missiles"
  1290. htp3 = "shoot ufos for powerups hit alt-gr to use them"
  1291. htp4 = "use o for options and during play hit p to pause"
  1292. timer=CreateTimer(45)
  1293. begin1= 750
  1294. begin2 = 1
  1295. begin3 = 0
  1296. txtcnt = 0
  1297. spaciex1 = 0
  1298. shipx=30
  1299. shoty = 575
  1300.  
  1301. Repeat
  1302. If KeyHit (1) End
  1303. If KeyDown (57) game()
  1304. If KeyHit (24) options()
  1305. frames=WaitTimer(timer)
  1306. For k=1 To frames
  1307.  
  1308. begin3 = begin3+1
  1309.  
  1310. If spaciex1 = 0
  1311. begin1=begin1-3
  1312. If begin1<120
  1313. begin1=120
  1314. spaciex1=1
  1315. EndIf
  1316. EndIf
  1317.  
  1318. If spaciex1=1
  1319. althtp1$ = htp1$
  1320. If begin3=7
  1321. txtcnt = txtcnt + 1
  1322. If txtcnt=40
  1323. spaciex1 = 2
  1324. txtcnt = 0
  1325. EndIf
  1326. EndIf
  1327. EndIf
  1328. If spaciex1 = 2
  1329. shipx = shipx+10
  1330. If begin3=7 txtcnt = txtcnt + 1
  1331. If shipx>770
  1332. shipx=770
  1333. spaciex1=3
  1334. EndIf
  1335. EndIf
  1336.  
  1337.  
  1338. If spaciex1 = 3
  1339. shipx = shipx-10
  1340. If begin3=7 txtcnt = txtcnt + 1
  1341. If shipx<400 shipx=400
  1342. If txtcnt=33
  1343. spaciex1=4
  1344. txtcnt=0
  1345. EndIf
  1346. EndIf
  1347.  
  1348. If spaciex1 = 4
  1349. shoty = shoty-8
  1350. If begin3=7 txtcnt = txtcnt + 1
  1351. If shoty<-50 shoty=575
  1352. If txtcnt = 46
  1353. spaciex1=5
  1354. shoty=shoty +8
  1355. txtcnt=0
  1356. EndIf
  1357. EndIf
  1358.  
  1359. If spaciex1 = 5
  1360. shoty = shoty-8
  1361. If begin3=7 txtcnt = txtcnt + 1
  1362. If shoty<-50 shoty=575
  1363. If txtcnt > 70 And shoty=575
  1364. txtcnt = 0
  1365. spaciex1=6
  1366. EndIf
  1367. EndIf
  1368.  
  1369.  
  1370.  
  1371. stary = stary-1
  1372. beginspace = beginspace+1
  1373. If beginspace>40 beginspace=1
  1374. begin2=begin2+1
  1375. If begin2>40 begin2 = 1
  1376. If begin3=7 begin3=0
  1377.  
  1378.  
  1379.  
  1380. Next
  1381.  
  1382. Cls
  1383. TileBlock stars, starx, stary
  1384.  
  1385. If spaciex1>3
  1386. DrawImage fire, 400, shoty
  1387. displaytextsmall (""+htp2$, 228, 350)
  1388. EndIf
  1389.  
  1390. If begin1 = 120
  1391. If beginspace<31 display_text ("how to play", 218, 270)
  1392. EndIf
  1393. If spaciex1 = 1
  1394. althtp1$ = Mid$(htp1$,1,txtcnt)
  1395. displaytextsmall (""+althtp1$, 180, 330)
  1396. EndIf
  1397. If spaciex1>1
  1398. displaytextsmall (""+htp1$, 180, 330)
  1399. DrawImage ship, shipx, 575
  1400. EndIf
  1401. If spaciex1>1 And spaciex1<4
  1402. althtp1$ = Mid$(htp2$,1,txtcnt)
  1403. displaytextsmall (""+althtp1$, 228, 350)
  1404. EndIf
  1405.  
  1406. If spaciex1 = 4
  1407. althtp1$ = Mid$(htp3$,1,txtcnt)
  1408. displaytextsmall (""+althtp1$, 146, 370)
  1409. EndIf
  1410.  
  1411. If spaciex1 = 5
  1412. althtp1$ = Mid$(htp4$,1,txtcnt)
  1413. displaytextsmall (""+althtp1$, 135, 390)
  1414. EndIf
  1415.  
  1416.  
  1417.  
  1418. If spaciex1 > 4 displaytextsmall (""+htp3$, 146, 370)
  1419.  
  1420.  
  1421.  
  1422. If beginspace<31 displaytextsmall ("hit space to play", 606, 590)
  1423.  
  1424.  
  1425.  
  1426.  
  1427.  
  1428. DrawImage logo, 400, begin1
  1429. Flip
  1430. Until spaciex1 = 6
  1431. FreeImage logo
  1432. FreeImage stars
  1433. End Function
  1434. ;---------------------------GALLERY
  1435. Function gallery ()
  1436. stars=LoadImage ("stars1.png")
  1437. spaciex = 0
  1438.  
  1439. gallery1 = LoadImage ("6.jpg")
  1440. gallery2 = LoadImage ("record1.png")
  1441. gallery3 = LoadImage ("record2.png")
  1442. gallery4= LoadImage ("record3.png")
  1443. gallery5= LoadImage ("record4.jpg")
  1444.  
  1445. timer=CreateTimer(45)
  1446.  
  1447. Repeat
  1448. frames=WaitTimer(timer)
  1449. For k=1 To frames
  1450.  
  1451. If KeyHit (1) End
  1452. If KeyDown (57) game()
  1453. If KeyHit (24) options()
  1454. stary = stary+1
  1455. starx = starx-1
  1456. beginspace = beginspace+1
  1457. If beginspace>40 beginspace=1
  1458. spaciex = spaciex + 1
  1459.  
  1460. Next
  1461. Cls
  1462. TileBlock stars,starx, stary
  1463. If spaciex>50 And spaciex<350
  1464. DrawBlock (gallery1, 400, 300)
  1465. displayTextsmall ("rock n roll with sludgefeast at www.sludgefeast.co.uk",108, 50)
  1466. EndIf
  1467. If spaciex>400 And spaciex<600
  1468. DrawBlock (gallery2, 400, 300)
  1469. displayTextsmall ("first single baby you f--k me up - lll2100 cds",147, 50)
  1470. EndIf
  1471. If spaciex>650 And spaciex<850
  1472. DrawBlock (gallery3, 400, 300)
  1473. displayTextsmall ("second single rock n roll - fzbx003 (fuzzbox)",152, 50)
  1474. EndIf
  1475. If spaciex>900 And spaciex<1100
  1476. DrawBlock (gallery4, 400, 300)
  1477. displayTextsmall ("debut album rock n roll - fzbx003 (fuzzbox)",163, 50)
  1478. EndIf
  1479. If spaciex>1150 And spaciex<1350
  1480. DrawBlock (gallery5, 400, 300)
  1481. displayTextsmall ("second album sf90 - sf666 (sludgesounds)",185, 50)
  1482. EndIf
  1483.  
  1484. If beginspace<31 displaytextsmall ("hit space to play", 606, 590)
  1485.  
  1486.  
  1487.  
  1488. Flip
  1489. Until spaciex>1400
  1490. FreeImage gallery1
  1491. FreeImage gallery2
  1492. FreeImage gallery3
  1493. FreeImage gallery4
  1494. FreeImage gallery5
  1495. End Function
  1496.  
  1497. ;--------------------------gallery2
  1498. Function gallery2 ()
  1499. stars=LoadImage ("stars1.png")
  1500. spaciex = 0
  1501.  
  1502. gallery1 = LoadImage ("1.jpg")
  1503. gallery2 = LoadImage ("2.jpg")
  1504. gallery3 = LoadImage ("4.jpg")
  1505. gallery4= LoadImage ("3.jpg")
  1506. gallery5= LoadImage ("5.jpg")
  1507.  
  1508. timer=CreateTimer(45)
  1509.  
  1510. Repeat
  1511. frames=WaitTimer(timer)
  1512. For k=1 To frames
  1513. If KeyHit (1) End
  1514. If KeyDown (57) game()
  1515. If KeyHit (24) options()
  1516. stary = stary+2
  1517. spaciex = spaciex + 1
  1518. beginspace = beginspace+1
  1519. If beginspace>40 beginspace=1
  1520. Next
  1521. Cls
  1522. TileBlock stars,starx,stary
  1523. If spaciex>50 And spaciex <250
  1524. DrawBlock (gallery1, 400, 300)
  1525. displayTextsmall ("rock n roll with sludgefeast at www.sludgefeast.co.uk",108, 50)
  1526. EndIf
  1527. If spaciex>300 And spaciex<500
  1528. DrawBlock (gallery2, 400, 300)
  1529. displayTextsmall ("thanks for playing feast invaders",218, 50)
  1530. EndIf
  1531. If spaciex>500 And spaciex<700
  1532. DrawBlock (gallery3, 400, 300)
  1533. displayTextsmall ("its good to see you f--ked those invaders up and kicked them in to touch",4, 50)
  1534. EndIf
  1535. If spaciex>800 And spaciex<1000
  1536. DrawBlock (gallery4, 400, 300)
  1537. displayTextsmall ("email the highscore.dat file To us To get on the all time champion list",4, 50)
  1538. EndIf
  1539. If spaciex>1050 And spaciex<1300
  1540. DrawBlock (gallery5, 400, 300)
  1541. displayTextsmall ("see you later f--kers.....down at the arcade",158, 50)
  1542. EndIf
  1543.  
  1544.  
  1545. If beginspace<31 displaytextsmall ("hit space to play", 606, 590)
  1546.  
  1547.  
  1548. Flip
  1549. Until spaciex>1350
  1550.  
  1551. End Function
  1552.  
  1553.  
  1554. ;--------------------------options
  1555.  
  1556. Function options ()
  1557. stars=LoadImage ("stars1.png")
  1558.  
  1559. Repeat
  1560. starx = starx+1
  1561.  
  1562. If KeyHit (203)
  1563. difficulty = difficulty + 1
  1564. If difficulty > 1 difficulty = 0
  1565. EndIf
  1566.  
  1567. If KeyHit (205)
  1568. difficulty = difficulty + 1
  1569. If difficulty > 1 difficulty = 0
  1570. EndIf
  1571.  
  1572.  
  1573.  
  1574. Cls
  1575. TileBlock stars,starx,stary
  1576.  
  1577.  
  1578. display_text ("options", 284, 40)
  1579. displaytextsmall ("use arrow keys To change option", 229, 90)
  1580.  
  1581. If difficulty = 0
  1582. DrawImage powerupcircle, 303, 160
  1583. displaytextsmall ("difficulty - easy", 306 ,160)
  1584. displaytextsmall ("for the people who are quite happy To", 196,195)
  1585. displaytextsmall ("humiliate themselves without giving a f--k", 169,215)
  1586. displaytextsmall ("when playing easy you will be rewarded with", 163,235)
  1587. displaytextsmall ("5 extra ships on starting but the rest of the", 151,255)
  1588. displaytextsmall ("game remains unchanged choose this option If",158 ,275)
  1589. displaytextsmall ("you want - you damn pussy",262, 295)
  1590.  
  1591. EndIf
  1592.  
  1593. If difficulty = 1
  1594. DrawImage powerupcircle, 508, 160
  1595. displaytextsmall ("difficulty - hard", 306,160)
  1596. displaytextsmall ("for the evil mother f--kers among you", 196,195)
  1597. displaytextsmall ("hard is the only way to acumulate a trully", 169,215)
  1598. displaytextsmall ("kick ass score because unlike easy when the", 163,235)
  1599. displaytextsmall ("game is completed you will return to level", 169,255)
  1600. displaytextsmall ("one and continue to up your score - you start",151 ,275)
  1601. displaytextsmall ("the game with 4 lives",284, 295)
  1602.  
  1603. EndIf
  1604.  
  1605.  
  1606. displaytextsmall ("on the numeric keypad use 0 and 1 during play",152 , 400)
  1607. displayTextsmall ("to adjust music volume and 4 to skip a track",158 ,420)
  1608. displaytextsmall ("hit enter to exit", 306,500)
  1609.  
  1610. Flip
  1611. Until KeyDown (28) Or KeyDown (156)
  1612. FreeTimer (timer)
  1613. saveoptions ()
  1614. FlushKeys()
  1615. timer=CreateTimer(45)
  1616.  
  1617. End Function
  1618.  
  1619. ;--------------------------INTRO ANIMATIONS------------------------------------
  1620. Function animationone ()
  1621. If ChannelPlaying (rockradio) = 1
  1622. PauseChannel (rockradio)
  1623. EndIf
  1624. introframe = -1
  1625. intro = LoadAnimImage ("firstanimation.jpg", 320, 240, 0, 20)
  1626. timer=CreateTimer(10)
  1627. rocktv = PlayMusic ("animone.mp3")
  1628. Repeat
  1629. frames=WaitTimer(timer)
  1630.  
  1631. For k=1 To frames
  1632.  
  1633.  
  1634. introframe = introframe+1
  1635. If introframe>19 introframe=19
  1636. Next
  1637.  
  1638. Cls
  1639.  
  1640. DrawImage intro, 400, 300, introframe
  1641.  
  1642.  
  1643.  
  1644.  
  1645. Flip
  1646.  
  1647.  
  1648. Until KeyDown (1) = 1 Or introframe = 19
  1649. Delay 500
  1650. FreeImage intro
  1651. ResumeChannel (rockradio)
  1652.  
  1653. End Function
  1654.  
  1655. ;----------------------------------------
  1656. Function animationasteroid ()
  1657. If ChannelPlaying (rockradio) = 1
  1658. PauseChannel (rockradio)
  1659. EndIf
  1660. introframe = -1
  1661. intro = LoadAnimImage ("asteroidsanim.jpg", 320, 240, 0, 20)
  1662. timer=CreateTimer(10)
  1663. rocktv = PlayMusic ("asteroidanim.mp3")
  1664. Repeat
  1665. frames=WaitTimer(timer)
  1666.  
  1667. For k=1 To frames
  1668.  
  1669.  
  1670. introframe = introframe+1
  1671. If introframe>19 introframe=19
  1672. Next
  1673.  
  1674. Cls
  1675.  
  1676. DrawImage intro, 400, 300, introframe
  1677.  
  1678.  
  1679.  
  1680.  
  1681. Flip
  1682.  
  1683.  
  1684. Until KeyDown (1) = 1 Or introframe = 19
  1685. Delay 500
  1686. ResumeChannel (rockradio)
  1687. FreeImage intro
  1688.  
  1689. End Function
  1690.  
  1691. ;----------------------------------------
  1692. Function animationtwo ()
  1693. If ChannelPlaying (rockradio) = 1
  1694. PauseChannel (rockradio)
  1695. EndIf
  1696. introframe = -1
  1697. intro = LoadAnimImage ("secondanimation.jpg", 320, 240, 0, 20)
  1698. timer=CreateTimer(10)
  1699. rocktv = PlayMusic ("animtwo.mp3")
  1700. Repeat
  1701. frames=WaitTimer(timer)
  1702.  
  1703. For k=1 To frames
  1704.  
  1705.  
  1706. introframe = introframe+1
  1707. If introframe>19 introframe=19
  1708. Next
  1709.  
  1710. Cls
  1711.  
  1712. DrawImage intro, 400, 300, introframe
  1713.  
  1714.  
  1715.  
  1716.  
  1717. Flip
  1718.  
  1719.  
  1720. Until KeyDown (1) = 1 Or introframe = 19
  1721. Delay 500
  1722. FreeImage intro
  1723. ResumeChannel (rockradio)
  1724.  
  1725. End Function
  1726. ;----------------------------------------
  1727. Function animationthree ()
  1728. If ChannelPlaying (rockradio) = 1
  1729. PauseChannel (rockradio)
  1730. EndIf
  1731. introframe = -1
  1732. intro = LoadAnimImage ("thirdanimation.jpg", 320, 240, 0, 20)
  1733. timer=CreateTimer(10)
  1734. rocktv = PlayMusic ("animthree.mp3")
  1735. Repeat
  1736. frames=WaitTimer(timer)
  1737.  
  1738. For k=1 To frames
  1739.  
  1740.  
  1741. introframe = introframe+1
  1742. If introframe>19 introframe=19
  1743. Next
  1744.  
  1745. Cls
  1746.  
  1747. DrawImage intro, 400, 300, introframe
  1748.  
  1749.  
  1750.  
  1751.  
  1752. Flip
  1753.  
  1754.  
  1755. Until KeyDown (1) = 1 Or introframe = 19
  1756. Delay 500
  1757. FreeImage intro
  1758. ResumeChannel (rockradio)
  1759.  
  1760. End Function
  1761.  
  1762. ;--------------------------------------------------------------
  1763. Function animationfive ()
  1764. If ChannelPlaying (rockradio) = 1
  1765. PauseChannel (rockradio)
  1766. EndIf
  1767. introframe = -1
  1768. intro = LoadAnimImage ("shipchangeanim.jpg", 320, 240, 0, 40)
  1769. timer=CreateTimer(10)
  1770. rocktv=PlayMusic ("james86.mp3")
  1771. Repeat
  1772. frames=WaitTimer(timer)
  1773.  
  1774. For k=1 To frames
  1775.  
  1776.  
  1777. introframe = introframe+1
  1778. If introframe>39 introframe=39
  1779. Next
  1780.  
  1781. Cls
  1782.  
  1783. DrawImage intro, 400, 300, introframe
  1784.  
  1785.  
  1786.  
  1787.  
  1788. Flip
  1789.  
  1790.  
  1791. Until KeyDown (1) = 1 Or introframe = 39
  1792. Delay 1000
  1793. introframe=0
  1794. Repeat
  1795. frames=WaitTimer(timer)
  1796. For k=1 To frames
  1797. introframe = introframe+1
  1798. If introframe>74 introframe=74
  1799. Next
  1800.  
  1801. Cls
  1802. displaytextsmall ("please relax with this vintage entertainment while the", 103, 40)
  1803. displaytextsmall ("sludgefeast atmospheric cruiser prepares for departure", 103, 60)
  1804. DrawImage intro, 400, 300, 6
  1805.  
  1806. Flip
  1807.  
  1808.  
  1809. Until KeyDown (1) = 1 Or introframe = 74
  1810. FreeImage intro
  1811. ResumeChannel (rockradio)
  1812.  
  1813. End Function
  1814.  
  1815.  
  1816. ;--------------------------------------------------------------
  1817. Function animationsix ()
  1818. If ChannelPlaying (rockradio) = 1
  1819. PauseChannel (rockradio)
  1820. EndIf
  1821. introframe = -1
  1822. intro = LoadAnimImage ("atmosanim.jpg", 320, 240, 0, 20)
  1823. timer=CreateTimer(10)
  1824. rocktv = PlayMusic ("animsix.mp3")
  1825. Repeat
  1826. frames=WaitTimer(timer)
  1827.  
  1828. For k=1 To frames
  1829.  
  1830.  
  1831. introframe = introframe+1
  1832. If introframe>19 introframe=19
  1833. Next
  1834.  
  1835. Cls
  1836.  
  1837. DrawImage intro, 400, 300, introframe
  1838.  
  1839.  
  1840.  
  1841.  
  1842. Flip
  1843.  
  1844.  
  1845. Until KeyDown (1) = 1 Or introframe = 19
  1846. Delay 500
  1847. FreeImage intro
  1848. ResumeChannel (rockradio)
  1849.  
  1850. End Function
  1851.  
  1852.  
  1853.  
  1854.  
  1855. ;-----------------------INITIALIZE LEVEL---------------------------------------
  1856.  
  1857. Function initializelevel()
  1858.  
  1859. ;If level>1
  1860. FreeTimer (timer)
  1861.  
  1862. Cls
  1863. Flip
  1864.  
  1865.  
  1866.  
  1867.  
  1868. If level = 1 background = space
  1869.  
  1870. If level = 6 background = space2
  1871. If level = 11 background = space3
  1872. If level = 16 background = space4
  1873. If level = 21 background = space5
  1874. If level = 26 background = space6
  1875. If level = 31 background = space7
  1876. If level = 36 background = stars
  1877. If level > 38 background = space8
  1878.  
  1879.  
  1880. If level = 1 czone = czone1
  1881. If level = 11 czone = czone2
  1882. If level = 21 czone = czone3
  1883. If level = 31 czone = czone4
  1884.  
  1885.  
  1886. ufornd = 30
  1887.  
  1888. For a.ufo = Each ufo
  1889. Delete a
  1890. If ChannelPlaying (ufochannel) <> 0 Then
  1891. StopChannel (ufochannel)
  1892. EndIf
  1893. Next
  1894. For b.powerup=Each powerup
  1895. Delete b
  1896. Next
  1897. For c.missile = Each missile
  1898. Delete c
  1899. Next
  1900. For d.bomb = Each bomb
  1901. Delete d
  1902. Next
  1903. For e.firebomb = Each firebomb
  1904. Delete e
  1905. Next
  1906. For f.tribomb = Each tribomb
  1907. Delete f
  1908. Next
  1909. For g.boomerangbomb = Each boomerangbomb
  1910. Delete g
  1911. Next
  1912. For h.asteroid = Each asteroid
  1913. Delete h
  1914. Next
  1915. For i.sludgebomb = Each sludgebomb
  1916. Delete i
  1917. Next
  1918. For j.doublebomb = Each doublebomb
  1919. Delete j
  1920. Next
  1921. For m.pubbomb = Each pubbomb
  1922. Delete m
  1923. Next
  1924. For n.pubbeam = Each pubbeam
  1925. Delete n
  1926. Next
  1927. For o.punlazer = Each punlazer
  1928. Delete o
  1929. Next
  1930.  
  1931. For p.explosion = Each explosion
  1932. Delete p
  1933. Next
  1934.  
  1935.  
  1936. For r.shipbomb = Each shipbomb
  1937. Delete r
  1938. Next
  1939. For t.bluebomb = Each bluebomb
  1940. Delete t
  1941. Next
  1942. For u.bombone = Each bombone
  1943. Delete u
  1944. Next
  1945.  
  1946.  
  1947.  
  1948.  
  1949.  
  1950. If level = 10 boss=1
  1951. If level = 20 boss = 1
  1952. If level = 30 boss = 1
  1953. If level = 40 boss = 1
  1954. exx=MilliSecs()
  1955. Repeat
  1956. exy=MilliSecs()
  1957. Cls
  1958. DrawImage czone,400, 300
  1959. display_text("level"+level,540,570)
  1960.  
  1961.  
  1962.  
  1963.  
  1964. Flip
  1965. Until exx-exy< -1500
  1966. If level = 10 createboss1 ()
  1967. If level = 20 createboss2 ()
  1968. If level = 30 createboss3 ()
  1969. If level = 40 createboss4 ()
  1970. If boss=0 initializealien()
  1971. initializeframecounter ()
  1972.  
  1973. If level = 1 animationone ()
  1974. If level = 5 animationasteroid ()
  1975. If level = 11 animationtwo ()
  1976. If level = 21 animationthree ()
  1977. If level = 38 animationfive ()
  1978. If level = 39 animationsix ()
  1979.  
  1980. FlushKeys
  1981.  
  1982. timer=CreateTimer(45)
  1983.  
  1984. End Function
  1985. ;-------------------------musicfunction--------------------------
  1986. Function checkmusic ()
  1987. If KeyDown(79)
  1988. If musicvol <1
  1989. musicvol = musicvol + .01
  1990. ChannelVolume rockradio, musicvol
  1991. EndIf
  1992. EndIf
  1993.  
  1994. If KeyDown(82)
  1995. musicvol = musicvol - .01
  1996. If musicvol < 0 musicvol = 0
  1997. ChannelVolume rockradio, musicvol
  1998. EndIf
  1999.  
  2000. If KeyHit(75)
  2001. If ChannelPlaying (rockradio) = 1 StopChannel rockradio
  2002. EndIf
  2003.  
  2004.  
  2005.  
  2006.  
  2007. If musicvol>0
  2008. If ChannelPlaying (rockradio) = 0
  2009. songnum = songnum+1
  2010. If songnum>11 songnum = 0
  2011. If songnum = 0 rockradio = PlayMusic ("spaceinvadersthemetune.mp3")
  2012. If songnum = 1 rockradio = PlayMusic ("fuckrockn roll.mp3")
  2013. If songnum = 2 rockradio = PlayMusic ("E-G-A.mp3")
  2014. If songnum = 3 rockradio = PlayMusic ("wanna ride .mp3")
  2015. If songnum = 4 rockradio = PlayMusic ("1978.mp3")
  2016. If songnum = 5 rockradio = PlayMusic ("instrumental10.mp3")
  2017. If songnum = 6 rockradio = PlayMusic ("outofcontrol.mp3")
  2018. If songnum = 7 rockradio = PlayMusic ("righton(alt mix).mp3")
  2019. If songnum = 8 rockradio = PlayMusic ("rock'n'rollbitch.mp3")
  2020. If songnum = 9 rockradio = PlayMusic ("headin'for someaction .mp3")
  2021. If songnum = 10 rockradio = PlayMusic ("andys3 (alt mix).mp3")
  2022. If songnum = 11 rockradio = PlayMusic ("1971(I'vegotitgoin'on).mp3")
  2023. ChannelVolume rockradio, musicvol
  2024. EndIf
  2025. EndIf
  2026.  
  2027. End Function
  2028.  
  2029. ;-------------------------textfunction------------------------
  2030. Function display_text(txt$,tx,ty)
  2031. txt$ = Upper$(txt$) ; make uppercase
  2032. For x = 1 To Len(txt$) ; go through all letters
  2033. ch$ = Mid$(txt$,x,1) ; get letter
  2034. char = Asc(ch$) - 32 ; find sprite number
  2035. ; display letter
  2036. DrawImage feastfont,tx + (x * 33),ty,char
  2037. Next
  2038. End Function
  2039.  
  2040. ;-----------------------
  2041.  
  2042. Function displaytextsmall(txt$,tx,ty)
  2043. txt$ = Upper$(txt$) ; make uppercase
  2044. For x = 1 To Len(txt$) ; go through all letters
  2045. ch$ = Mid$(txt$,x,1) ; get letter
  2046. Select ch$
  2047. Case "-"
  2048. char = 14
  2049. Case "?"
  2050. char = 30
  2051. End Select
  2052. char = Asc(ch$) - 32 ; find sprite number
  2053. ; display letter
  2054. DrawImage feastfontsmall,tx + (x * 11),ty,char
  2055. Next
  2056. End Function
  2057.  
  2058.  
  2059. ;-----------------------PLAYER FUNCTIONS---------------------------------------
  2060. Function initializeplayer ()
  2061. p.player = New player
  2062. p\x = x
  2063. p\y = y
  2064. If difficulty = 1 p\lives=3
  2065. If difficulty = 0 p\lives=8
  2066. p\alive=1
  2067. p\invinc=0
  2068. p\extralives=1000
  2069. p\score=0
  2070. playerlives = 1
  2071. playernewscore = 0
  2072. End Function
  2073.  
  2074. Function updateplayer ()
  2075. For p.player = Each player
  2076. If KeyDown (203) = 1 Then p\x = p\x - s
  2077. If KeyDown (205) = 1 Then p\x = p\x + s
  2078. If p\x>770 Then p\x = 770
  2079. If p\x<30 Then p\x = 30
  2080. If p\invinc=99
  2081. maxmissiles = 0
  2082. p\barnardbeam = 0
  2083. p\brunsdonbomb = 0
  2084. p\nazerlazer = 0
  2085. EndIf
  2086. If KeyHit (57) = 1 And p\alive = 1 Then FireMissile (fire, p\x , p\y - 10 )
  2087. If KeyHit (184)
  2088. If boss = 1 powerupchannel = PlaySound (noshot)
  2089. If boss = 0
  2090. If p\brunsdonbomb > 0 firebbomb (p\x, p\y - 10) : p\brunsdonbomb = 0
  2091. If p\nazerlazer > 0 firenlazer (p\x, p\y - 10): p\nazerlazer = p\nazerlazer - 1
  2092. If p\barnardbeam > 0 firebbeam (): p\barnardbeam = 0
  2093. EndIf
  2094. EndIf
  2095. If (p\score*100/1000) > p\extralives
  2096. p\lives=p\lives+1
  2097. If p\score>250000 p\extralives = p\extralives+1000
  2098. If p\score>350000 p\extralives = p\extralives+3000
  2099. p\extralives=p\extralives+1000
  2100. EndIf
  2101. If p\invinc >0 p\invinc=p\invinc-1
  2102. Next
  2103. End Function
  2104.  
  2105.  
  2106. Function drawplayer ()
  2107. For p.player = Each player
  2108. If p\alive=1 And playerlives>0
  2109. If level < 38
  2110. If p\invinc = 0 DrawImage ship, p\x, p\y
  2111. If p\invinc <>0
  2112. If (p\invinc>0 And p\invinc<11) DrawImage shipcreate, p\x, p\y, 9
  2113. If (p\invinc>10 And p\invinc<21) DrawImage shipcreate, p\x, p\y, 8
  2114. If (p\invinc>20 And p\invinc<31) DrawImage shipcreate, p\x, p\y, 7
  2115. If (p\invinc>30 And p\invinc<41) DrawImage shipcreate, p\x, p\y, 6
  2116. If (p\invinc>40 And p\invinc<51) DrawImage shipcreate, p\x, p\y, 5
  2117. If (p\invinc>50 And p\invinc<61) DrawImage shipcreate, p\x, p\y, 4
  2118. If (p\invinc>60 And p\invinc<71) DrawImage shipcreate, p\x, p\y, 3
  2119. If (p\invinc>70 And p\invinc<81) DrawImage shipcreate, p\x, p\y, 2
  2120. If (p\invinc>80 And p\invinc<91) DrawImage shipcreate, p\x, p\y, 1
  2121. If (p\invinc>90 And p\invinc<101) DrawImage shipcreate, p\x, p\y, 0
  2122. EndIf
  2123. EndIf
  2124. EndIf
  2125. If p\alive = 1
  2126. If level = 38
  2127. DrawImage shipvintage, p\x, p\y
  2128. ;If p\invinc = 0 DrawImage ship, p\x, p\y
  2129. EndIf
  2130.  
  2131.  
  2132. If level > 38
  2133. If p\invinc > 0 DrawImage ship22, p\x, p\y
  2134. If p\invinc = 0 DrawImage ship2, p\x, p\y
  2135. EndIf
  2136. EndIf
  2137. displaytextsmall ("ships", 20, 20)
  2138. For t = 1 To p\lives
  2139. DrawImage shipsmall, 75 + (25*t), 18
  2140. Next
  2141. displaytextsmall ("score "+p\score, 600, 20)
  2142.  
  2143. If p\brunsdonbomb > 0 Or p\nazerlazer > 0 Or p\barnardbeam > 0
  2144. DrawImage powerupcircle, 485, 21, (animframe)
  2145. If animframethree = 1 DrawImage powerupflash, 545, 21
  2146. EndIf
  2147. Next
  2148. End Function
  2149.  
  2150. ;-----------------------------------UFO FUNCTIONS--------------------------------------
  2151.  
  2152.  
  2153. Function checkufo ()
  2154. If ufornd<300
  2155. ufornd= Rnd (300)
  2156. If ufornd = 300
  2157. ufochannel = PlaySound (ufosound)
  2158. a.ufo = New ufo
  2159. a\x=-69
  2160. a\animationstart=MilliSecs()
  2161. EndIf
  2162. EndIf
  2163. End Function
  2164.  
  2165. Function updateufo ()
  2166. For a.ufo= Each ufo
  2167. newtime=MilliSecs()
  2168. A\time_elapsed=newtime-A\AnimationStart
  2169. If A\time_elapsed > 50
  2170. a\frame = a\frame + 1
  2171. If A\Frame > 15
  2172. A\Frame = 0
  2173. EndIf
  2174. A\AnimationStart=MilliSecs()
  2175. EndIf
  2176.  
  2177. a\x = a\x+5
  2178. If a\x >835
  2179. Delete a
  2180. If ChannelPlaying (ufochannel) <> 0 Then
  2181. StopChannel (ufochannel)
  2182. EndIf
  2183.  
  2184. ufornd = Rnd(300)
  2185. EndIf
  2186. For b.Missile = Each Missile
  2187. If a <> Null
  2188. If ImagesCollide ( fire,b\x,b\y, 0, ufo,a\x,20, 0 )
  2189. exx = A\x
  2190. exy = 20
  2191. Delete a
  2192. Delete b
  2193. If ChannelPlaying (ufochannel) <> 0 Then
  2194. StopChannel (ufochannel)
  2195. EndIf
  2196. ufochannel = PlaySound (ufoexpsound)
  2197. expkind=1
  2198. createexplosion ()
  2199. If level < 38 Or level>38
  2200. createpowerup ()
  2201. EndIf
  2202. ufornd = Rnd (9)
  2203. For p.player = Each player
  2204. If ufornd < 3
  2205. p\score = p\score+150
  2206. bombx = 150
  2207. createufoscore ()
  2208. EndIf
  2209. If ufornd > 2 And ufornd < 5
  2210. p\score = p\score+300
  2211. bombx = 300
  2212. createufoscore ()
  2213. EndIf
  2214. If ufornd > 4 And ufornd < 7
  2215. p\score = p\score+400
  2216. bombx = 400
  2217. createufoscore ()
  2218. EndIf
  2219. If ufornd > 6 And ufornd < 9
  2220. p\score = p\score+500
  2221. bombx = 500
  2222. createufoscore ()
  2223. EndIf
  2224. If ufornd = 9
  2225. p\score = p\score+800
  2226. bombx = 150
  2227. createufoscore ()
  2228. EndIf
  2229. Next
  2230. ufornd = Rnd(300)
  2231. EndIf
  2232. EndIf
  2233. Next
  2234. Next
  2235. End Function
  2236.  
  2237. Function drawufo ()
  2238. For u.ufo=Each ufo
  2239. If level<38
  2240. DrawImage ufo, u\x, 20,u\frame
  2241. EndIf
  2242. If level=38
  2243. DrawImage ufovintage, u\x, 20
  2244. EndIf
  2245. If level>38
  2246. DrawImage ufoalt, u\x, 20
  2247. EndIf
  2248.  
  2249. Next
  2250. End Function
  2251. ;-----------------------------------------UFOSCORE
  2252. Function createufoscore ()
  2253. u.ufoscore=New ufoscore
  2254. u\x = exx-20
  2255. If u\x>750 u\x=750
  2256. If u\x<1 u\x= 1
  2257. u\y = exy+15
  2258. u\txt$ = ""+bombx
  2259. u\fr=0
  2260. End Function
  2261.  
  2262. Function updateufoscore ()
  2263. For u.ufoscore = Each ufoscore
  2264. u\fr = u\fr+1
  2265. If u\fr>40
  2266. Delete u
  2267. EndIf
  2268. Next
  2269. End Function
  2270.  
  2271. Function drawufoscore ()
  2272. For u.ufoscore = Each ufoscore
  2273. displaytextsmall(u\txt$,u\x,u\y)
  2274. Next
  2275. End Function
  2276.  
  2277. ;-------------------------------POWERUP FUNCTIONS-----------------------------------------------
  2278.  
  2279. Function createpowerup ()
  2280. u.powerup = New powerup
  2281. u\x=exx
  2282. If u\x > 788 u\x = 788
  2283. If u\x < 12 u\x = 12
  2284. u\y=exy
  2285. u\kind = Rnd (3)
  2286. End Function
  2287.  
  2288. Function updatepowerup ()
  2289. For u.powerup = Each powerup
  2290. If u <> Null
  2291.  
  2292. u\y=u\y+2
  2293. If u\y>618 Delete u
  2294. EndIf
  2295.  
  2296.  
  2297. For p.player = Each player
  2298. If u <> Null
  2299. If ImagesCollide ( ship,p\x,p\y, 0, bbomb,u\x,u\y, 0 ) And p\alive = 1
  2300. If u\kind = 0 p\brunsdonbomb=1 : p\barnardbeam=0 : p\nazerlazer=0
  2301. If u\kind = 1 p\barnardbeam=1 :p\brunsdonbomb=0 : p\nazerlazer=0
  2302. If u\kind = 2 maxmissiles=1
  2303. If u\kind = 3 p\nazerlazer=2 : p\brunsdonbomb=0 : p\barnardbeam=0
  2304. Delete u
  2305. powerupchannel = PlaySound (powerupsound)
  2306. EndIf
  2307. EndIf
  2308.  
  2309.  
  2310. Next
  2311. Next
  2312. End Function
  2313.  
  2314. Function drawpowerup ()
  2315. For u.powerup = Each powerup
  2316. If u <> Null
  2317. If u\kind = 0
  2318. DrawImage bbomb, u\x, u\y
  2319. EndIf
  2320. If u\kind = 1
  2321. DrawImage bbeam, u\x, u\y
  2322. EndIf
  2323. If u\kind = 2
  2324. DrawImage ddshot, u\x, u\y
  2325. EndIf
  2326. If u\kind = 3
  2327. DrawImage nlazer, u\x, u\y
  2328. EndIf
  2329. EndIf
  2330. Next
  2331. End Function
  2332. ;-----------------------------------brunsdonbomb-------------------------------------
  2333.  
  2334. Function firebbomb (xposition, yposition)
  2335. a.pubbomb = New pubbomb
  2336. missilechannel = PlaySound (missilesound)
  2337. a\x = xposition
  2338. a\y = yposition
  2339. a\state = 0
  2340. a\frame = 0
  2341. End Function
  2342.  
  2343. Function Updatebbomb ()
  2344. For b.pubbomb = Each pubbomb
  2345. If b <> Null
  2346. If b\state = 1
  2347. For a.alien = Each alien
  2348. If a <> Null
  2349. If ImagesOverlap ( sfalien,A\x,A\y, bbombexppic, b\x, b\y )
  2350. exx = A\x
  2351. exy = A\y
  2352. aliensalive = aliensalive-1
  2353. checkalienstep()
  2354. For p.player=Each player
  2355. p\score=p\score+75
  2356. Next
  2357. If expcount = 0
  2358. explosionchannel = PlaySound (explosionsound)
  2359. expcount = expcountmax
  2360. EndIf
  2361. expkind = 0
  2362. createexplosion ()
  2363. Delete a
  2364. EndIf
  2365. EndIf
  2366. Next
  2367. newtime=MilliSecs()
  2368. b\timeelapsed=newtime-b\animationstart
  2369. If b\timeelapsed > 50
  2370. b\frame = b\frame + 1
  2371. b\animationstart=MilliSecs ()
  2372. If b\Frame > 15
  2373. b\y = -1
  2374. EndIf
  2375. EndIf
  2376. EndIf
  2377.  
  2378. If b\state = 0
  2379. b\y=b\y - 10
  2380. For a.alien = Each alien
  2381. If a <> Null
  2382. If ImagesCollide ( sfalien,A\x,A\y, 0, bbombpic, b\x, b\y, 0 )
  2383. exx = A\x
  2384. exy = A\y
  2385. aliensalive = aliensalive-1
  2386. checkalienstep()
  2387. explosionchannel = PlaySound (explosionsound)
  2388. For p.player=Each player
  2389. p\score=p\score+75
  2390. Next
  2391. expkind = 0
  2392. createexplosion ()
  2393. Delete a
  2394. b\state=1
  2395. missilechannel = PlaySound (bbombsound)
  2396. b\animationstart = MilliSecs ()
  2397. EndIf
  2398. EndIf
  2399. Next
  2400. EndIf
  2401. EndIf
  2402.  
  2403. If b\y < 0 Then Delete b
  2404. Next
  2405.  
  2406.  
  2407. End Function
  2408.  
  2409. Function drawbbomb ()
  2410. For a.pubbomb = Each pubbomb
  2411. If a <> Null
  2412. If a\state=0 DrawImage bbombpic, a\x, a\y
  2413. If a\state = 1 DrawImage bbombexppic, a\x, a\y, (a\frame)
  2414.  
  2415. EndIf
  2416.  
  2417. Next
  2418. End Function
  2419.  
  2420.  
  2421. ;---------------------------------NAZERLAZER-----------------------------
  2422.  
  2423. Function firenlazer (xposition, yposition)
  2424. a.punlazer = New punlazer
  2425. powerupchannel = PlaySound (nlazersound)
  2426. a\x = xposition
  2427. a\y = yposition
  2428. End Function
  2429.  
  2430. Function Updatenlazer ()
  2431. For b.punlazer = Each punlazer
  2432. If b <> Null
  2433. For a.alien = Each alien
  2434. If a <> Null
  2435. If ImagesCollide ( sfalien,A\x,A\y, 0, nlazerpic, b\x, b\y, 0 )
  2436. exx = A\x
  2437. exy = A\y
  2438. aliensalive = aliensalive-1
  2439. checkalienstep()
  2440. If expcount = 0
  2441. explosionchannel = PlaySound (explosionsound)
  2442. expcount = expcountmax
  2443. EndIf
  2444. For p.player=Each player
  2445. p\score=p\score+75
  2446. Next
  2447. expkind = 0
  2448. createexplosion ()
  2449. Delete a
  2450. EndIf
  2451. EndIf
  2452. Next
  2453. b\y=b\y - 15
  2454. If b\y < 0 Delete b
  2455.  
  2456. EndIf
  2457. Next
  2458. End Function
  2459.  
  2460. Function drawnlazer ()
  2461. For a.punlazer = Each punlazer
  2462. If a <> Null
  2463. DrawImage nlazerpic, a\x, a\y
  2464. EndIf
  2465.  
  2466. Next
  2467. End Function
  2468.  
  2469. ;----------------------BARNARDBEAM---------------------------------
  2470. Function firebbeam ()
  2471. a.pubbeam = New pubbeam
  2472. powerupchannel = PlaySound (bbeamsound)
  2473. a\y = 275
  2474. a\state = 0
  2475. a\frame = 0
  2476. a\animationstart = MilliSecs ()
  2477. End Function
  2478.  
  2479. Function Updatebbeam ()
  2480. For b.pubbeam = Each pubbeam
  2481. If b <> Null
  2482. For p.player = Each player
  2483. b\x = p\x
  2484. If p\alive = 0 Delete b
  2485. Next
  2486. If b <> Null
  2487. For a.alien = Each alien
  2488. If a <> Null
  2489. If ImagesOverlap ( sfalien,A\x,A\y, bbeampic, b\x, b\y )
  2490. exx = A\x
  2491. exy = A\y
  2492. aliensalive = aliensalive-1
  2493. checkalienstep()
  2494. If expcount = 0
  2495. explosionchannel = PlaySound (explosionsound)
  2496. expcount = expcountmax
  2497. EndIf
  2498.  
  2499. For p.player=Each player
  2500. p\score=p\score+75
  2501. Next
  2502. expkind = 0
  2503. createexplosion ()
  2504. Delete a
  2505. EndIf
  2506. EndIf
  2507. Next
  2508. newtime=MilliSecs()
  2509. b\timeelapsed=newtime-b\animationstart
  2510. If b\timeelapsed > 200
  2511. Delete b
  2512. EndIf
  2513.  
  2514. EndIf
  2515. EndIf
  2516. Next
  2517.  
  2518.  
  2519. End Function
  2520.  
  2521. Function drawbbeam ()
  2522. For a.pubbeam = Each pubbeam
  2523. If a <> Null
  2524. DrawImage bbeampic, a\x, a\y
  2525.  
  2526. EndIf
  2527.  
  2528. Next
  2529. End Function
  2530.  
  2531.  
  2532. ;-------------------------------ASTEROID FUNCTIONS------------------------------------
  2533. Function checkasteroid()
  2534. If level = 5 exx = Rnd (100)
  2535. If level = 15 exx = Rnd (75)
  2536. If level = 25 exx = Rnd (50)
  2537. If level = 35 exx = Rnd (25)
  2538. If exx=10
  2539. a.asteroid = New asteroid
  2540. a\x = Rnd (800)
  2541. a\y = 0
  2542. a\frame = Rnd (4)
  2543. End If
  2544. End Function
  2545.  
  2546. Function updateasteroid ()
  2547. For a.asteroid=Each asteroid
  2548. a\y=a\y+4
  2549. a\x=a\x+3
  2550. If a\x>800 a\x=0
  2551. If a\y>600 Delete a
  2552. For p.player= Each player
  2553. If a <> Null
  2554. If ImagesCollide ( ship,p\x,p\y, 0, fbomb,a\x,a\y, 0 ) And p\invinc=0 And p\alive=1
  2555. exx=p\x
  2556. exy=p\y
  2557. p\alive=0
  2558. expkind=3
  2559. shipexplosion ()
  2560. Delete a
  2561. EndIf
  2562. EndIf
  2563. Next
  2564. Next
  2565. End Function
  2566.  
  2567. Function drawasteroid ()
  2568. For a.asteroid=Each asteroid
  2569. DrawImage asteroidbomb, a\x, a\y, (a\frame)
  2570. Next
  2571. End Function
  2572.  
  2573. ;-------------------------------MISSILE FUNCTION---------------------------------------
  2574.  
  2575.  
  2576. Function FireMissile (image, xposition, yposition)
  2577. If maxmissiles = -1 Or missilecount < maxmissiles ;(-1)
  2578. a.missile = New missile
  2579. missilechannel = PlaySound (missilesound)
  2580. a\image = image
  2581. a\x = xposition
  2582. a\y = yposition
  2583. EndIf
  2584. End Function
  2585.  
  2586. Function UpdateMissiles ()
  2587. missilecount = -1
  2588. For a.missile = Each missile
  2589. If a <> Null
  2590. missilecount = missilecount + 1
  2591. a\y = a\y - missilestep
  2592. If a\y < 0 Then Delete a
  2593. EndIf
  2594.  
  2595. Next
  2596. End Function
  2597.  
  2598. Function drawmissiles ()
  2599. For a.missile = Each missile
  2600. If a <> Null
  2601. If level<38 Or level>38
  2602. DrawImage a\image, a\x, a\y
  2603. EndIf
  2604. If level = 38
  2605. DrawImage firevintage, a\x, a\y
  2606. EndIf
  2607. EndIf
  2608.  
  2609. Next
  2610. End Function
  2611. ;----------------------INITIALIZE FRAME COUNTER
  2612.  
  2613. Function initializeframecounter ()
  2614. animationstart=MilliSecs
  2615. animationtimer=50
  2616. End Function
  2617.  
  2618.  
  2619. Function updateframecounter ()
  2620. newtime=MilliSecs()
  2621. timeelapsed=newtime-AnimationStart
  2622. If timeelapsed > AnimationTimer
  2623. animframe = animframe + 1
  2624. animframetwo = animframetwo + 1
  2625. If animFrame > 7
  2626. animFrame = 0
  2627. EndIf
  2628. If animframetwo > 15
  2629. animframetwo = 0
  2630. EndIf
  2631. AnimationStart=MilliSecs()
  2632. EndIf
  2633. If animframe < 4 animframethree = 0
  2634. If animframe > 3 animframethree = 1
  2635. End Function
  2636. ;----------------------INITIALIZE ALIEN------------------------------------------
  2637.  
  2638. Function InitializeAlien()
  2639. If level = 1 Restore level1
  2640. If level = 2 Restore level2
  2641. If level = 3 Restore level3
  2642. If level = 4 Restore level4
  2643. If level = 5 Restore level5
  2644. If level = 6 Restore level6
  2645. If level = 7 Restore level7
  2646. If level = 8 Restore level8
  2647. If level = 9 Restore level9
  2648. If level = 11 Restore level11
  2649. If level = 12 Restore level12
  2650. If level = 13 Restore level13
  2651. If level = 14 Restore level14
  2652. If level = 15 Restore level15
  2653. If level = 16 Restore level16
  2654. If level = 17 Restore level17
  2655. If level = 18 Restore level18
  2656. If level = 19 Restore level19
  2657. If level = 21 Restore level21
  2658. If level = 22 Restore level22
  2659. If level = 23 Restore level23
  2660. If level = 24 Restore level24
  2661. If level = 25 Restore level25
  2662. If level = 26 Restore level26
  2663. If level = 27 Restore level27
  2664. If level = 28 Restore level28
  2665. If level = 29 Restore level29
  2666. If level = 31 Restore level31
  2667. If level = 32 Restore level32
  2668. If level = 33 Restore level33
  2669. If level = 34 Restore level34
  2670. If level = 35 Restore level35
  2671. If level = 36 Restore level36
  2672. If level = 37 Restore level37
  2673. If level = 38 Restore level38
  2674. If level = 39 Restore level39
  2675.  
  2676. For t = 1 To 12 : For h = 1 To 4
  2677. a.alien = New Alien
  2678. a\x = 20+spacer * t
  2679. a\y = 20+spacer * h
  2680. direction=0
  2681. a\frame = 0
  2682. Read a\kind
  2683. aliensalive = aliensalive+1
  2684. If a\kind=99 Delete a : aliensalive=aliensalive-1
  2685. Next : Next
  2686.  
  2687. End Function
  2688.  
  2689.  
  2690.  
  2691. ;---------------------DIRECT ALIEN--------------------------
  2692. Function directalien ()
  2693. For a.alien = Each alien
  2694. If A\X > 780 Then
  2695. direction = 1
  2696. dropq = 1
  2697. EndIf
  2698.  
  2699. If A\x < 20 Then
  2700. direction=0
  2701. dropq = 1
  2702. EndIf
  2703.  
  2704. If a\y > 540 upaliens ()
  2705.  
  2706. Next
  2707. End Function
  2708.  
  2709. Function upaliens ()
  2710. For a.alien = Each alien
  2711. a\y = a\y-150
  2712. Next
  2713. For p.player= Each player
  2714. If p\invinc=0
  2715. exx=p\x
  2716. exy=p\y
  2717. p\alive=0
  2718. expkind=3
  2719. shipexplosion ()
  2720. EndIf
  2721. Next
  2722.  
  2723.  
  2724. End Function
  2725.  
  2726. Function directalien2 ()
  2727. If dropq = 1 And direction = 1 Then
  2728. astep = -astep
  2729. EndIf
  2730.  
  2731.  
  2732. If direction=0 And dropq = 1Then
  2733. astep = -astep
  2734. EndIf
  2735. End Function
  2736.  
  2737.  
  2738.  
  2739. ;---------------------------UPDATE ALIEN----------------------------
  2740. Function UpdateAlien()
  2741. For a.alien = Each alien
  2742.  
  2743. a\x = a\x + astep
  2744.  
  2745.  
  2746. ;------------sfalien
  2747. ;If a\kind = 0
  2748. ;newtime=MilliSecs()
  2749. ;A\time_elapsed=newtime-A\AnimationStart
  2750. ;If A\time_elapsed > A\AnimationTimer
  2751. ;a\frame = a\frame + 1
  2752. ; If A\Frame > 7
  2753. ; A\Frame = 0
  2754. ; EndIf
  2755. ; A\AnimationStart=MilliSecs()
  2756. ; EndIf
  2757.  
  2758. ;EndIf
  2759. ;------------blobalien
  2760. If a\kind = 1
  2761. If a\brnd<100
  2762. a\brnd = Rnd (100)
  2763. EndIf
  2764. If a\brnd = 100 Then
  2765. newtime=MilliSecs()
  2766. A\time_elapsed=newtime-A\AnimationStart
  2767. If A\time_elapsed > A\AnimationTimer
  2768. A\Frame = A\Frame + 1
  2769. If A\Frame > 8
  2770. A\Frame = 0 : a\brnd= Rnd (100)
  2771. EndIf
  2772. A\AnimationStart=MilliSecs()
  2773. EndIf
  2774.  
  2775. EndIf
  2776. If a\frame = 4 Then bombx=a\x - 10 : bomby = a\y: droptripplebomb () : a\frame=5
  2777.  
  2778.  
  2779. EndIf
  2780. ;-------------lightningalien
  2781. If a\kind = 2
  2782. If a\brnd<100
  2783. a\brnd = Rnd (100)
  2784. EndIf
  2785. If a\brnd = 100 Then
  2786. newtime=MilliSecs()
  2787. A\time_elapsed=newtime-A\AnimationStart
  2788. If A\time_elapsed > A\AnimationTimer
  2789. A\Frame = A\Frame + 1
  2790.  
  2791. If a\frame = 4 Then a\extratime = MilliSecs ()
  2792. If newtime - a\extratime < 1350 : a\frame = 6
  2793. If newtime - a\extratime < 350 : a\frame = 5
  2794. EndIf
  2795. EndIf
  2796.  
  2797. If A\Frame > 8
  2798. A\Frame = 0 : a\brnd= Rnd (100)
  2799. EndIf
  2800. A\AnimationStart=MilliSecs()
  2801. EndIf
  2802.  
  2803. EndIf
  2804.  
  2805. If a\frame = 6
  2806. a\alienvariable = a\y+58
  2807.  
  2808. a\alienva = a\alienva+1
  2809. If a\alienva=20 a\alienva = 0
  2810. If a\alienva<10 a\alienv=0
  2811. If a\alienva>10 a\alienv=1
  2812.  
  2813.  
  2814. EndIf
  2815.  
  2816.  
  2817. EndIf
  2818. ;------------domealien/gyro
  2819. If a\kind = 3 Or a\kind = 29 Or a\kind = 30 Or a\kind = 31
  2820. a\brnd = Rnd (300)
  2821. If a\brnd = 100 : bombx=a\x-20 : bomby = a\y
  2822. dropbomb ()
  2823. EndIf
  2824. EndIf
  2825.  
  2826.  
  2827.  
  2828. ;--------------------ashdowncabalien
  2829. If a\kind = 5 Or a\kind = 23
  2830. a\brnd = Rnd (150)
  2831. If a\brnd = 150 : bombx=a\x : bomby = a\y
  2832. dropbomb ()
  2833. EndIf
  2834. EndIf
  2835.  
  2836. ;------------custom
  2837. If a\kind = 7 Or a\kind = 25 Or a\kind = 26 Or a\kind = 27
  2838. a\brnd = Rnd (600)
  2839. If a\brnd = 100 : bombx=a\x : bomby = a\y
  2840. dropbomb ()
  2841. EndIf
  2842. EndIf
  2843.  
  2844. ;------------top20alien
  2845. If a\kind = 10 Or a\kind = 15
  2846. a\brnd = Rnd (400)
  2847. If a\brnd = 100 : bombx=a\x : bomby = a\y
  2848. dropdoublebomb ()
  2849. EndIf
  2850. EndIf
  2851.  
  2852. ;------------custom
  2853. If a\kind = 11 Or a\kind = 16 Or a\kind = 17
  2854. a\brnd = Rnd (400)
  2855. If a\brnd = 100 : bombx=a\x : bomby = a\y
  2856. dropbomb ()
  2857. EndIf
  2858. EndIf
  2859. ;------------six
  2860. If a\kind = 13
  2861. a\brnd = Rnd (300)
  2862. If a\brnd = 100 : bombx=a\x : bomby = a\y
  2863. dropfirebomb ()
  2864. EndIf
  2865. EndIf
  2866. ;------------greenwindow
  2867. If a\kind = 14
  2868. a\brnd = Rnd (600)
  2869. If a\brnd = 100 : bombx=a\x : bomby = a\y
  2870. dropsludgebomb ()
  2871. EndIf
  2872. EndIf
  2873. ;------------dome
  2874. If a\kind = 8
  2875. a\brnd = Rnd (800)
  2876. If a\brnd = 100 : bombx=a\x : bomby = a\y
  2877. dropsludgebomb ()
  2878. EndIf
  2879. If a\brnd = 200 : bombx=a\x : bomby = a\y
  2880. dropbomb ()
  2881. EndIf
  2882. EndIf
  2883. ;-----------blueballs
  2884. If a\kind = 18
  2885. a\brnd = Rnd (300)
  2886. If a\brnd = 100 : bombx=a\x : bomby = a\y
  2887. dropbluebomb ()
  2888. EndIf
  2889. EndIf
  2890.  
  2891. ;-----------chromering
  2892. If a\kind = 20
  2893. a\brnd = Rnd (200)
  2894. If a\brnd = 100 : bombx=a\x : bomby = a\y
  2895. dropbluebomb ()
  2896. EndIf
  2897. EndIf
  2898. ;-----------bluealien
  2899. If a\kind = 22
  2900. a\brnd = Rnd (250)
  2901. If a\brnd = 100 : bombx=a\x : bomby = a\y
  2902. dropfirebomb ()
  2903. EndIf
  2904. EndIf
  2905. ;------------top20alien
  2906. If a\kind = 21
  2907. a\brnd = Rnd (800)
  2908. If a\brnd = 100 : bombx=a\x : bomby = a\y
  2909. dropdoublebomb ()
  2910. EndIf
  2911. EndIf
  2912. ;------------gyrotwo
  2913. If a\kind = 28
  2914. a\brnd = Rnd (500)
  2915. If a\brnd = 100 : bombx=a\x : bomby = a\y
  2916. dropboomerangbomb ()
  2917. EndIf
  2918. EndIf
  2919. ;------------ringalien
  2920. If a\kind = 19
  2921. a\brnd = Rnd (400)
  2922. If a\brnd = 100 : bombx=a\x : bomby = a\y
  2923. dropdoublebomb ()
  2924. EndIf
  2925. EndIf
  2926.  
  2927.  
  2928.  
  2929. ;-----------allaliens
  2930.  
  2931.  
  2932.  
  2933.  
  2934. For b.Missile = Each Missile
  2935. If a <> Null
  2936. collide = 1
  2937. If (a\x+20)< b\x collide = 0
  2938. If (a\x-20)> b\x collide = 0
  2939. If (a\y+20)< b\y collide = 0
  2940. If (a\y-20)> b\y collide = 0
  2941.  
  2942. If collide = 1 Then
  2943. If a\kind=24
  2944. bombx = a\x
  2945. bomby = a\y
  2946. dropshipbomb()
  2947. EndIf
  2948.  
  2949. For p.player=Each player
  2950. p\score=p\score+75
  2951. Next
  2952. exx = A\x
  2953. exy = A\y
  2954. aliensalive = aliensalive-1
  2955. checkalienstep()
  2956. If expcount = 0
  2957. explosionchannel = PlaySound (explosionsound)
  2958. expcount = expcountmax
  2959. EndIf
  2960.  
  2961. expkind = 0
  2962. createexplosion ()
  2963. Delete a
  2964. Delete b
  2965. EndIf
  2966. EndIf
  2967.  
  2968. Next
  2969. Next
  2970. End Function
  2971.  
  2972. Function dropalien ()
  2973. If dropq = 1
  2974. For a.alien=Each alien
  2975. If dropq = 1 Then A\Y = A\Y + drop
  2976. Next
  2977. EndIf
  2978. dropq = 0
  2979. End Function
  2980.  
  2981. Function checkalienstep()
  2982. If direction=0 And aliensalive=30 astep= 2
  2983. If direction=0 And aliensalive=25 astep= 3
  2984. If direction=0 And aliensalive=20 astep= 4
  2985. If direction=0 And aliensalive=15 astep= 5
  2986. If direction=0 And aliensalive=10 astep= 6
  2987. If direction=0 And aliensalive=5 astep= 8
  2988. If direction=0 And aliensalive=4 astep= 9
  2989. If direction=0 And aliensalive=3 astep= 11
  2990. If direction=0 And aliensalive=2 astep= 15
  2991. If direction=0 And aliensalive=1 astep= 19
  2992.  
  2993.  
  2994. If direction=1 And aliensalive=30 astep= -2
  2995. If direction=1 And aliensalive=25 astep= -3
  2996. If direction=1 And aliensalive=20 astep= -4
  2997. If direction=1 And aliensalive=15 astep= -5
  2998. If direction=1 And aliensalive=10 astep= -6
  2999. If direction=1 And aliensalive=5 astep= -8
  3000. If direction=1 And aliensalive=4 astep= -9
  3001. If direction=1 And aliensalive=3 astep= -11
  3002. If direction=1 And aliensalive=2 astep= -15
  3003. If direction=1 And aliensalive=1 astep= -19
  3004. End Function
  3005.  
  3006.  
  3007.  
  3008. Function DrawAlien ()
  3009. For A.alien = Each alien
  3010. If a\kind = 0
  3011. DrawImage sfalien,A\x,A\y, (animframe)
  3012. EndIf
  3013. If a\kind = 1
  3014. DrawImage blobanim,A\x,A\y, (A\frame)
  3015. EndIf
  3016. If a\kind = 2
  3017. DrawImage glowalien,A\x,A\y, (A\frame)
  3018. If a\kind=2 And a\frame = 6
  3019. Repeat
  3020. DrawImage greenlightning, a\x, a\alienvariable,a\alienv
  3021. a\alienvariable=a\alienvariable+96
  3022. Until a\alienvariable>650
  3023. For p.player = Each player
  3024. If ImagesCollide ( ship,p\x,p\y, 0, greenlightning, a\x, p\y, 0 ) And p\invinc=0 And p\alive=1
  3025. exx=p\x
  3026. exy=p\y
  3027. p\alive=0
  3028. expkind=3
  3029. shipexplosion ()
  3030. EndIf
  3031. Next
  3032.  
  3033. EndIf
  3034.  
  3035. EndIf
  3036. If a\kind = 3
  3037. DrawImage gyroalien,A\x,A\y, (animframe)
  3038. EndIf
  3039. If a\kind = 4
  3040. DrawImage valien,A\x,A\y
  3041. EndIf
  3042. If a\kind = 5
  3043. DrawImage ash,A\x,A\y
  3044. EndIf
  3045. If a\kind = 6
  3046. DrawImage ashcab,A\x,A\y
  3047. EndIf
  3048. If a\kind = 7
  3049. DrawImage custom,A\x,A\y, (animframe)
  3050. EndIf
  3051. If a\kind = 8
  3052. DrawImage domealien,A\x,A\y, (animframe)
  3053. EndIf
  3054. If a\kind = 9
  3055. DrawImage malien,A\x,A\y
  3056. EndIf
  3057. If a\kind = 10
  3058. DrawImage topalien,A\x,A\y, (animframe)
  3059. EndIf
  3060. If a\kind = 11
  3061. DrawImage threealien,A\x,A\y, (animframetwo)
  3062. EndIf
  3063. If a\kind = 12
  3064. DrawImage marshall,A\x,A\y
  3065. EndIf
  3066. If a\kind = 13
  3067. DrawImage sixalien,A\x,A\y, (animframe)
  3068. EndIf
  3069. If a\kind = 14
  3070. DrawImage gwalien, a\x, a\y, (animframe)
  3071. EndIf
  3072. If a\kind = 15
  3073. DrawImage ggalien, a\x, a\y, (animframe)
  3074. EndIf
  3075. If a\kind = 16
  3076. DrawImage gralien, a\x, a\y, (animframe)
  3077. EndIf
  3078. If a\kind = 17
  3079. DrawImage jetbassalien, a\x, a\y, (animframe)
  3080. EndIf
  3081. If a\kind = 18
  3082. DrawImage blueballsalien, a\x, a\y, (animframe)
  3083. EndIf
  3084. If a\kind = 19
  3085. DrawImage ringalien, a\x, a\y, (animframe)
  3086. EndIf
  3087. If a\kind = 20
  3088. DrawImage chromeringalien, a\x, a\y, (animframe)
  3089. EndIf
  3090. If a\kind = 21
  3091. DrawImage badassalien, a\x, a\y
  3092. EndIf
  3093. If a\kind = 22
  3094. DrawImage bluealien,A\x,A\y, (animframetwo)
  3095. EndIf
  3096. If a\kind = 23
  3097. DrawImage sgalien,A\x,A\y
  3098. EndIf
  3099. If a\kind = 24
  3100. DrawImage scramblealien,A\x,A\y, (animframetwo)
  3101. EndIf
  3102. If a\kind = 25
  3103. DrawImage invader1,A\x,A\y, (animframethree)
  3104. EndIf
  3105. If a\kind = 26
  3106. DrawImage invader2,A\x,A\y, (animframethree)
  3107. EndIf
  3108. If a\kind = 27
  3109. DrawImage invader3,A\x,A\y, (animframethree)
  3110. EndIf
  3111. If a\kind = 28
  3112. DrawImage gyroalientwo,A\x,A\y, (animframe)
  3113. EndIf
  3114. If a\kind = 29
  3115. DrawImage newinvader1,A\x,A\y, (animframe)
  3116. EndIf
  3117. If a\kind = 30
  3118. DrawImage newinvader2,A\x,A\y, (animframe)
  3119. EndIf
  3120. If a\kind = 31
  3121. DrawImage newinvader3,A\x,A\y, (animframe)
  3122. EndIf
  3123. If a\kind = 32
  3124. DrawImage hnhalien, a\x, a\y
  3125. EndIf
  3126.  
  3127.  
  3128. Next
  3129.  
  3130.  
  3131.  
  3132.  
  3133. End Function
  3134.  
  3135.  
  3136. ;---------------------------DROP BOMB------------------------------------------------
  3137. Function dropbomb ()
  3138. c.bomb = New bomb
  3139. c\box = bombx + 20
  3140. c\boy = bomby + 20
  3141. End Function
  3142.  
  3143. Function updatebomb ()
  3144. For c.bomb = Each bomb
  3145. c\boy = c\boy + 5
  3146. If c\boy > 600 Delete c
  3147. For b.Missile = Each Missile
  3148. If c <> Null
  3149. If ImagesCollide ( fire,b\x,b\y, 0, bomb,c\box,c\boy, 0 )
  3150. Delete c
  3151. Delete b
  3152. EndIf
  3153. EndIf
  3154. Next
  3155. For p.player = Each player
  3156. If c <> Null
  3157. If ImagesCollide ( ship,p\x,p\y, 0, bomb,c\box,c\boy, 0 ) And p\invinc=0 And p\alive=1
  3158. exx=p\x
  3159. exy=p\y
  3160. p\alive=0
  3161. Delete c
  3162. expkind=3
  3163. shipexplosion ()
  3164. EndIf
  3165. EndIf
  3166. Next
  3167.  
  3168. Next
  3169.  
  3170. End Function
  3171.  
  3172. Function drawbomb ()
  3173. For c.bomb = Each bomb
  3174. If level<38 Or level>38
  3175. DrawImage bomb, c\box, c\boy
  3176. EndIf
  3177. If level = 38
  3178. DrawImage bombvintage, c\box, c\boy, (animframethree)
  3179. EndIf
  3180. If level = 39
  3181. DrawImage boss4minibomb, c\box, c\boy
  3182. EndIf
  3183. Next
  3184. End Function
  3185.  
  3186.  
  3187. ;---------------------------DROP SHIP BOMB------------------------------------------------
  3188. Function dropshipbomb ()
  3189. c.shipbomb = New shipbomb
  3190. c\box = bombx
  3191. c\boy = bomby
  3192. c\frame = animframetwo
  3193. End Function
  3194.  
  3195. Function updateshipbomb ()
  3196. For c.shipbomb = Each shipbomb
  3197. c\boy = c\boy + 20
  3198. If c\boy > 600 Delete c
  3199. For p.player = Each player
  3200. If c <> Null
  3201. If ImagesCollide ( ship,p\x,p\y, 0, scramblealien,c\box,c\boy, 0 ) And p\invinc=0 And p\alive=1
  3202. exx=p\x
  3203. exy=p\y
  3204. p\alive=0
  3205. Delete c
  3206. expkind=3
  3207. shipexplosion ()
  3208. EndIf
  3209. EndIf
  3210. Next
  3211. Next
  3212.  
  3213. End Function
  3214.  
  3215. Function drawshipbomb ()
  3216. For c.shipbomb = Each shipbomb
  3217. DrawImage scramblealien, c\box, c\boy, (c\frame)
  3218. Next
  3219. End Function
  3220.  
  3221.  
  3222. ;---------------------------DROP BLUE BOMB------------------------------------------------
  3223. Function dropbluebomb ()
  3224. c.bluebomb = New bluebomb
  3225. c\box = bombx + 20
  3226. c\boy = bomby + 20
  3227. c\dir = Rnd (1)
  3228. End Function
  3229.  
  3230. Function updatebluebomb ()
  3231. For c.bluebomb = Each bluebomb
  3232. c\boy = c\boy + 5
  3233.  
  3234. If c\dir=1
  3235. c\box = c\box + 2
  3236. EndIf
  3237.  
  3238. If c\dir=0
  3239. c\box= c\box - 2
  3240. EndIf
  3241.  
  3242. If c\box>800
  3243. c\box=0
  3244. EndIf
  3245.  
  3246. If c\box < 0
  3247. c\box=800
  3248. EndIf
  3249.  
  3250. If c\boy > 600 Delete c
  3251. For p.player = Each player
  3252. If c <> Null
  3253. If ImagesCollide ( ship,p\x,p\y, 0, bomb,c\box,c\boy, 0 ) And p\invinc=0 And p\alive=1
  3254. exx=p\x
  3255. exy=p\y
  3256. p\alive=0
  3257. Delete c
  3258. expkind=3
  3259. shipexplosion ()
  3260. EndIf
  3261. EndIf
  3262. Next
  3263.  
  3264. Next
  3265. End Function
  3266.  
  3267. Function drawbluebomb ()
  3268. For c.bluebomb = Each bluebomb
  3269. DrawImage bluebomb, c\box, c\boy
  3270. Next
  3271. End Function
  3272.  
  3273. ;---------------------------DROP BOOMERANG BOMB------------------------------------------------
  3274. Function dropboomerangbomb ()
  3275. c.boomerangbomb = New boomerangbomb
  3276. c\box = bombx + 20
  3277. c\boy = bomby + 20
  3278. c\incr = Rnd (-5 , 5)
  3279. c\edge = 0
  3280. c\dir = 0
  3281. End Function
  3282.  
  3283. Function updateboomerangbomb ()
  3284. For c.boomerangbomb = Each boomerangbomb
  3285.  
  3286. If c\dir = 0 c\boy = c\boy + 5
  3287. If c\dir = 1 c\boy = c\boy - 5
  3288.  
  3289. c\box = c\box + c\incr
  3290.  
  3291. If c\box>800
  3292. c\box=800
  3293. c\incr = -c\incr
  3294. EndIf
  3295.  
  3296. If c\box < 0
  3297. c\box=0
  3298. c\incr= -c\incr
  3299. EndIf
  3300.  
  3301. If c\boy<0
  3302. c\boy=0
  3303. c\dir=0
  3304. EndIf
  3305.  
  3306.  
  3307. If (c\boy > 600 And c\edge = 0)
  3308. c\edge = 1
  3309. c\dir = 1
  3310. c\boy = 600
  3311. EndIf
  3312.  
  3313. If (c\boy > 600 And c\edge = 1)
  3314. Delete c
  3315. EndIf
  3316.  
  3317.  
  3318.  
  3319. If level=20
  3320. For p.player = Each player
  3321. If c <> Null
  3322. If ImagesCollide ( ship,p\x,p\y, 0, boomerangbombbig, c\box,c\boy, 0 ) And p\invinc=0 And p\alive=1
  3323. exx=p\x
  3324. exy=p\y
  3325. p\alive=0
  3326. Delete c
  3327. expkind=3
  3328. shipexplosion ()
  3329. EndIf
  3330. EndIf
  3331. Next
  3332. EndIf
  3333. If level>20
  3334. For p.player = Each player
  3335. If c <> Null
  3336. If ImagesCollide ( ship,p\x,p\y, 0, boomerangbombbig, c\box,c\boy, 0 ) And p\invinc=0 And p\alive=1
  3337. exx=p\x
  3338. exy=p\y
  3339. p\alive=0
  3340. Delete c
  3341. expkind=3
  3342. shipexplosion ()
  3343. EndIf
  3344. EndIf
  3345. Next
  3346. EndIf
  3347. Next
  3348. End Function
  3349.  
  3350. Function drawboomerangbomb ()
  3351. For c.boomerangbomb = Each boomerangbomb
  3352. If level = 20 DrawImage boomerangbombbig, c\box, c\boy, (animframe)
  3353. If level>20 DrawImage boomerangbomb, c\box, c\boy, (animframe)
  3354. Next
  3355. End Function
  3356.  
  3357.  
  3358. ;---------------------------DROP SLUDGE BOMB------------------------------------------------
  3359. Function dropsludgebomb ()
  3360. c.sludgebomb = New sludgebomb
  3361. c\box = bombx + 20
  3362. c\boy = bomby + 20
  3363. End Function
  3364.  
  3365. Function updatesludgebomb ()
  3366. For c.sludgebomb = Each sludgebomb
  3367. c\boy = c\boy + 1
  3368. If c\boy > 600 Delete c
  3369. For b.Missile = Each Missile
  3370. If c <> Null
  3371. If ImagesCollide ( fire,b\x,b\y, 0, bomb,c\box,c\boy, 0 )
  3372. Delete b
  3373. EndIf
  3374. EndIf
  3375. Next
  3376. For p.player = Each player
  3377. If c <> Null
  3378. If ImagesCollide ( ship,p\x,p\y, 0, sludgebomb,c\box,c\boy, 0 ) And p\invinc=0 And p\alive=1
  3379. exx=p\x
  3380. exy=p\y
  3381. p\alive=0
  3382. Delete c
  3383. expkind=3
  3384. shipexplosion ()
  3385. EndIf
  3386. EndIf
  3387. Next
  3388.  
  3389. Next
  3390.  
  3391. End Function
  3392.  
  3393. Function drawsludgebomb ()
  3394. For c.sludgebomb = Each sludgebomb
  3395. DrawImage sludgebomb, c\box, c\boy, (animframetwo)
  3396. Next
  3397. End Function
  3398.  
  3399.  
  3400.  
  3401. ;---------------------------DROP FIREBOMB------------------------------------------------
  3402. Function dropfirebomb ()
  3403. c.firebomb = New firebomb
  3404. c\box = bombx + 20
  3405. c\boy = bomby + 20
  3406. End Function
  3407.  
  3408. Function updatefirebomb ()
  3409. For c.firebomb = Each firebomb
  3410. If c <> Null
  3411. c\boy = c\boy + 9
  3412. If c\boy > 600 Delete c
  3413. For b.Missile = Each Missile
  3414. If c <> Null
  3415. If ImagesCollide ( fire,b\x,b\y, 0, bomb,c\box,c\boy, 0 )
  3416. Delete b
  3417. EndIf
  3418. EndIf
  3419. Next
  3420. For p.player = Each player
  3421. If c <> Null
  3422. If ImagesCollide ( ship,p\x,p\y, 0, bomb,c\box,c\boy, 0 ) And p\invinc=0 And p\alive=1
  3423. exx=p\x
  3424. exy=p\y
  3425. p\alive=0
  3426. Delete c
  3427. expkind=3
  3428. shipexplosion ()
  3429. EndIf
  3430. EndIf
  3431. Next
  3432. EndIf
  3433. Next
  3434.  
  3435. End Function
  3436.  
  3437. Function drawfirebomb ()
  3438. For c.firebomb = Each firebomb
  3439. DrawImage fbomb, c\box, c\boy
  3440. Next
  3441. End Function
  3442.  
  3443. ;---------------------------DROP TRIPPLE BOMB------------------------------------------------
  3444. Function droptripplebomb ()
  3445. b.tribomb = New tribomb
  3446. b\x1 = bombx + 20
  3447. b\y1 = bomby + 20
  3448. b\x2 = bombx + 20
  3449. b\x3 = bombx + 20
  3450. End Function
  3451.  
  3452. Function updatetribomb ()
  3453. For b.tribomb = Each tribomb
  3454. b\x1 = b\x1 - 5
  3455. b\y1 = b\y1 + 5
  3456. b\x3 = b\x3 + 5
  3457. If b\y1 > 600 Delete b
  3458. For p.player = Each player
  3459. If b <> Null
  3460. If ImagesCollide ( ship,p\x,p\y, 0, ybomb,b\x1,b\y1, 0 ) And p\invinc=0 And p\alive=1
  3461. exx=p\x
  3462. exy=p\y
  3463. p\alive=0
  3464. expkind=3
  3465. shipexplosion ()
  3466. Delete b
  3467. EndIf
  3468. If b <> Null
  3469. If ImagesCollide ( ship,p\x,p\y, 0, ybomb,b\x2,b\y1, 0 ) And p\invinc=0 And p\alive=1
  3470. exx=p\x
  3471. exy=p\y
  3472. p\alive=0
  3473. expkind=3
  3474. shipexplosion ()
  3475. Delete b
  3476. EndIf
  3477. EndIf
  3478. If b <> Null
  3479. If ImagesCollide ( ship,p\x,p\y, 0, ybomb,b\x3,b\y1, 0 ) And p\invinc=0 And p\alive=1
  3480. exx=p\x
  3481. exy=p\y
  3482. p\alive=0
  3483. expkind=3
  3484. shipexplosion ()
  3485. Delete b
  3486. EndIf
  3487. EndIf
  3488. EndIf
  3489. Next
  3490.  
  3491. Next
  3492. End Function
  3493.  
  3494. Function drawtribomb ()
  3495. For b.tribomb = Each tribomb
  3496. DrawImage ybomb, b\x1, b\y1
  3497. DrawImage ybomb, b\x2, b\y1
  3498. DrawImage ybomb, b\x3, b\y1
  3499. Next
  3500. End Function
  3501. ;---------------------------DROP DOUBLE BOMB------------------------------------------------
  3502. Function dropdoublebomb ()
  3503. b.doublebomb = New doublebomb
  3504. b\x1 = bombx + 20
  3505. b\y1 = bomby + 20
  3506. b\x2 = bombx + 20
  3507. End Function
  3508.  
  3509. Function updatedoublebomb ()
  3510. For b.doublebomb = Each doublebomb
  3511. b\x1 = b\x1 - 2
  3512. b\y1 = b\y1 + 7
  3513. b\x2 = b\x2 + 2
  3514. If b\y1 > 600 Delete b
  3515. For p.player = Each player
  3516. If b <> Null
  3517. If ImagesCollide ( ship,p\x,p\y, 0, ybomb,b\x1,b\y1, 0 ) And p\invinc=0 And p\alive=1
  3518. exx=p\x
  3519. exy=p\y
  3520. p\alive=0
  3521. expkind=3
  3522. shipexplosion ()
  3523. Delete b
  3524. EndIf
  3525. If b <> Null
  3526. If ImagesCollide ( ship,p\x,p\y, 0, ybomb,b\x2,b\y1, 0 ) And p\invinc=0 And p\alive=1
  3527. exx=p\x
  3528. exy=p\y
  3529. p\alive=0
  3530. expkind=3
  3531. shipexplosion ()
  3532. Delete b
  3533. EndIf
  3534. EndIf
  3535.  
  3536. EndIf
  3537. Next
  3538.  
  3539. Next
  3540. End Function
  3541.  
  3542. Function drawdoublebomb ()
  3543. For b.doublebomb = Each doublebomb
  3544. DrawImage pbomb, b\x1, b\y1
  3545. DrawImage pbomb, b\x2, b\y1
  3546. Next
  3547. End Function
  3548.  
  3549.  
  3550. ;---------------------------BOSS1BOMB------------------------------------------------
  3551. Function dropboss1bomb ()
  3552. c.bombone = New bombone
  3553. c\box = bombx
  3554. c\boy = bomby
  3555. c\frame=0
  3556. c\count=0
  3557. bosschannel = PlaySound (bossbombsound)
  3558. End Function
  3559.  
  3560. Function updateboss1bomb ()
  3561. For c.bombone = Each bombone
  3562. c\boy = c\boy + 5
  3563. If c\boy > 600 c\boy=600
  3564. If c\boy=600 c\count=c\count+1
  3565. If c\count=3 c\count=0 : c\frame=c\frame+1
  3566. If c\frame=5 Delete c
  3567. For b.Missile = Each Missile
  3568. If c <> Null
  3569. If ImagesCollide ( fire,b\x,b\y, 0, bomb,c\box,c\boy, 0 )
  3570. Delete b
  3571. EndIf
  3572. EndIf
  3573. Next
  3574. For p.player = Each player
  3575. If c <> Null
  3576. If ImagesCollide ( ship,p\x,p\y,0, boss1bomb,c\box,c\boy,0 ) And p\invinc=0 And p\alive=1
  3577. exx=p\x
  3578. exy=p\y
  3579. p\alive=0
  3580. Delete c
  3581. expkind=3
  3582. shipexplosion ()
  3583. EndIf
  3584. EndIf
  3585. Next
  3586.  
  3587. Next
  3588.  
  3589. End Function
  3590.  
  3591. Function drawboss1bomb ()
  3592. For c.bombone = Each bombone
  3593. DrawImage boss1bomb, c\box, c\boy, c\frame
  3594. Next
  3595. End Function
  3596.  
  3597. ;---------------------------DROP boss4 BOMB------------------------------------------------
  3598. Type bomb4
  3599. Field x
  3600. Field y
  3601. Field mode
  3602. Field kind
  3603. Field lft
  3604. Field rght
  3605. End Type
  3606.  
  3607. Function dropboss4bomb ()
  3608. c.bomb4 = New bomb4
  3609. c\x = bombx
  3610. c\y = bomby + 60
  3611. c\kind = exx
  3612. c\mode=0
  3613. End Function
  3614.  
  3615. Function updateboss4bomb ()
  3616. For c.bomb4 = Each bomb4
  3617. If c<>Null
  3618. If c\mode=0
  3619. If c\kind = 0 c\y = c\y + 4
  3620. If c\kind = 1 c\y = c\y + 5
  3621. EndIf
  3622.  
  3623. If c\kind = 1
  3624. If c\y>600
  3625. Delete c
  3626. EndIf
  3627. EndIf
  3628. If c<> Null
  3629. If c\kind = 0 And c\mode=0
  3630. If c\y > 580
  3631. c\y=580
  3632. c\mode = 1
  3633. c\rght = c\x
  3634. c\lft = c\x
  3635. EndIf
  3636. EndIf
  3637.  
  3638. If c\mode=1
  3639. c\rght=c\rght+7
  3640. c\lft=c\lft-7
  3641. If c\rght>800 And c\lft<0
  3642. exx = c\x
  3643. exy = c\y
  3644. explosionchannel = PlaySound (explosionsound)
  3645. expkind = 0
  3646. createexplosion ()
  3647. Delete c
  3648. EndIf
  3649. EndIf
  3650.  
  3651. If c<> Null
  3652.  
  3653. For b.Missile = Each Missile
  3654. If c <> Null
  3655. collide = 1
  3656. If (c\x+22)< b\x collide = 0
  3657. If (c\x-22)> b\x collide = 0
  3658. If (c\y+20)< b\y collide = 0
  3659. If (c\y-20)> b\y collide = 0
  3660. If collide = 1 Then
  3661.  
  3662. exx = c\x
  3663. exy = c\y
  3664. explosionchannel = PlaySound (explosionsound)
  3665. expkind = 0
  3666. createexplosion ()
  3667.  
  3668. Delete c
  3669. Delete b
  3670. EndIf
  3671. EndIf
  3672. Next
  3673. For p.player = Each player
  3674. If c <> Null
  3675. collide = 1
  3676. If (c\x+44)< p\x collide = 0
  3677. If (c\x-44)> p\x collide = 0
  3678. If (c\y+43)< p\y collide = 0
  3679. If (c\y-43)> p\y collide = 0
  3680.  
  3681. If c\mode = 1 And collide = 0
  3682. collide = 1
  3683. If (c\rght+24)< p\x collide = 0
  3684. If (c\rght-24)> p\x collide = 0
  3685. EndIf
  3686. If c\mode = 1 And collide = 0
  3687. collide = 1
  3688. If (c\lft+24)< p\x collide = 0
  3689. If (c\lft-24)> p\x collide = 0
  3690. EndIf
  3691. If collide = 1 And p\invinc=0 And p\alive=1 Then
  3692. exx=p\x
  3693. exy=p\y
  3694. p\alive=0
  3695. Delete c
  3696. expkind=3
  3697. shipexplosion ()
  3698. EndIf
  3699. EndIf
  3700. Next
  3701.  
  3702. EndIf
  3703. EndIf
  3704. EndIf
  3705. Next
  3706.  
  3707. End Function
  3708.  
  3709. Function drawboss4bomb ()
  3710. For c.bomb4 = Each bomb4
  3711. If c\kind=0 DrawImage boss4star, c\x, c\y
  3712. If c\kind = 1 DrawImage boss4bomb, c\x, c\y
  3713. If c\mode = 1
  3714. DrawImage boss4minibomb, c\lft, c\y
  3715. DrawImage boss4minibomb, c\rght, c\y
  3716. EndIf
  3717. Next
  3718. End Function
  3719.  
  3720.  
  3721. ;---------------------------EXPLOSIONS-----------------------------------------------
  3722. Function createexplosion ()
  3723. e.explosion=New explosion
  3724. e\exx = exx
  3725. e\exy = exy
  3726. e\exf = 0
  3727. e\exfr=0
  3728. e\kind = expkind
  3729. End Function
  3730.  
  3731. Function udateexplosion ()
  3732. For e.explosion = Each explosion
  3733. e\exfr = e\exfr+1 If e\exfr=2
  3734. e\exfr=0
  3735. e\exf = e\exf + 1
  3736. If e\exf = 7 And aliensalive=0 Then
  3737. level=level+1 : astep =1
  3738. If level< 41 initializelevel ()
  3739. ;If level > 40
  3740. ;StopChannel (explosionchannel)
  3741. ;outro()
  3742. ;boss = 0
  3743. ; If difficulty = 0
  3744. ; playerlives = 0
  3745. ; EndIf
  3746. ;If difficulty = 1
  3747. ;level = 1
  3748. ;FreeTimer (timer)
  3749. ;initializelevel()
  3750. ;EndIf
  3751. ;EndIf
  3752.  
  3753. EndIf
  3754. If e <> Null
  3755. If e\exf = 7 Delete e
  3756. EndIf
  3757. EndIf
  3758. Next
  3759.  
  3760. End Function
  3761.  
  3762. Function drawexplosion ()
  3763. For e.explosion = Each explosion
  3764. If level < 38 Or level>38
  3765. If e\kind = 0
  3766. DrawImage explode, e\exx, e\exy, e\exf
  3767. EndIf
  3768. If e\kind = 1
  3769. DrawImage explode2, e\exx, e\exy, e\exf
  3770. EndIf
  3771. EndIf
  3772. If level = 38
  3773. DrawImage explodevintage, e\exx, e\exy
  3774. EndIf
  3775. Next
  3776. End Function
  3777.  
  3778. ;---------------------------------BOSS EXPLOSION-----------------------------
  3779. Function createbossexplosion ()
  3780. e.bossexplosion=New bossexplosion
  3781. e\exx = exx
  3782. e\exy = exy
  3783. e\exf = 0
  3784. e\exfr=0
  3785. End Function
  3786.  
  3787. Function udatebossexplosion ()
  3788. For e.bossexplosion = Each bossexplosion
  3789. e\exfr = e\exfr+1 If e\exfr=3
  3790. e\exfr=0
  3791. e\exf = e\exf + 1
  3792. If e\exf = 7 Then
  3793. Delete e
  3794. level=level+1
  3795. astep =1
  3796. boss=0
  3797. StopChannel (explosionchannel)
  3798. aliensalive=0
  3799. If level<41initializelevel ()
  3800. If level=41
  3801.  
  3802. If ChannelPlaying (ufochannel) = 1
  3803. StopChannel (ufochannel)
  3804. EndIf
  3805.  
  3806. outro()
  3807. If completed = 0 completed = 1 : saveoptions()
  3808. If difficulty = 0
  3809. playerlives = 0
  3810. For p.player = Each player
  3811. playernewscore = p\score
  3812. Next
  3813. EndIf
  3814. If difficulty = 1
  3815. level = 1
  3816. FreeTimer (timer)
  3817. initializelevel()
  3818. EndIf
  3819. EndIf
  3820.  
  3821. EndIf
  3822. EndIf
  3823.  
  3824.  
  3825. Next
  3826.  
  3827. End Function
  3828.  
  3829. Function drawbossexplosion ()
  3830. For e.bossexplosion = Each bossexplosion
  3831. DrawImage bossexplode, e\exx, e\exy, e\exf
  3832. Next
  3833. End Function
  3834.  
  3835. ;---------------------------SHIP EXPLOSION---------------------------------------------
  3836. Function shipexplosion ()
  3837. deathchannel = PlaySound (youdie)
  3838. e.explosion=New explosion
  3839. e\exx = exx
  3840. e\exy = exy
  3841. e\exf = 0
  3842. e\kind=expkind
  3843. e\exfr=0
  3844. End Function
  3845.  
  3846. Function udateshipexplosion ()
  3847. For e.explosion = Each explosion
  3848. If e\kind = 3
  3849. e\exfr = e\exfr+1 If e\exfr=6
  3850. e\exfr=0
  3851. e\exf = e\exf + 1
  3852. EndIf
  3853. For p.player = Each player
  3854. If e\exf = 10 And p\alive=0 Then
  3855. p\lives = p\lives-1
  3856. p\alive=1
  3857. p\x=400
  3858. p\invinc=100
  3859. If p\lives<0
  3860. playerlives = 0
  3861. sco10 = Int(score10)
  3862. playernewscore = p\score
  3863. EndIf
  3864. EndIf
  3865. Next
  3866. If e\exf = 10 Delete e
  3867. EndIf
  3868.  
  3869. Next
  3870.  
  3871. End Function
  3872.  
  3873. Function drawshipexplosion ()
  3874. For e.explosion = Each explosion
  3875. If e <> Null
  3876. If e\kind =3
  3877. DrawImage explode3, e\exx, e\exy, e\exf
  3878. EndIf
  3879. EndIf
  3880. Next
  3881. End Function
  3882.  
  3883.  
  3884.  
  3885. ;----------------------BOSS 1-------------------------------
  3886.  
  3887. Function createboss1 ()
  3888. b.boss1=New boss1
  3889. b\x=400
  3890. b\y= -75
  3891. b\mode=0
  3892. b\life=10
  3893. b\frame=0
  3894. aliensalive=1
  3895. End Function
  3896.  
  3897. Function updateboss1 ()
  3898. For b.boss1 = Each boss1
  3899. If b <> Null
  3900. If b\mode=0
  3901. b\y=b\y+3
  3902. ;DrawImage boss1, b\x, b\y,0
  3903. If b\y>200
  3904. b\mode=1
  3905. b\timer=MilliSecs()
  3906. EndIf
  3907. EndIf
  3908. If b\mode=1
  3909. ;DrawImage boss1, b\x, b\y, b\frame
  3910. b\newtime=MilliSecs()
  3911. If b\timer-b\newtime<-50
  3912. b\frame=1
  3913. EndIf
  3914. If b\timer-b\newtime<-100
  3915. b\frame=2
  3916. EndIf
  3917. If b\timer-b\newtime<-150
  3918. b\frame=3
  3919. If b\timer-b\newtime<-200
  3920. b\frame=4
  3921. EndIf
  3922. If b\timer-b\newtime<-250
  3923. b\mode=2
  3924. b\timer=MilliSecs ()
  3925. EndIf
  3926. EndIf
  3927. EndIf
  3928. If b\mode=2
  3929. ;DrawImage boss1, b\x, b\y, b\frame
  3930. b\newtime=MilliSecs ()
  3931. If b\timer-b\newtime<-50
  3932. b\frame=5
  3933. EndIf
  3934. If b\timer-b\newtime<-100
  3935. b\frame=4
  3936. b\timer=MilliSecs ()
  3937. EndIf
  3938. b\x=b\x+3
  3939. If b\x>725 b\x=725 : b\mode=3 : b\timer=MilliSecs ()
  3940. b\random = Rnd (20)
  3941. If b\random = 10 bombx=b\x : bomby = b\y: droptripplebomb ()
  3942. For m.Missile = Each Missile
  3943. If m <> Null
  3944. If ImagesCollide ( fire,m\x,m\y, 0, boss1,b\x,b\y, 0 )
  3945. exx = m\x
  3946. exy = m\y
  3947. Delete m
  3948. b\life=b\life-1
  3949. expkind = 0
  3950. createexplosion ()
  3951. If b\life=0
  3952. b\mode=6
  3953. bosschannel = PlaySound (bossdeathsound)
  3954. explosionchannel = PlaySound (loopexpsound)
  3955. EndIf
  3956. EndIf
  3957. EndIf
  3958. Next
  3959. EndIf
  3960. If b\mode = 3
  3961. ;DrawImage boss1, b\x, b\y, b\frame
  3962. b\newtime=MilliSecs ()
  3963. If b\timer-b\newtime<-50
  3964. b\frame=6
  3965. EndIf
  3966. If b\timer-b\newtime<-100
  3967. b\frame=7
  3968. EndIf
  3969. If b\timer-b\newtime<-150
  3970. b\frame=8
  3971. EndIf
  3972. If b\timer-b\newtime<-200
  3973. b\frame=9 : b\mode=4
  3974. b\timer=MilliSecs()
  3975. EndIf
  3976. EndIf
  3977. If b\mode = 4
  3978. ;DrawImage boss1, b\x, b\y, b\frame
  3979. b\newtime=MilliSecs ()
  3980. If b\timer-b\newtime<-50
  3981. b\frame=10
  3982. EndIf
  3983. If b\timer-b\newtime<-100
  3984. b\frame=11
  3985. EndIf
  3986. If b\timer-b\newtime<-150
  3987. b\frame=12
  3988. EndIf
  3989. If b\timer-b\newtime<-200
  3990. b\frame=9
  3991. b\timer=MilliSecs()
  3992. EndIf
  3993. b\x=b\x-3
  3994. If b\x<75 b\x=75
  3995. If b\x=75 And b\frame=9 b\mode=5 : b\timer=MilliSecs ()
  3996. If b\x=722 bombx=b\x : bomby=b\y : dropboss1bomb ()
  3997. If b\x=629 bombx=b\x : bomby=b\y : dropboss1bomb ()
  3998. If b\x=533 bombx=b\x : bomby=b\y : dropboss1bomb ()
  3999. If b\x=437 bombx=b\x : bomby=b\y : dropboss1bomb ()
  4000. If b\x=341 bombx=b\x : bomby=b\y : dropboss1bomb ()
  4001. If b\x=245 bombx=b\x : bomby=b\y : dropboss1bomb ()
  4002. If b\x=149 bombx=b\x : bomby=b\y : dropboss1bomb ()
  4003. EndIf
  4004. If b\mode = 5
  4005. ;DrawImage boss1, b\x, b\y, b\frame
  4006. b\newtime=MilliSecs ()
  4007. If b\timer-b\newtime<-50
  4008. b\frame=9
  4009. EndIf
  4010. If b\timer-b\newtime<-100
  4011. b\frame=8
  4012. EndIf
  4013. If b\timer-b\newtime<-150
  4014. b\frame=7
  4015. EndIf
  4016. If b\timer-b\newtime<-200
  4017. b\frame=6 : b\mode=2
  4018. b\timer=MilliSecs()
  4019. EndIf
  4020. EndIf
  4021. If b\mode=6
  4022. ;DrawImage boss1, b\x,b\y, b\frame
  4023. b\y=b\y+2
  4024. exx = b\x -75 + Rnd(150)
  4025. exy = b\y-75+Rnd(150)
  4026. expkind = Rnd (1)
  4027. createexplosion ()
  4028. If b\y>450
  4029. exx= b\x
  4030. exy=b\y Delete b
  4031. For p.player=Each player
  4032. p\score=p\score+10000
  4033. Next
  4034. createbossexplosion ()
  4035. EndIf
  4036. EndIf
  4037.  
  4038. End If
  4039. Next
  4040. End Function
  4041.  
  4042. Function drawboss1 ()
  4043. For b.boss1 = Each boss1
  4044. If b <> Null
  4045. If b\mode=0
  4046. DrawImage boss1, b\x, b\y,0
  4047. EndIf
  4048. If b\mode=1
  4049. DrawImage boss1, b\x, b\y, b\frame
  4050. EndIf
  4051. If b\mode=2
  4052. DrawImage boss1, b\x, b\y, b\frame
  4053. EndIf
  4054. If b\mode = 3
  4055. DrawImage boss1, b\x, b\y, b\frame
  4056. EndIf
  4057. If b\mode = 4
  4058. DrawImage boss1, b\x, b\y, b\frame
  4059. EndIf
  4060. If b\mode = 5
  4061. DrawImage boss1, b\x, b\y, b\frame
  4062. EndIf
  4063. If b\mode=6
  4064. DrawImage boss1, b\x,b\y, b\frame
  4065. EndIf
  4066. EndIf
  4067. Next
  4068. End Function
  4069.  
  4070. ;----------------------BOSS 2-------------------------------
  4071.  
  4072. Function createboss2 ()
  4073. b.boss2=New boss2
  4074. b\x=150
  4075. b\y= 200
  4076. b\mode=0
  4077. b\life=15
  4078. b\frame=0
  4079. aliensalive=1
  4080. b\timer=MilliSecs()
  4081. End Function
  4082.  
  4083. Function updateboss2 ()
  4084. For b.boss2 = Each boss2
  4085. If b <> Null
  4086. If b\mode=0
  4087. b\newtime=MilliSecs()
  4088. If b\timer-b\newtime<-75
  4089. b\frame=b\frame+1
  4090. If b\frame=9
  4091. b\mode=1
  4092. EndIf
  4093. b\timer=MilliSecs()
  4094. EndIf
  4095. EndIf
  4096. ;---------
  4097. If b\mode=1
  4098. b\x = b\x+5
  4099. b\random = Rnd (30)
  4100. If b\random = 10 bombx=b\x : bomby = b\y: bosschannel = PlaySound (bossbomb2sound) : dropboomerangbomb ()
  4101. For m.Missile = Each Missile
  4102. If m <> Null
  4103. collide = 1
  4104. If (b\x+46)< m\x collide = 0
  4105. If (b\x-46)> m\x collide = 0
  4106. If (b\y+60)< m\y collide = 0
  4107. If (b\y-60)> m\y collide = 0
  4108.  
  4109. If collide = 1 Then
  4110. exx = m\x
  4111. exy = m\y
  4112. Delete m
  4113. b\life=b\life-1
  4114. expkind = 0
  4115. createexplosion ()
  4116. EndIf
  4117. EndIf
  4118. Next
  4119. If b\x > 700
  4120. b\x = 700
  4121. b\mode=2
  4122. b\timer=MilliSecs()
  4123. EndIf
  4124. EndIf
  4125. ;----------
  4126. If b\mode=2
  4127. b\newtime=MilliSecs ()
  4128. If b\timer-b\newtime<-75
  4129. b\frame=b\frame+1
  4130. If b\frame=15
  4131. b\mode = 3
  4132. EndIf
  4133. b\timer=MilliSecs ()
  4134. EndIf
  4135. EndIf
  4136. ;---------
  4137. If b\mode = 3
  4138. b\x=b\x-5
  4139. b\random = Rnd (30)
  4140. If b\random = 10 bombx=b\x : bomby = b\y: bosschannel = PlaySound (bossbomb2sound) :dropboomerangbomb ()
  4141.  
  4142. For m.Missile = Each Missile
  4143. If m <> Null
  4144. collide = 1
  4145. If (b\x+46)< m\x collide = 0
  4146. If (b\x-46)> m\x collide = 0
  4147. If (b\y+60)< m\y collide = 0
  4148. If (b\y-60)> m\y collide = 0
  4149.  
  4150. If collide = 1 Then
  4151. exx = m\x
  4152. exy = m\y
  4153. Delete m
  4154. b\life=b\life-1
  4155. expkind = 0
  4156. createexplosion ()
  4157. EndIf
  4158. EndIf
  4159. Next
  4160. If b\x<100
  4161. b\x=100
  4162. b\mode=4
  4163. b\timer=MilliSecs ()
  4164. EndIf
  4165. If (b\x=100 And b\life <8) ;----------LIFE ADJUSTMENT AREA
  4166. b\mode=5
  4167. b\frame=21
  4168. EndIf
  4169. EndIf
  4170. ;-----------
  4171. If b\mode = 4
  4172. b\newtime=MilliSecs ()
  4173. If b\timer-b\newtime<-75
  4174. b\frame=b\frame+1
  4175. If b\frame=21
  4176. b\frame=9
  4177. b\mode = 1
  4178. EndIf
  4179. b\timer=MilliSecs ()
  4180. EndIf
  4181. EndIf
  4182. ;------------
  4183. If b\mode=5
  4184. b\newtime=MilliSecs ()
  4185. If b\timer-b\newtime<-75
  4186. b\frame=b\frame+1
  4187. If b\frame=25
  4188. b\mode = 6
  4189. b\newtime=1
  4190. EndIf
  4191. b\timer= MilliSecs()
  4192. EndIf
  4193. EndIf
  4194. If b\mode=6
  4195. b\random = Rnd (40)
  4196. If b\random = 10 bombx=b\x : bomby = b\y: bosschannel = PlaySound (bossbomb2sound) :dropboomerangbomb ()
  4197. If b\random = 20 bombx=b\x : bomby = b\y: dropboss1bomb ()
  4198.  
  4199. If b\newtime=1
  4200. b\x=b\x + 5
  4201. If b\x>700
  4202. b\x=700
  4203. b\newtime=0
  4204. EndIf
  4205. EndIf
  4206.  
  4207. If b\newtime=0
  4208. b\x=b\x - 5
  4209. If b\x<85
  4210. b\x=85
  4211. b\newtime=1
  4212. EndIf
  4213. EndIf
  4214.  
  4215. If b\life<1
  4216. b\mode = 7
  4217. bosschannel = PlaySound (bossdeathsound)
  4218. explosionchannel = PlaySound (loopexpsound)
  4219. EndIf
  4220.  
  4221. For m.Missile = Each Missile
  4222. If m <> Null
  4223. collide = 1
  4224. If (b\x+80)< m\x collide = 0
  4225. If (b\x-80)> m\x collide = 0
  4226. If (b\y+15)< m\y collide = 0
  4227. If (b\y-15)> m\y collide = 0
  4228.  
  4229. If collide = 1 Then
  4230. exx = m\x
  4231. exy = m\y
  4232. Delete m
  4233. b\life=b\life-1
  4234. expkind = 0
  4235. createexplosion ()
  4236. EndIf
  4237. EndIf
  4238. Next
  4239. EndIf
  4240.  
  4241.  
  4242. End If
  4243.  
  4244. ;-----------------
  4245. If b\mode=7
  4246. b\y=b\y+2
  4247. exx = b\x -80 + Rnd(150)
  4248. exy = b\y-20+Rnd(40)
  4249. expkind = Rnd (1)
  4250. createexplosion ()
  4251. If b\y>450
  4252. exx= b\x
  4253. exy=b\y Delete b
  4254. For p.player=Each player
  4255. p\score=p\score+10000
  4256. Next
  4257. createbossexplosion ()
  4258. EndIf
  4259. EndIf
  4260.  
  4261.  
  4262. Next
  4263. End Function
  4264.  
  4265. Function drawboss2 ()
  4266. For b.boss2 = Each boss2
  4267. If b <> Null
  4268. DrawImage boss2, b\x, b\y, b\frame
  4269. EndIf
  4270. Next
  4271. End Function
  4272. ;----------------------BOSS 3-------------------------------
  4273.  
  4274. Function createboss3 ()
  4275. b.boss3=New boss3
  4276. b\x=150
  4277. b\y= 250
  4278. b\mode=0
  4279. b\life=10
  4280. b\frame=0
  4281. aliensalive=1
  4282. b\timer=MilliSecs()
  4283. End Function
  4284.  
  4285. Function updateboss3 ()
  4286. For b.boss3 = Each boss3
  4287. If b <> Null
  4288. If b\mode=0
  4289. b\y=b\y-3
  4290. If b\y<200 b\y=200
  4291. b\newtime=MilliSecs()
  4292. If b\timer-b\newtime<-100
  4293. b\frame=b\frame+1
  4294. If b\frame=5
  4295. b\mode=1
  4296. EndIf
  4297. b\timer=MilliSecs()
  4298. EndIf
  4299. EndIf
  4300. ;---------
  4301. If b\mode=1
  4302. b\x = b\x+5
  4303. b\random = Rnd (8)
  4304. If b\random = 5 bombx=b\x : bomby = b\y: dropdoublebomb ()
  4305. For m.Missile = Each Missile
  4306. If m <> Null
  4307. collide = 1
  4308. If (b\x+50)< m\x collide = 0
  4309. If (b\x-50)> m\x collide = 0
  4310. If (b\y+50)< m\y collide = 0
  4311. If (b\y-50)> m\y collide = 0
  4312.  
  4313. If collide = 1 Then
  4314. exx = m\x
  4315. exy = m\y
  4316. Delete m
  4317. b\life=b\life-1
  4318. expkind = 0
  4319. createexplosion ()
  4320. EndIf
  4321. EndIf
  4322. Next
  4323. If b\x > 725
  4324. b\x = 725
  4325. b\mode=2
  4326. EndIf
  4327. If b\life<1 b\mode = 16
  4328. EndIf
  4329. ;---------
  4330. If b\mode = 2
  4331. b\x=b\x-5
  4332. b\random = Rnd (8)
  4333. If b\random = 5 bombx=b\x : bomby = b\y: dropdoublebomb ()
  4334.  
  4335. For m.Missile = Each Missile
  4336. If m <> Null
  4337. collide = 1
  4338. If (b\x+50)< m\x collide = 0
  4339. If (b\x-50)> m\x collide = 0
  4340. If (b\y+50)< m\y collide = 0
  4341. If (b\y-50)> m\y collide = 0
  4342.  
  4343. If collide = 1 Then
  4344. exx = m\x
  4345. exy = m\y
  4346. Delete m
  4347. b\life=b\life-1
  4348. expkind = 0
  4349. createexplosion ()
  4350. EndIf
  4351. EndIf
  4352. Next
  4353. If b\x<75
  4354. b\x=75
  4355. b\mode=3
  4356. b\timer=MilliSecs ()
  4357. EndIf
  4358. If b\life<1 b\mode = 16
  4359. EndIf
  4360. ;-----------
  4361. If b\mode = 3
  4362. b\newtime=MilliSecs ()
  4363. If b\timer-b\newtime<-75
  4364. b\frame=b\frame+1
  4365. b\timer=MilliSecs ()
  4366. If b\frame=11
  4367. b\mode = 4
  4368. EndIf
  4369. EndIf
  4370. EndIf
  4371. ;------------
  4372. If b\mode = 4
  4373. b\y = b\y+7
  4374. For p.player = Each player
  4375. If p <> Null
  4376. collide = 1
  4377. If (b\x+75)< p\x collide = 0
  4378. If (b\x-75)> p\x collide = 0
  4379. If (b\y+75)< p\y collide = 0
  4380. If (b\y-75)> p\y collide = 0
  4381.  
  4382. If collide = 1 And p\invinc=0 And p\alive=1 Then
  4383. exx=p\x
  4384. exy=p\y
  4385. p\alive=0
  4386. expkind=3
  4387. shipexplosion ()
  4388. EndIf
  4389. EndIf
  4390. Next
  4391. If b\y>535
  4392. b\y = 535
  4393. b\mode = 5
  4394. EndIf
  4395. EndIf
  4396.  
  4397. ;-------------
  4398. If b\mode = 5
  4399. b\x = b\x+5
  4400.  
  4401. For p.player = Each player
  4402. If p <> Null
  4403. collide = 1
  4404. If (b\x+75)< p\x collide = 0
  4405. If (b\x-75)> p\x collide = 0
  4406. If (b\y+75)< p\y collide = 0
  4407. If (b\y-75)> p\y collide = 0
  4408.  
  4409. If collide = 1 And p\invinc=0 And p\alive=1 Then
  4410. exx=p\x
  4411. exy=p\y
  4412. p\alive=0
  4413. expkind=3
  4414. shipexplosion ()
  4415. EndIf
  4416. EndIf
  4417. Next
  4418.  
  4419.  
  4420. If b\x>650
  4421. b\x=650
  4422. b\mode = 6
  4423. EndIf
  4424. EndIf
  4425. ;--------------
  4426. If b\mode = 6
  4427. b\y = b\y-7
  4428. If b\y < 200
  4429. b\y = 200
  4430. b\mode = 7
  4431. b\timer=MilliSecs ()
  4432. EndIf
  4433. EndIf
  4434.  
  4435. ;---------------
  4436. If b\mode = 7
  4437. b\newtime=MilliSecs ()
  4438. If b\timer-b\newtime<-75
  4439. b\frame=b\frame-1
  4440. b\timer=MilliSecs ()
  4441. If b\frame=5
  4442. b\mode = 8
  4443. EndIf
  4444. EndIf
  4445. EndIf
  4446.  
  4447. ;-------------
  4448. If b\mode=8
  4449. b\x = b\x+5
  4450. b\random = Rnd (8)
  4451. If b\random = 5 bombx=b\x : bomby = b\y: dropdoublebomb ()
  4452. For m.Missile = Each Missile
  4453. If m <> Null
  4454. collide = 1
  4455. If (b\x+50)< m\x collide = 0
  4456. If (b\x-50)> m\x collide = 0
  4457. If (b\y+50)< m\y collide = 0
  4458. If (b\y-50)> m\y collide = 0
  4459.  
  4460. If collide = 1 Then
  4461. exx = m\x
  4462. exy = m\y
  4463. Delete m
  4464. b\life=b\life-1
  4465. expkind = 0
  4466. createexplosion ()
  4467. EndIf
  4468. EndIf
  4469. Next
  4470. If b\x > 725
  4471. b\x = 725
  4472. b\mode=9
  4473. EndIf
  4474. If b\life<1 b\mode = 16
  4475. EndIf
  4476. ;---------
  4477. If b\mode = 9
  4478. b\x=b\x-5
  4479. b\random = Rnd (8)
  4480. If b\random = 5 bombx=b\x : bomby = b\y: dropdoublebomb ()
  4481.  
  4482. For m.Missile = Each Missile
  4483. If m <> Null
  4484. collide = 1
  4485. If (b\x+50)< m\x collide = 0
  4486. If (b\x-50)> m\x collide = 0
  4487. If (b\y+50)< m\y collide = 0
  4488. If (b\y-50)> m\y collide = 0
  4489.  
  4490. If collide = 1 Then
  4491. exx = m\x
  4492. exy = m\y
  4493. Delete m
  4494. b\life=b\life-1
  4495. expkind = 0
  4496. createexplosion ()
  4497. EndIf
  4498. EndIf
  4499. Next
  4500. If b\x<75
  4501. b\x=75
  4502. b\mode=10
  4503. EndIf
  4504. If b\life<1 b\mode = 16
  4505. EndIf
  4506. ;-------------
  4507. If b\mode=10
  4508. b\x = b\x+5
  4509. b\random = Rnd (20)
  4510. If b\random = 10 bombx=b\x : bomby = b\y: dropdoublebomb ()
  4511. For m.Missile = Each Missile
  4512. If m <> Null
  4513. collide = 1
  4514. If (b\x+50)< m\x collide = 0
  4515. If (b\x-50)> m\x collide = 0
  4516. If (b\y+50)< m\y collide = 0
  4517. If (b\y-50)> m\y collide = 0
  4518.  
  4519. If collide = 1 Then
  4520. exx = m\x
  4521. exy = m\y
  4522. Delete m
  4523. b\life=b\life-1
  4524. expkind = 0
  4525. createexplosion ()
  4526. EndIf
  4527. EndIf
  4528. Next
  4529. If b\x > 710
  4530. b\x = 710
  4531. b\mode=11
  4532. b\timer=MilliSecs ()
  4533. EndIf
  4534. If b\life<1 b\mode = 16
  4535. EndIf
  4536. ;-----------
  4537. If b\mode = 11
  4538. b\newtime=MilliSecs ()
  4539. If b\timer-b\newtime<-75
  4540. b\frame=b\frame+1
  4541. b\timer=MilliSecs ()
  4542. If b\frame=11
  4543. b\mode = 12
  4544. EndIf
  4545. EndIf
  4546. EndIf
  4547. ;------------
  4548. If b\mode = 12
  4549. b\y = b\y+7
  4550. For p.player = Each player
  4551. If p <> Null
  4552. collide = 1
  4553. If (b\x+75)< p\x collide = 0
  4554. If (b\x-75)> p\x collide = 0
  4555. If (b\y+75)< p\y collide = 0
  4556. If (b\y-75)> p\y collide = 0
  4557.  
  4558. If collide = 1 And p\invinc=0 And p\alive=1 Then
  4559. exx=p\x
  4560. exy=p\y
  4561. p\alive=0
  4562. expkind=3
  4563. shipexplosion ()
  4564. EndIf
  4565. EndIf
  4566. Next
  4567. If b\y>535
  4568. b\y = 535
  4569. b\mode = 13
  4570. EndIf
  4571. EndIf
  4572.  
  4573. ;-------------
  4574. If b\mode = 13
  4575. b\x = b\x-5
  4576. For p.player = Each player
  4577. If p <> Null
  4578. collide = 1
  4579. If (b\x+75)< p\x collide = 0
  4580. If (b\x-75)> p\x collide = 0
  4581. If (b\y+75)< p\y collide = 0
  4582. If (b\y-75)> p\y collide = 0
  4583.  
  4584. If collide = 1 And p\invinc=0 And p\alive=1 Then
  4585. exx=p\x
  4586. exy=p\y
  4587. p\alive=0
  4588. expkind=3
  4589. shipexplosion ()
  4590. EndIf
  4591. EndIf
  4592. Next
  4593. If b\x<150
  4594. b\x=150
  4595. b\mode = 14
  4596. EndIf
  4597. EndIf
  4598. ;--------------
  4599. If b\mode = 14
  4600. b\y = b\y-7
  4601. If b\y < 200
  4602. b\y = 200
  4603. b\mode = 15
  4604. b\timer=MilliSecs ()
  4605. EndIf
  4606. EndIf
  4607.  
  4608. ;---------------
  4609. If b\mode = 15
  4610. b\newtime=MilliSecs ()
  4611. If b\timer-b\newtime<-75
  4612. b\frame=b\frame-1
  4613. b\timer=MilliSecs ()
  4614. If b\frame=5
  4615. b\mode = 1
  4616. EndIf
  4617. EndIf
  4618. EndIf
  4619.  
  4620.  
  4621. ;-----------------
  4622. If b\mode = 16
  4623. bosschannel = PlaySound (bossdeathsound)
  4624. explosionchannel = PlaySound (loopexpsound)
  4625. b\mode = 17
  4626. EndIf
  4627.  
  4628. ;-----------------
  4629. If b\mode=17
  4630. b\y=b\y+2
  4631. exx = b\x -75 + Rnd(150)
  4632. exy = b\y-75+Rnd(150)
  4633. expkind = Rnd (1)
  4634. createexplosion ()
  4635. If b\y>450
  4636. exx= b\x
  4637. exy=b\y Delete b
  4638. For p.player=Each player
  4639. p\score=p\score+10000
  4640. Next
  4641. createbossexplosion ()
  4642. EndIf
  4643. EndIf
  4644.  
  4645.  
  4646. EndIf
  4647. Next
  4648. End Function
  4649.  
  4650. Function drawboss3 ()
  4651. For b.boss3 = Each boss3
  4652. If b <> Null
  4653. DrawImage boss3, b\x, b\y, b\frame
  4654. EndIf
  4655. Next
  4656. End Function
  4657. ;------------------------------BOSS 4--------------------------------
  4658. Function createboss4 ()
  4659. b.boss1=New boss1
  4660. b\x=400
  4661. b\y= -75
  4662. b\mode=0
  4663. b\life=1
  4664. b\frame=0
  4665. aliensalive=1
  4666. End Function
  4667.  
  4668. Function updateboss4 ()
  4669. For b.boss1 = Each boss1
  4670. If b <> Null
  4671. If b\life=21 b\mode=7
  4672. ;------------------
  4673. If b\mode=0
  4674. b\y=b\y+2
  4675. If b\y>150
  4676. b\y=150
  4677. b\mode=1
  4678. b\timer=MilliSecs()
  4679. EndIf
  4680. EndIf
  4681.  
  4682. ;-----------------
  4683. If b\mode=1
  4684. b\newtime=MilliSecs()
  4685. If b\timer-b\newtime<-75
  4686. b\frame=b\frame+1
  4687. If b\frame=9
  4688. b\mode=2
  4689. EndIf
  4690. b\timer=MilliSecs()
  4691. EndIf
  4692. EndIf
  4693. ;-------------
  4694. If b\mode=2
  4695. b\x=b\x+b\life
  4696. b\random = Rnd (60)
  4697. If b\random = 5 bombx=b\x : bomby = b\y: exx = 0 :dropboss4bomb ()
  4698.  
  4699. For m.Missile = Each Missile
  4700. If m <> Null
  4701. collide = 1
  4702. If (b\x+110)< m\x collide = 0
  4703. If (b\x-110)> m\x collide = 0
  4704. If (b\y+60)< m\y collide = 0
  4705. If (b\y-60)> m\y collide = 0
  4706.  
  4707. If collide = 1 Then
  4708. exx = m\x
  4709. exy = m\y
  4710. Delete m
  4711. b\life=b\life+1
  4712. expkind = 0
  4713. createexplosion ()
  4714. EndIf
  4715. EndIf
  4716. Next
  4717. If b\x>670
  4718. b\x=670
  4719. b\mode=3
  4720. EndIf
  4721. EndIf
  4722. ;-----------------
  4723. If b\mode=3
  4724. b\x=b\x-b\life
  4725. b\random = Rnd (60)
  4726. If b\random = 5 bombx=b\x : bomby = b\y: exx = 0 :dropboss4bomb ()
  4727. For m.Missile = Each Missile
  4728. If m <> Null
  4729. collide = 1
  4730. If (b\x+110)< m\x collide = 0
  4731. If (b\x-110)> m\x collide = 0
  4732. If (b\y+60)< m\y collide = 0
  4733. If (b\y-60)> m\y collide = 0
  4734.  
  4735. If collide = 1 Then
  4736. exx = m\x
  4737. exy = m\y
  4738. Delete m
  4739. b\life=b\life+1
  4740. expkind = 0
  4741. createexplosion ()
  4742. EndIf
  4743. EndIf
  4744. Next
  4745. If b\x<130
  4746. b\x=130
  4747. b\mode=4
  4748. b\timer=MilliSecs()
  4749. EndIf
  4750. EndIf
  4751. ;-------------------
  4752. If b\mode=4
  4753. b\newtime=MilliSecs()
  4754. If b\timer-b\newtime<-75
  4755. b\frame=b\frame-1
  4756. If b\frame=0
  4757. b\mode=5
  4758. EndIf
  4759. b\timer=MilliSecs()
  4760. EndIf
  4761. EndIf
  4762. ;-------------
  4763. If b\mode=5
  4764. b\x=b\x+b\life
  4765. b\random = Rnd (30)
  4766. If b\random = 5 bombx=b\x : bomby = b\y: exx = 1 :dropboss4bomb ()
  4767. If b\x>670 ;181
  4768. b\x=670
  4769. b\mode=6
  4770. EndIf
  4771. EndIf
  4772. ;-----------------
  4773. If b\mode=6
  4774. b\x=b\x-b\life
  4775. b\random = Rnd (30)
  4776. If b\random = 5 bombx=b\x : bomby = b\y: exx = 1 :dropboss4bomb ()
  4777. If b\x<130
  4778. b\x=130
  4779. b\mode=1
  4780. b\timer=MilliSecs()
  4781. EndIf
  4782. EndIf
  4783.  
  4784. ;------------------------
  4785. If b\mode = 7
  4786. bosschannel = PlaySound (bossdeathsound)
  4787. explosionchannel = PlaySound (loopexpsound)
  4788. b\mode=8
  4789. b\life=22
  4790. EndIf
  4791.  
  4792. If b\mode=8
  4793. b\y=b\y+2
  4794. exx = b\x -110 + Rnd(220)
  4795. exy = b\y-75+Rnd(150)
  4796. expkind = Rnd (1)
  4797. createexplosion ()
  4798. If b\y>400
  4799. exx= b\x
  4800. exy=b\y Delete b
  4801. For p.player=Each player
  4802. p\score=p\score+10000
  4803. Next
  4804. createbossexplosion ()
  4805. EndIf
  4806. EndIf
  4807.  
  4808. End If
  4809. Next
  4810. End Function
  4811.  
  4812. Function drawboss4 ()
  4813. For b.boss1 = Each boss1
  4814. If b <> Null
  4815. DrawImage boss4, b\x,b\y, b\frame
  4816. EndIf
  4817. Next
  4818. End Function
  4819.  
  4820. ;---------------------------GAME OVER----------------------------
  4821.  
  4822. Function gameover ()
  4823. For a.ufo = Each ufo
  4824. Delete a
  4825. If ChannelPlaying (ufochannel) <> 0 Then
  4826. StopChannel (ufochannel)
  4827. EndIf
  4828. Next
  4829. For b.powerup=Each powerup
  4830. Delete b
  4831. Next
  4832. For c.missile = Each missile
  4833. Delete c
  4834. Next
  4835. For d.bomb = Each bomb
  4836. Delete d
  4837. Next
  4838. For e.firebomb = Each firebomb
  4839. Delete e
  4840. Next
  4841. For f.tribomb = Each tribomb
  4842. Delete f
  4843. Next
  4844. For g.boomerangbomb = Each boomerangbomb
  4845. Delete g
  4846. Next
  4847.  
  4848. ufornd = 30
  4849.  
  4850. For h.asteroid = Each asteroid
  4851. If h <> Null
  4852. Delete h
  4853. EndIf
  4854. Next
  4855.  
  4856. For i.sludgebomb = Each sludgebomb
  4857. Delete i
  4858. Next
  4859.  
  4860. For j.doublebomb = Each doublebomb
  4861. Delete j
  4862. Next
  4863.  
  4864. For k.player = Each player
  4865. Delete k
  4866. Next
  4867.  
  4868. For l.alien = Each alien
  4869. Delete l
  4870. Next
  4871.  
  4872. For m.pubbomb = Each pubbomb
  4873. Delete m
  4874. Next
  4875.  
  4876. For n.pubbeam = Each pubbeam
  4877. Delete n
  4878. Next
  4879.  
  4880. For o.punlazer = Each punlazer
  4881. Delete o
  4882. Next
  4883.  
  4884. For p.explosion = Each explosion
  4885. Delete p
  4886. Next
  4887.  
  4888. For q.bossexplosion = Each bossexplosion
  4889. Delete q
  4890. Next
  4891.  
  4892. For r.shipbomb = Each shipbomb
  4893. Delete r
  4894. Next
  4895.  
  4896. For su.ufoscore = Each ufoscore
  4897. Delete su
  4898. Next
  4899.  
  4900. For t.bluebomb = Each bluebomb
  4901. Delete t
  4902. Next
  4903.  
  4904. For u.bombone = Each bombone
  4905. Delete u
  4906. Next
  4907.  
  4908. For v.boss1 = Each boss1
  4909. Delete v
  4910. Next
  4911.  
  4912. For w.boss2 = Each boss2
  4913. Delete w
  4914. Next
  4915.  
  4916. For z.boss3 = Each boss3
  4917. Delete z
  4918. Next
  4919.  
  4920. aliensalive = 0
  4921. maxmissiles = 0
  4922. astep = 1
  4923. level = 1
  4924.  
  4925. End Function
  4926. ;---------------------------------------------------------------------------------------
  4927. loadoptions ()
  4928. loadhighscores()
  4929.  
  4930. FlushKeys()
  4931.  
  4932.  
  4933. While Not KeyHit (1)
  4934. mainintro()
  4935. howtoplay ()
  4936. If completed = 1 gallery2()
  4937. displaypowerups()
  4938. displayhighscores()
  4939. gallery ()
  4940. alienpoints ()
  4941. sludgesoft()
  4942. Wend
  4943.  
  4944. Function game()
  4945.  
  4946. initializeplayer ()
  4947.  
  4948. initializelevel ()
  4949.  
  4950. ;-----------------main loop---------------------------------------------------------------------
  4951. Repeat
  4952.  
  4953. frames=WaitTimer(timer)
  4954. For k=1 To frames
  4955. If KeyHit (25)
  4956. PauseChannel (rockradio)
  4957. FlushKeys ()
  4958. WaitKey ()
  4959. ResumeChannel (rockradio)
  4960. FreeTimer (timer)
  4961. timer = CreateTimer(45)
  4962. EndIf
  4963.  
  4964. checkmusic ()
  4965.  
  4966. expcount = expcount-1
  4967. If expcount<0 expcount = 0
  4968.  
  4969. checkufo ()
  4970. updateufoscore ()
  4971.  
  4972. If level = 5 Or level = 15 Or level = 25 Or level = 35 checkasteroid ()
  4973. updateufo ()
  4974. updatepowerup ()
  4975. If level = 5 Or level = 15 Or level = 25 Or level = 35 updateasteroid ()
  4976.  
  4977. UpdateMissiles ()
  4978. updateplayer ()
  4979.  
  4980. updateframecounter ()
  4981.  
  4982. updatebomb ()
  4983. updateshipbomb ()
  4984. updatesludgebomb()
  4985. updatefirebomb ()
  4986. updatetribomb ()
  4987. updatedoublebomb ()
  4988. updatebluebomb ()
  4989. updateboomerangbomb ()
  4990. If level = 40 updateboss4bomb ()
  4991.  
  4992. updatebbomb ()
  4993. updatenlazer ()
  4994. updatebbeam ()
  4995.  
  4996.  
  4997. If level = 10 Or level = 20 updateboss1bomb()
  4998. directalien ()
  4999. directalien2 ()
  5000. dropalien ()
  5001.  
  5002. If boss = 0 updatealien ()
  5003. If level = 10 updateboss1 ()
  5004. If level = 20updateboss2 ()
  5005. If level = 30 updateboss3 ()
  5006. If level = 40 updateboss4 ()
  5007.  
  5008. udateexplosion ()
  5009. udateshipexplosion ()
  5010. If boss=1 udatebossexplosion ()
  5011. bgy=bgy+1
  5012. bgx= bgx-2
  5013.  
  5014. Next
  5015.  
  5016. If playerlives = 1
  5017.  
  5018. Cls
  5019.  
  5020.  
  5021.  
  5022. If level< 36 TileBlock background, 400, bgy
  5023. If level = 36 TileBlock background, bgy, 0
  5024. If level = 37 TileBlock background, bgx, 0
  5025. If level = 39 TileBlock background, bgx, bgy
  5026. If level = 40 TileBlock background, bgy, bgx
  5027.  
  5028.  
  5029.  
  5030. If level = 5 Or level = 15 Or level = 25 Or level = 35 drawasteroid ()
  5031. drawbomb ()
  5032. drawshipbomb ()
  5033. drawsludgebomb ()
  5034. drawfirebomb ()
  5035. drawtribomb ()
  5036. drawdoublebomb ()
  5037. drawbluebomb ()
  5038. drawboomerangbomb ()
  5039.  
  5040. drawbbomb ()
  5041. drawnlazer ()
  5042.  
  5043. If level=40 drawboss4bomb
  5044. If boss = 1drawboss1bomb ()
  5045. If boss = 0 DrawAlien ()
  5046. If boss = 1 drawbossexplosion ()
  5047. If level = 10 drawboss1 ()
  5048. If level = 20 drawboss2 ()
  5049. If level = 30 drawboss3 ()
  5050. If level = 40 drawboss4 ()
  5051. drawpowerup ()
  5052. drawmissiles ()
  5053. drawexplosion ()
  5054. drawufoscore ()
  5055. drawplayer ()
  5056. drawufo ()
  5057. drawbbeam ()
  5058. drawshipexplosion ()
  5059.  
  5060.  
  5061. Flip
  5062.  
  5063. EndIf
  5064.  
  5065.  
  5066. Until KeyHit (1) Or playerlives = 0
  5067.  
  5068. StopChannel (rockradio)
  5069. StopChannel (explosionchannel)
  5070. If ChannelPlaying (ufochannel) = 1
  5071. StopChannel ufochannel
  5072. EndIf
  5073.  
  5074. gameoveranim()
  5075. If playernewscore > Int(score10) enterhighscores()
  5076. gameover()
  5077. FreeTimer (timer)
  5078. FlushKeys ()
  5079. timer = CreateTimer (45)
  5080. End Function
  5081.  
  5082.  
  5083.  
  5084.  
  5085.  
  5086.  
  5087.  
  5088.  
  5089. .level1
  5090.  
  5091. Data 0,0,0,0
  5092. Data 0,0,0,0
  5093. Data 0,0,0,0
  5094. Data 99,0,0,0
  5095. Data 99,0,0,99
  5096. Data 99,99,0,99
  5097. Data 99,99,0,99
  5098. Data 99,0,0,99
  5099. Data 99,0,0,0
  5100. Data 0,0,0,0
  5101. Data 0,0,0,0
  5102. Data 0,0,0,0
  5103.  
  5104. .level2
  5105.  
  5106. Data 0,0,0,0
  5107. Data 0,0,0,0
  5108. Data 0,0,0,0
  5109. Data 99,0,0,0
  5110. Data 99,0,0,3
  5111. Data 99,99,0,3
  5112. Data 99,99,0,3
  5113. Data 99,0,0,3
  5114. Data 99,0,0,0
  5115. Data 0,0,0,0
  5116. Data 0,0,0,0
  5117. Data 0,0,0,0
  5118.  
  5119. .level3
  5120.  
  5121. Data 7,7,7,7
  5122. Data 0,0,0,0
  5123. Data 0,0,0,0
  5124. Data 7,7,7,7
  5125. Data 0,0,0,0
  5126. Data 7,7,7,7
  5127. Data 7,7,7,7
  5128. Data 0,0,0,0
  5129. Data 7,7,7,7
  5130. Data 0,0,0,0
  5131. Data 0,0,0,0
  5132. Data 7,7,7,7
  5133.  
  5134.  
  5135.  
  5136. .level4
  5137.  
  5138. Data 0,0,0,3
  5139. Data 3,0,0,0
  5140. Data 3,0,0,0
  5141. Data 0,3,0,0
  5142. Data 0,3,0,0
  5143. Data 0,0,0,3
  5144. Data 0,0,0,3
  5145. Data 0,3,0,0
  5146. Data 0,3,0,0
  5147. Data 3,0,0,0
  5148. Data 3,0,0,0
  5149. Data 0,0,0,3
  5150.  
  5151. .level5
  5152.  
  5153. Data 32,32,32,32
  5154. Data 32,32,32,32
  5155. Data 99,99,99,99
  5156. Data 99,99,99,99
  5157. Data 32,32,32,32
  5158. Data 32,32,32,32
  5159. Data 32,32,32,32
  5160. Data 32,32,32,32
  5161. Data 99,99,99,99
  5162. Data 99,99,99,99
  5163. Data 32,32,32,32
  5164. Data 32,32,32,32
  5165.  
  5166. .level6
  5167.  
  5168. Data 9,9,9,11
  5169. Data 11,9,11,99
  5170. Data 11,9,9,9
  5171. Data 9,9,9,11
  5172. Data 9,11,9,11
  5173. Data 11,99,9,11
  5174. Data 11,99,9,11
  5175. Data 9,11,9,11
  5176. Data 9,9,9,11
  5177. Data 11,9,9,9
  5178. Data 11,9,11,99
  5179. Data 9,9,9,11
  5180.  
  5181. .level7
  5182.  
  5183. Data 0,0,0,3
  5184. Data 0,0,0,3
  5185. Data 10,0,0,10
  5186. Data 0,0,0,3
  5187. Data 0,0,0,3
  5188. Data 0,0,0,3
  5189. Data 0,0,0,3
  5190. Data 0,0,0,3
  5191. Data 0,0,0,3
  5192. Data 10,0,0,10
  5193. Data 0,0,0,3
  5194. Data 0,0,0,3
  5195.  
  5196. .level8
  5197.  
  5198. Data 0,11,11,0
  5199. Data 0,11,11,0
  5200. Data 0,11,11,0
  5201. Data 0,11,11,0
  5202. Data 0,11,11,0
  5203. Data 0,11,11,0
  5204. Data 0,11,11,0
  5205. Data 0,11,11,0
  5206. Data 0,11,11,0
  5207. Data 0,11,11,0
  5208. Data 0,11,11,0
  5209. Data 0,11,11,0
  5210.  
  5211. .level9
  5212.  
  5213. Data 10,10,10,10
  5214. Data 99,99,99,99
  5215. Data 10,10,10,10
  5216. Data 0,0,0,0
  5217. Data 99,99,99,99
  5218. Data 0,0,0,0
  5219. Data 0,0,0,0
  5220. Data 99,99,99,99
  5221. Data 0,0,0,0
  5222. Data 10,10,10,10
  5223. Data 99,99,99,99
  5224. Data 10,10,10,10
  5225.  
  5226. .level11
  5227.  
  5228. Data 16,16,16,16
  5229. Data 16,15,15,16
  5230. Data 16,15,15,16
  5231. Data 16,16,16,16
  5232. Data 99,99,99,99
  5233. Data 16,15,15,16
  5234. Data 16,15,15,16
  5235. Data 99,99,99,99
  5236. Data 16,16,16,16
  5237. Data 16,15,15,16
  5238. Data 16,15,15,16
  5239. Data 16,16,16,16
  5240.  
  5241. .level12
  5242.  
  5243. Data 16,16,14,99
  5244. Data 16,16,14,99
  5245. Data 16,16,14,99
  5246. Data 16,16,14,99
  5247. Data 16,16,14,99
  5248. Data 16,16,14,99
  5249. Data 16,16,14,99
  5250. Data 16,16,14,99
  5251. Data 16,16,14,99
  5252. Data 16,16,14,99
  5253. Data 16,16,14,99
  5254. Data 16,16,14,99
  5255.  
  5256. .level13
  5257.  
  5258. Data 8,8,8,99
  5259. Data 99,8,8,99
  5260. Data 99,8,8,8
  5261. Data 8,99,8,99
  5262. Data 8,99,8,8
  5263. Data 15,8,8,99
  5264. Data 15,8,8,99
  5265. Data 8,99,8,8
  5266. Data 8,99,8,99
  5267. Data 99,8,8,8
  5268. Data 99,8,8,99
  5269. Data 8,8,8,99
  5270.  
  5271. .level14
  5272. Data 14,14,14,14
  5273. Data 14,14,14,14
  5274. Data 14,14,14,14
  5275. Data 99,99,99,99
  5276. Data 99,99,99,99
  5277. Data 14,14,14,14
  5278. Data 14,14,14,14
  5279. Data 99,99,99,99
  5280. Data 99,99,99,99
  5281. Data 14,14,14,14
  5282. Data 14,14,14,14
  5283. Data 14,14,14,14
  5284.  
  5285. .level15
  5286.  
  5287. Data 16,16,16,16
  5288. Data 16,16,16,16
  5289. Data 16,16,16,16
  5290. Data 16,16,16,16
  5291. Data 16,16,16,16
  5292. Data 16,16,16,16
  5293. Data 16,16,16,16
  5294. Data 16,16,16,16
  5295. Data 16,16,16,16
  5296. Data 16,16,16,16
  5297. Data 16,16,16,16
  5298. Data 16,16,16,16
  5299.  
  5300. .level16
  5301.  
  5302. Data 5,6,8,8
  5303. Data 5,6,99,99
  5304. Data 5,6,8,8
  5305. Data 5,6,99,99
  5306. Data 5,6,8,8
  5307. Data 5,6,99,99
  5308. Data 5,6,99,99
  5309. Data 5,6,8,8
  5310. Data 5,6,99,99
  5311. Data 5,6,8,8
  5312. Data 5,6,99,99
  5313. Data 5,6,8,8
  5314.  
  5315. .level17
  5316.  
  5317. Data 17,18,17,99
  5318. Data 17,18,17,99
  5319. Data 17,18,17,99
  5320. Data 17,18,17,99
  5321. Data 17,18,17,99
  5322. Data 17,18,17,99
  5323. Data 17,18,17,99
  5324. Data 17,18,17,99
  5325. Data 17,18,17,99
  5326. Data 17,18,17,99
  5327. Data 17,18,17,99
  5328. Data 17,18,17,99
  5329.  
  5330. .level18
  5331.  
  5332. Data 18,99,18,18
  5333. Data 18,18,99,99
  5334. Data 18,99,18,99
  5335. Data 18,99,99,18
  5336. Data 18,99,18,99
  5337. Data 18,18,99,99
  5338. Data 18,18,99,99
  5339. Data 18,99,18,99
  5340. Data 18,99,99,18
  5341. Data 18,99,18,99
  5342. Data 18,18,99,99
  5343. Data 18,99,18,18
  5344.  
  5345. .level19
  5346.  
  5347. Data 16,16,18,16
  5348. Data 16,14,16,16
  5349. Data 16,16,18,16
  5350. Data 16,14,16,16
  5351. Data 16,16,18,16
  5352. Data 16,14,16,16
  5353. Data 16,14,16,16
  5354. Data 16,16,18,16
  5355. Data 16,14,16,16
  5356. Data 16,16,18,16
  5357. Data 16,14,16,16
  5358. Data 16,16,18,16
  5359.  
  5360. .level21
  5361. Data 0,0,0,0
  5362. Data 0,0,0,0
  5363. Data 0,0,0,0
  5364. Data 1,0,0,0
  5365. Data 1,0,0,0
  5366. Data 0,1,0,1
  5367. Data 0,1,0,1
  5368. Data 1,0,0,0
  5369. Data 1,0,0,0
  5370. Data 0,0,0,0
  5371. Data 0,0,0,0
  5372. Data 0,0,0,0
  5373.  
  5374. .level22
  5375. Data 0,1,14,1
  5376. Data 0,20,14,20
  5377. Data 0,0,14,20
  5378. Data 0,20,14,20
  5379. Data 0,0,14,20
  5380. Data 0,20,14,20
  5381. Data 0,20,14,20
  5382. Data 0,0,14,20
  5383. Data 0,20,14,20
  5384. Data 0,0,14,20
  5385. Data 0,20,14,20
  5386. Data 0,1,14,1
  5387.  
  5388. .level23
  5389. Data 22,22,22,22
  5390. Data 99,99,99,99
  5391. Data 22,22,22,22
  5392. Data 99,99,99,99
  5393. Data 22,22,22,22
  5394. Data 22,22,22,22
  5395. Data 22,22,22,22
  5396. Data 22,22,22,22
  5397. Data 99,99,99,99
  5398. Data 22,22,22,22
  5399. Data 99,99,99,99
  5400. Data 22,22,22,22
  5401.  
  5402. .level24
  5403. Data 22,22,22,22
  5404. Data 0,0,0,0
  5405. Data 1,22,0,22
  5406. Data 0,22,22,0
  5407. Data 0,22,0,22
  5408. Data 22,0,0,1
  5409. Data 22,0,0,1
  5410. Data 0,22,0,22
  5411. Data 0,22,22,0
  5412. Data 1,22,0,22
  5413. Data 0,0,0,0
  5414. Data 22,22,22,22
  5415.  
  5416. .level25
  5417. Data 21,21,21,21
  5418. Data 99,99,99,99
  5419. Data 21,21,21,21
  5420. Data 21,21,21,21
  5421. Data 99,99,99,99
  5422. Data 21,21,21,21
  5423. Data 21,21,21,21
  5424. Data 99,99,99,99
  5425. Data 21,21,21,21
  5426. Data 21,21,21,21
  5427. Data 99,99,99,99
  5428. Data 21,21,21,21
  5429.  
  5430. .level26
  5431. Data 20,23,20,23
  5432. Data 20,23,20,23
  5433. Data 20,23,20,23
  5434. Data 20,23,20,23
  5435. Data 20,23,20,23
  5436. Data 20,23,20,23
  5437. Data 20,23,20,23
  5438. Data 20,23,20,23
  5439. Data 20,23,20,23
  5440. Data 20,23,20,23
  5441. Data 20,23,20,23
  5442. Data 20,23,20,23
  5443.  
  5444. .level27
  5445. Data 24,24,24,24
  5446. Data 24,24,24,24
  5447. Data 24,24,24,24
  5448. Data 24,24,24,24
  5449. Data 99,99,99,99
  5450. Data 24,24,24,24
  5451. Data 24,24,24,24
  5452. Data 99,99,99,99
  5453. Data 24,24,24,24
  5454. Data 24,24,24,24
  5455. Data 24,24,24,24
  5456. Data 24,24,24,24
  5457.  
  5458. .level28
  5459. Data 22,23,24,22
  5460. Data 22,23,24,22
  5461. Data 22,23,24,22
  5462. Data 22,23,24,22
  5463. Data 22,23,24,22
  5464. Data 22,23,24,22
  5465. Data 22,23,24,22
  5466. Data 22,23,24,22
  5467. Data 22,23,24,22
  5468. Data 22,23,24,22
  5469. Data 22,23,24,22
  5470. Data 22,23,24,22
  5471.  
  5472. .level29
  5473. Data 11,11,11,11
  5474. Data 11, 1,1 ,11
  5475. Data 11,11,11,11
  5476. Data 20,23,20,23
  5477. Data 20,23,20,23
  5478. Data 20,23,20,23
  5479. Data 20,23,20,23
  5480. Data 20,23,20,23
  5481. Data 20,23,20,23
  5482. Data 11,11,11,11
  5483. Data 11,1 ,1 ,11
  5484. Data 11,11,11,11
  5485.  
  5486.  
  5487. .level31
  5488. Data 28,28,28,28
  5489. Data 4 ,4 ,4 ,4
  5490. Data 4 ,4 ,4 ,4
  5491. Data 28,28,28,28
  5492. Data 4 ,4 ,4 ,4
  5493. Data 28,28,28,28
  5494. Data 28,28,28,28
  5495. Data 4 ,4 ,4 ,4
  5496. Data 28,28,28,28
  5497. Data 4 ,4 ,4 ,4
  5498. Data 4 ,4 ,4 ,4
  5499. Data 28,28,28,28
  5500.  
  5501. .level32
  5502. Data 11,11,11,2
  5503. Data 11,11,11,11
  5504. Data 11,11,11,11
  5505. Data 11,11,11,2
  5506. Data 11,11,99,99
  5507. Data 11,2 ,11,11
  5508. Data 11,2 ,11,11
  5509. Data 11,11,99,99
  5510. Data 11,11,11,2
  5511. Data 11,11,11,11
  5512. Data 11,11,11,11
  5513. Data 11,11,11,2
  5514.  
  5515. .level33
  5516. Data 20,24,24,24
  5517. Data 24,20,24,24
  5518. Data 24,24,20,24
  5519. Data 24,24,24,20
  5520. Data 24,24,20,24
  5521. Data 24,20,24,24
  5522. Data 24,20,24,24
  5523. Data 24,24,20,24
  5524. Data 24,24,24,20
  5525. Data 24,24,20,24
  5526. Data 24,20,24,24
  5527. Data 20,24,24,24
  5528.  
  5529. .level34
  5530. Data 19,19,99,19
  5531. Data 19,19,99,19
  5532. Data 19,19,99,19
  5533. Data 19,19,99,19
  5534. Data 19,19,99,19
  5535. Data 19,19,99,19
  5536. Data 19,19,99,19
  5537. Data 19,19,99,19
  5538. Data 19,19,99,19
  5539. Data 19,19,99,19
  5540. Data 19,19,99,19
  5541. Data 19,19,99,19
  5542.  
  5543. .level35
  5544. Data 18,18,99,22
  5545. Data 18,18,99,22
  5546. Data 22,22,99,18
  5547. Data 22,22,99,18
  5548. Data 99,18,99,22
  5549. Data 99,22,99,18
  5550. Data 99,22,99,18
  5551. Data 99,18,99,22
  5552. Data 22,22,99,18
  5553. Data 22,22,99,18
  5554. Data 18,18,99,22
  5555. Data 18,18,99,22
  5556.  
  5557. .level36
  5558. Data 12,12,12,12
  5559. Data 12,12,12,12
  5560. Data 12,12,12,12
  5561. Data 99,2,99,99
  5562. Data 99,2,99,2
  5563. Data 99,2,99,2
  5564. Data 99,2,99,2
  5565. Data 99,2,99,2
  5566. Data 99,2,99,99
  5567. Data 12,12,12,12
  5568. Data 12,12,12,12
  5569. Data 12,12,12,12
  5570.  
  5571.  
  5572. .level37
  5573. Data 0,1,2,3
  5574. Data 4,5,6,7
  5575. Data 8,9,10,11
  5576. Data 12,14,15,16
  5577. Data 17,18,19,20
  5578. Data 21,22,23,28
  5579. Data 21,22,23,24
  5580. Data 17,18,19,20
  5581. Data 12,14,15,16
  5582. Data 8,9,10,11
  5583. Data 4,5,6,7
  5584. Data 0,1,2,3
  5585.  
  5586.  
  5587. .level38
  5588. Data 27,26,26,25
  5589. Data 27,26,26,25
  5590. Data 27,26,26,25
  5591. Data 27,26,26,25
  5592. Data 27,26,26,25
  5593. Data 27,26,26,25
  5594. Data 27,26,26,25
  5595. Data 27,26,26,25
  5596. Data 27,26,26,25
  5597. Data 27,26,26,25
  5598. Data 27,26,26,25
  5599. Data 27,26,26,25
  5600.  
  5601. .level39
  5602. Data 29,29,30,31
  5603. Data 29,29,30,31
  5604. Data 29,29,30,31
  5605. Data 29,29,30,31
  5606. Data 29,29,30,31
  5607. Data 29,29,30,31
  5608. Data 29,29,30,31
  5609. Data 29,29,30,31
  5610. Data 29,29,30,31
  5611. Data 29,29,30,31
  5612. Data 29,29,30,31
  5613. Data 29,29,30,31
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement