home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 18 / 018.d81 / pygmalion (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  6KB  |  162 lines

  1. 10 m$(1)="[129]           i feel relaxed              "
  2. 20 m$(2)="[149]         i feel very sleepy            "
  3. 30 m$(3)=""
  4. 40 m$(4)=""
  5. 50 m$(5)=""
  6. 51 :
  7. 55 rem***********************
  8. 56 rem** variable assignments
  9. 57 rem***********************
  10. 58 :
  11. 60 ba=53280:sa=53281:rem***** border and screen color addresses *****
  12. 70 cl=54272:rem*** add to screen poke to generate character color ***
  13. 80 ch=160:rem*** set screen character to reversed space ***
  14. 81 :
  15. 90 rem*************************
  16. 100 rem** start of main program
  17. 105 rem************************
  18. 106 :
  19. 110 goto 1000:rem*** go to title and instruction screens ***
  20. 120 x=int(rnd(0)*5)+1:rem*** pick a message at random ***
  21. 130 bc=int(rnd(0)*14)+1
  22. 140 rem*** pick any screen/border color but black or gray 3 ***
  23. 150 pokeba,bc:pokesa,bc:rem** screen/border the same color ***
  24. 160 a=1064:b=a+39:c=b+880:d=c-39        
  25. 170 rem** set starting 4 corner coordinates for animation sequence ***
  26. 171 :
  27. 175 rem************************
  28. 176 rem** begin animation loops
  29. 177 rem************************
  30. 178 :
  31. 180 cr=int(rnd(0)*14)+1:rem** pick character color - not black or gray3 **
  32. 190 for l = a to b
  33. 200 gosub 600
  34. 210 next l:rem*** plot top line coordinates and draw them ***
  35. 220 for l= b to c step 40
  36. 230 gosub 600
  37. 240 next l:rem*** plot right side coordinates and draw them ***
  38. 250 for l= c to d step -1
  39. 260 gosub 600
  40. 270 next l:rem*** plot bottom line coordinates and draw them ***
  41. 280 for l= d to a step -40
  42. 290 gosub 600
  43. 300 next l:rem*** plot left side coordinates and draw them ***
  44. 310 if fl=1 then 1050:rem*** if flag, go to instruction screens ***
  45. 320 a=a+41:b=b+39:c=c-41:d=d-39:rem*** reduce rectangle size by one ***
  46. 330 if l = 1475 then gosub 700:goto 120
  47. 340 rem*** if screen is full print message--then restart sequence ***
  48. 350 goto 180:rem** if screen is not full pick new color and draw **
  49. 352 rem** a new, smaller rectangle **
  50. 353 :
  51. 600 rem*************************
  52. 601 rem**print to screen routine
  53. 602 rem*************************
  54. 603 :
  55. 610 for t=1 to de:nextt:rem** delay loop to set speed of animation ***
  56. 620 poke l,ch:poke l+cl,cr
  57. 625 getzz$:ifzz$="q"then60000
  58. 630 rem*** poke character to screen in color chosen by rnd function **
  59. 640 return:rem*** go back for next screen location ***
  60. 641 :
  61. 700 rem**************************
  62. 701 rem* message printing routine
  63. 702 rem**************************
  64. 703 :
  65. 719 :
  66. 720 ifm$(x)=""then770
  67. 740 print"";m$(x)
  68. 741 fordl=1to100:nextdl
  69. 750 print"                                       "
  70. 760 rem*** print spaces to wipe out message ***
  71. 770 return:rem** go back to line 330 **
  72. 791 :
  73. 1000 rem***************
  74. 1005 rem** title screen
  75. 1006 rem***************
  76. 1007 :
  77. 1010 poke ba,11:poke sa,12:rem***** set screen/border to shades of gray **
  78. 1020 fl=1:rem*** set flag for animation to obey ***
  79. 1030 print"[147][144]pygmalion";
  80. 1035 print"[157][157][157][157][157]by[157][157][157][157][157][157][157]tim thompson"
  81. 1040 goto160:rem***** print title screen and draw border *****
  82. 1050 fl=0:rem*** release flag ***
  83. 1060 for t=1 to 880:nextt:rem***** wait one second *****
  84. 1070 for m=1 to 10:print:nextm:rem***** scroll screen away ******
  85. 1071 :
  86. 1073 rem************************
  87. 1074 rem** instruction screen #1
  88. 1075 rem************************
  89. 1076 :
  90. 1080 print"this program will draw a series of";
  91. 1085 print"concentric rectangles in ";
  92. 1090 print"different":print"colors, each one being smaller than the"
  93. 1095 print"one before it, until the entire screen":print"is filled."
  94. 1100 print:print"when that happens, the screen and border";
  95. 1110 print"will change color and the sequence will"
  96. 1120 print"begin again.":print:print"each time a rectangle is complete,"
  97. 1130 print"the computer picks a new color for the"
  98. 1140 print"next rectangle. this new color might be"
  99. 1150 print"the same as the old color, or it could"
  100. 1160 print"be different...only the computer knows!"
  101. 1170 print"two rectangles of the same color will"
  102. 1180 print"appear twice as wide as the others."
  103. 1190 print:print"thus, what you see is never the same."
  104. 1200 print:print"press any key for next page"
  105. 1210 get k$:if k$=""then 1210:rem** wait for any key to be pressed **
  106. 1211 :
  107. 1214 rem************************
  108. 1215 rem** instruction screen #2
  109. 1216 rem************************
  110. 1217 :
  111. 1220 print:print:print"this can be very relaxing."
  112. 1230 print:print"while you watch this animation, follow"
  113. 1240 print"the pattern with your eyes."
  114. 1250 print:print"breathe deeply and let the smooth motion";
  115. 1260 print"help you achieve a feeling of peace and"
  116. 1270 print"calm.  let go of tension and stress."
  117. 1280 print:print"perhaps, you might like to listen to"
  118. 1290 print"some soft music as you watch."
  119. 1300 print:print"if you do listen to music, play"
  120. 1310 print"something soothing that helps you relax."
  121. 1320 print"as you watch, the computer will flash"
  122. 1330 print"special messages for you.  don't try to"
  123. 1340 print"read them, just sit back and watch."
  124. 1350 print:print"let the computer work for you as you"
  125. 1360 print"relax and enjoy all the patterns and"
  126. 1370 print"colors it produces."
  127. 1380 print:print"press any key for next page"
  128. 1390 get k$:if k$=""then 1390:rem** wait for any key to be pressed **
  129. 1391 :
  130. 1392 rem************************
  131. 1394 rem** instruction screen #3
  132. 1395 rem************************
  133. 1396 :
  134. 1400 print:print:print"before we begin, the computer needs to"
  135. 1410 print"get an idea of what animation speed is"
  136. 1420 print"is most relaxing for you."
  137. 1430 print:print"at the prompt, you may enter a number"
  138. 1440 print"between 1 and 10."
  139. 1445 print:print"1 - will make the animation fast."
  140. 1450 print:print"10 - will make the animation slower."
  141. 1460 print:print"experiment with different speeds each"
  142. 1470 print"time you watch this program."
  143. 1480 print:print"remember, you can always stop by"
  144. 1490 print"pressing the q[146] key."
  145. 1500 print:print"we are ready to begin.  the computer"
  146. 1510 print"will start to draw as soon as you enter"
  147. 1520 print"a number and press return[146]."
  148. 1530 print"":print"[145][145]":input"animation speed";de
  149. 1532 rem** get speed from user and store in delay variable **
  150. 1540 for b= 1 to 24:print:nextb:rem** scroll screen away **
  151. 1550 print"[152]":goto 120:rem** make message color gray 2 and start **
  152. 1561 rem*any color imbedded in a message will not affect the animation color *
  153. 1563 rem*message color will override the 'gray 2' color command in 1550 *
  154. 1564 :
  155. 1565 rem************************
  156. 1566 rem** to run this program effectively, delete all 'rem' statements **
  157. 1567 rem** and remove the numbered ':'  statements **
  158. 1568 rem** these are put here for clarity, not function **
  159. 1570 rem************************
  160. 60000 rem  connect to ls
  161. 60010 load"payload connect",8:end
  162.