home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 1: Collection A / 17Bit_Collection_A.iso / files / 37.dms / 37.adf / demo.bas < prev    next >
BASIC Source File  |  1988-05-22  |  10KB  |  292 lines

  1. 5     AUDIO 15,1
  2. 10    A$ = TRANSLATE$("HELLO I AM THE NEW AMIGA PERSONAL COMPUTER FROM COMMODORE!")
  3. 15    B$ = TRANSLATE$("I HAVE A SHORT DEMO FOR YOU TO SEE. BUT FIRST I WANT TO TELL YOU A LITTLE ABOUT MYSELF.")
  4. 20    C$ = TRANSLATE$("FIRST OFF I AM RUNNING IN A  BASIC CREATED BY METACOMPCO, FOR THE AMIGA, IT CAME FREE WITH ME.")
  5. 25    D$ = TRANSLATE$("I HAVE BUILT IN SPRITES ,BLITTERS ,SPEECH SYNTHISYS ,STEREO SOUND ,AND I CAN BE I.B.M COMPATIBLE. THE LIST GOES ON AND ON.")
  6. 30    E$ = TRANSLATE$("I HAVE GRAPHIC CAPABILITIES THAT WILL BLOW YOUR MIND THEY ARE SECOND TO NONE. MY GRAPHICS CHIP HANDLES THAT.")
  7. 35    F$ = TRANSLATE$("MY SOUND IS EXCELENT THANKS TO MY SOUND CHIP IT MADE THIS PROGRAM SO EASY.")
  8. 110   X% = NARRATE (A$) 
  9. 111   X% = NARRATE (B$)
  10. 112   X% = NARRATE (C$)
  11. 113   X% = NARRATE (D$)
  12. 114   X% = NARRATE (E$)
  13. 115   X5 = NARRATE (F$)
  14. 160   SCNCLR
  15. 161   c = 1 : x = 10 : y = 10 : d = 10 : h = 1
  16. 162   penb 2
  17. 163   paint (0,50)
  18. 165   circle (x,y), d, h
  19. 170   x1 = x1+3 
  20. 175   y = y+3
  21. 180   d = d+2
  22. 182   peno c
  23. 183   c = c + 1
  24. 184   if c = 31 then c = 1
  25. 185   circle (x1,y), d, h
  26. 190   IF Y = 166 THEN SLEEP 5*10^6 :SCNCLR :GOTO 200 
  27. 195   goto 170
  28. 200   CIRCLE (145,90), 0, 1
  29. 201   penb 4 : paint (0,0) :c = 1 : peno c
  30. 205   S1 = S1+1
  31. 206   c = c + 1 : if c = 31 then c = 1
  32. 207   peno c
  33. 210   CIRCLE (145,90), S1, 1
  34. 215   IF S1 = 90 THEN SLEEP 5*10^6 :SCNCLR : GOTO 225
  35. 220   GOTO 205
  36. 225   draw (1,1 to 320,1)
  37. 230   y1 = y1+1
  38. 231   c = c+1 : pena c : if c = 31 then c = 1
  39. 235   draw (1,y1 to 320,y1)
  40. 240   if y1 = 190 then sleep 5*10^6 : scnclr : goto 265 
  41. 245   goto 230
  42. 250   B$ = TRANSLATE$("THANK YOU FOR WATCHING THE DEMO.")
  43. 255   X% = NARRATE (B$) : GOTO 1500
  44. 260   end
  45. 265   draw (1,1 to 1,190)
  46. 270   x2 = x2+1
  47. 271   c = c+1 : pena c : if c = 31 then c = 1
  48. 275   draw (x2,1 to x2,190)
  49. 280   if x2 = 300 then sleep 5*10^6 :scnclr : goto 290
  50. 285   goto 270
  51. 290   draw (1,1 to 1,1)
  52. 295   x3 = x3+1 
  53. 300   y3 = y3+1 
  54. 301   c =c+1 : pena c : if c = 31 then c = 1
  55. 305   draw (x3,1 to 1,y3)
  56. 310   if y3 = 200 then sleep 5*10^6 : scnclr : goto 320
  57. 315   goto 295
  58. 320   draw (1,190 to 1,1)
  59. 325   x5 = x5+1
  60. 326   c = c+1 : pena c : if c = 31 then c = 1
  61. 330   draw (1,190 to x5,1)
  62. 335   if x5 = 320 then goto 345
  63. 340   goto 325
  64. 345   y6 = y6+1
  65. 346   c = c+1 : pena c : if c = 31 then c = 1
  66. 350   draw (1,190 to 320,y6)
  67. 355   if y6 = 190 then sleep 5*10^6 : scnclr : goto 370
  68. 360   goto 345
  69. 370   ? "    TO EXIT NEXT DEMO PRESS LEFT"
  70. 371   ? "           MOUSE BUTTON"
  71. 380   SLEEP 5*10^6
  72. 400   scnclr
  73. 401   penb 6
  74. 402   paint (50,50)
  75. 405   c=1
  76. 410   x = 24 : y = 50
  77. 415   z = 24 : k = 100
  78. 420   dx = 3 : dy =3
  79. 425   dz = 6 : dk = 6
  80. 430   draw (x,y to z,k)
  81. 435   c = c+1 : pena c
  82. 440   x = x + dx
  83. 445   z = z + dz
  84. 450   if x < 4 or x > 300 then dx = - dx
  85. 455   if z < 4 or z > 300 then dz = - dz
  86. 460   y = y + dy
  87. 465   k = k + dk
  88. 470   if y < 5 or y > 190 then dy = - dy
  89. 475   if k < 5 or k > 190 then dk = -dk
  90. 480   if c = 31 then c = 1
  91. 485   ask mouse x%, y%, b%
  92. 486   if b% <> 0 then goto 500
  93. 490   goto 430
  94. 500   scnclr
  95. 505   c = 1 :pena c
  96. 510   draw (100,150 to 100,145 to 105,145 to 150,50 to 145,50)
  97. 515   draw (145,50 to 145,45 to 175,45 to 175,50 to 170,50 to 185,145)
  98. 520   draw (185,145 to 190,145 to 190,150 to 170,150 to 170,145)
  99. 525   draw (170,145 to 175,145 to 168,100 to 136,100)
  100. 530   draw (136,100 to 115,145 to 120,145 to 120,150 to 100,150)
  101. 535   draw (100,150 to 95,148 to 95,143 to 100,143 to 145,50)
  102. 540   draw (145,50 to 140,48 to 140,43 to 170,43 to 175,45)
  103. 545   draw (95,143 to 100,145)
  104. 550   draw (145,45 to 140,43)
  105. 555   draw (115,143 to 120,145)
  106. 560   draw (100,143 to 105,145)
  107. 565   draw (170,150 to 165,148 to 165,143 to 170,143 to 163,100)
  108. 570   draw (170,143 to 175,145)
  109. 575   draw (166,90 to 162,60 to 155,60 to 141,90 to 166,90)
  110. 580   draw (185,143 to 190,145)
  111. 585   draw (161,88 to 157,60)
  112. 590   draw (161,88 to 142,88)
  113. 595   draw (161,88 to 166,90)
  114. 600   draw (165,143 to 170,145)
  115. 605   paint (10,10)
  116. 610   c = c + 1 : pena c : if c = 31 then goto 620
  117. 615   goto 510
  118. 620   scnclr
  119. 625   pena 1 : paint (10,10)
  120. 630   s = 10
  121. 635   y1 = 180
  122. 640   peno 4
  123. 645   circle (160,y1), s, .10
  124. 650   y1 = y1-6
  125. 655   s = s + ((s*.1)^1.3)
  126. 660   if y1 = 12 then sleep 5*10^6 : goto 670
  127. 665   goto 640
  128. 670   SCNCLR : ?"    TO EXIT NEXT DEMO PRESS LEFT"
  129. 671   ?"             MOUSE BUTTON"
  130. 672   SLEEP 5*10^6
  131. 678   SCNCLR
  132. 679   PENA 1
  133. 680   paint (10 , 10)
  134. 685   xc = 160 : yc = 90 : z = 0 : k =pi / 40
  135. 690   n = int(rnd(1)*17) 
  136. 695   pena n
  137. 700   for j = 0 to 1 : next : n = k
  138. 705   xd = int (rnd(1) * xc) : yd = int(rnd(1) * yc) : c = int(rnd(1)*5)
  139. 710   xa = xc + xd * cos(n) : xb = xc - xd * cos(n)
  140. 715   ya = yc + yd * sin(n) : yb = yc - yd * sin(n)
  141. 720   draw (xa,ya to xb,yb)
  142. 725   n = n + k : if n < pi then 710
  143. 730   ask mouse x% , y% , b%
  144. 735   if b% <>0 then goto 760
  145. 740   for j = 0 to 1 : next : goto 690
  146. 760   scnclr
  147. 765   x = 320 : y = 200 : c = x * rnd(0) : d = y * rnd (0)
  148. 770   a=0 : b=0 : j =0 : k=1 : n=2 : p=1
  149. 775   pena j : draw (a,j to c,d to a,y)
  150. 780   pena k : draw (a+k,j to c,d to a+k,y)
  151. 785   a=a+n : if a < x then 775
  152. 790   pena j : draw (j,b to c,d to x,b)
  153. 795   pena k : draw (j,b+k to c,d to x,b+k)
  154. 800   b=b+n : if b<y then 790
  155. 805   sleep 5*10^6 : goto 810
  156. 810   scnclr
  157. 811   rgb 7,0,15,0
  158. 812   rgb 10,5,5,15
  159. 815   drawmode 1
  160. 820   dim d(128,64)
  161. 825   input "number of levels 1 through 7" ; le
  162. 830   ?"hit c for coustom colours"
  163. 835   ?"return for default"
  164. 840   get a$ : if a$ = "" then 840
  165. 845   if a$ = chr$ (13) then lc = 7 : sc = 10
  166. 850   if a$ = "c" then gosub 1435
  167. 855   ds = 2 : for n =1 to le : ds = ds + 2 ^ (n-1) : next n
  168. 860   mx = ds-1 : my = mx / 2
  169. 865   rh = pi*30/180 :vt = rh *1.2
  170. 870   for n = 1 to le : l = 10000 / 1.8^n
  171. 875   ?"working on level" ; n
  172. 880   ib = mx / 2^n : sk = ib *2
  173. 885   gosub 930
  174. 890   gosub 965
  175. 895   gosub 1000
  176. 900   next n
  177. 905   scnclr
  178. 910   pena 1
  179. 915   paint (10,10) ,0
  180. 920   goto 1175
  181. 925   rem******
  182. 930   for ye = 0 to mx-1 step sk
  183. 935   for xe = ib + ye to mx step sk
  184. 940   ax = xe - ib : ay = ye : gosub 1040 : d1 = d : ax = xe + ib : gosub 1040 : d2 = d
  185. 945   d = (d1+d2)/2 + rnd(5) * l / 2 - l / 4 : ax = xe : ay =ye : gosub 1065
  186. 950   next xe
  187. 955   next ye : return
  188. 960   rem *************
  189. 965   for xe = mx to 1 step -sk
  190. 970   for ye = ib to xe step sk
  191. 975   ax = xe : ay = ye + ib : gosub 1040 : d1 = d : ay = ye -ib : gosub 1040 : d2 = d
  192. 980   d = (d1+d2) / 2 + rnd(1)* l / 2 - l / 4 : ax = xe : ay =ye : gosub 1065
  193. 985   next ye
  194. 990   next xe : return
  195. 995   rem******************
  196. 1000  for xe= 0 to mx - 1 step sk
  197. 1005  for ye = ib to mx - xe step sk
  198. 1010  ax= xe +ye - ib : ay = ye - ib : gosub 1040 : d1 = d
  199. 1015  ax = xe + ye +ib : ay = ye + ib : gosub 1040 : d2 = d
  200. 1020  ax = xe + ye : ay = ye : d= (d1 + d2 )/ 2 + rnd ( 1 ) * l / 2 - l / 4 : gosub 1065 
  201. 1025  next ye 
  202. 1030  next xe : return
  203. 1035  rem****************
  204. 1040  if ay > my then 1050
  205. 1045  by = ay : bx= ax : goto 1055
  206. 1050  by = mx +1 - ay : bx = mx -ax
  207. 1055  d= d ( bx , by ) : return
  208. 1060  rem*************
  209. 1065  if ay > my then 1075
  210. 1070  by = ay : bx = ax : goto 1080
  211. 1075  by = mx + 1 - ay : bx = mx - ax
  212. 1080  d( bx , by ) = d : return
  213. 1085  rem**********************
  214. 1090  if xo <> -999 then 1105
  215. 1095  if zz < 0 then gosub 1400 : z2 = zz : zz = 0 : goto 1165
  216. 1100  gosub 1410 : goto 1160
  217. 1105  if z2 > 0 and zz > 0 then 1160
  218. 1110  if z2 <0 and zz < 0 then z2 = zz : zz = 0 : goto 1165
  219. 1115  w3 = zz / (zz-z2) : x3 = (x2-xx)*w3+xx : y3 = (y2-yy)*w3+yy : z3 = 0
  220. 1120  zt = zz : yt = yy : xt = xx
  221. 1125  if zz > 0 then 1150
  222. 1130  rem*****************
  223. 1135  zz = z3 : yy = y3 : xx = x3 : gosub 1330
  224. 1140  gosub 1400 : zz = 0 : yy = yt : xx = xt : z2 = zt : goto 1165
  225. 1145  rem ******************
  226. 1150  zz = z3 : yy = y3 : xx = x3 : gosub 1330
  227. 1155  gosub 1410 : zz = zt : yy = yt : xx = xt
  228. 1160  z2 = zz
  229. 1165  x2 = xx : y2 = yy : return
  230. 1170  rem ****************
  231. 1175  gosub 1415
  232. 1180  xs = .04 : ys = .04 : zs = .04
  233. 1185  for ax = 0 to mx : xo=-999 : for ay = 0 to ax
  234. 1190  gosub 1040 : zz = d : yy = ay / mx * 10000 : xx = ax / mx *10000 -yy / 2
  235. 1195  gosub 1325 : next ay : next ax
  236. 1200  for ay = 0 to mx : xo = -999 : for ax = ay to mx
  237. 1205  gosub 1040 : zz = d : yy = ay / mx *10000 : xx = ax / mx *10000 -yy / 2
  238. 1210  gosub 1325 : next ax : next ay
  239. 1215  for ex = 0 to mx : xo = -999 : for ey = 0 to mx - ex
  240. 1220  ax = ex + ey : ay = ey : gosub 1040 : zz = d : yy = ay / mx *10000
  241. 1225  xx = ax / mx *10000 - yy / 2 : gosub 1325 : next ey : next ex
  242. 1230  goto 1425
  243. 1235  rem********
  244. 1240  if xx <> 0 then 1255
  245. 1245  if yy <=0 then ra = - pi / 2 : goto 1265
  246. 1250  ra = pi / 2 : goto 1265
  247. 1255  ra = atn(yy/xx)
  248. 1260  if xx < 0 then ra = ra + pi
  249. 1265  r1 = ra + rh : rd = sqr(xx*xx+yy*yy)
  250. 1270  xx = rd *cos(r1) : yy = rd * sin(r1)
  251. 1275  return
  252. 1280  rem******
  253. 1285  rd = sqr(zz*zz+xx*xx)
  254. 1290  if xx = 0 then ra = pi / 2 : goto 1305
  255. 1295  ra = atn (zz/xx)
  256. 1300  if xx <0 then ra = ra+pi
  257. 1305  r1 = ra-vt
  258. 1310  xx = rd *  cos(r1)+xx : zz = rd * sin(r1)
  259. 1315  return
  260. 1320  rem *************
  261. 1325  gosub 1090
  262. 1330  xx = xx * xs : yy = yy * ys : zz = zz *zs
  263. 1335  gosub 1240
  264. 1340  gosub 1285
  265. 1345  if xo = - 999 then pr$ = "m"
  266. 1350  if xo <> -999 then pr$ = "d"
  267. 1355  xp = int(yy)+cx : yp = int(zz)
  268. 1360  gosub 1375
  269. 1365  return
  270. 1370  rem*********
  271. 1375  xp = xp * 0.625 : yp = 33.14-0.663 *yp
  272. 1380  if pr$ = "m" then x8 = xp : y8 = yp : xo = x
  273. 1385  if y8 > 179 or y8 < 0 or yp > 179 or yp< 0 then return
  274. 1390  draw (x8,y8 to xp,yp)
  275. 1395  x8 = xp : y8 = yp : return
  276. 1400  pena sc : return
  277. 1405  rem***********
  278. 1410  pena lc : return
  279. 1415  return
  280. 1420  rem *******
  281. 1425  sleep 5*10^6 : goto 250
  282. 1430  end
  283. 1435  rem*****
  284. 1440  input "choose high colour 2 to 16" ; lc
  285. 1445  input "choose high colour 2 to 16" ; sc
  286. 1450  return
  287. 1500  C$ = TRANSLATE$ ("I AM AMIGA!")
  288. 1501  D$ = TRANSLATE$ ("I AM THE FUTURE!")
  289. 1502  X% = NARRATE (C$)
  290. 1503  X% = NARRATE (D$)
  291. 1504  END
  292.