home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 April / CHIP_4_98.ISO / Java / applet / life2d / life2d.txt < prev    next >
Encoding:
Text File  |  1998-02-21  |  11.9 KB  |  275 lines

  1.  
  2.           Anfy Life2d 2.1 - Copyright (C) by Fabio Ciucci 1996/98
  3.  
  4.  
  5. This applet can generate and simulate in realtime an Artificial Life,
  6. using Conway algorythm... the result is a sort of unicellular life.
  7. Remember that are needed both life2d.class , Lware.class and anfy.class.
  8. You must upload these 3 .class files and insert the <applet> tag on your
  9. html document to add this applet to your page.
  10. This applet is fully parametrized, so you can change many things to
  11. adapt the effect to your pages and purposes.
  12. Here an example of what you have to write in the html (the things after
  13. the ; are comments with min-max values acceptet):
  14.  
  15.  
  16. <applet code="life2d.class" width=180 height=160>  ; Name, Width, Height
  17. <param name=credits value="Applet by Fabio Ciucci (www.anfiteatro.it/java.html)">
  18. <param name=regcode value="NO">         ; Register code (if you have it)
  19. <param name=reglink value="NO">         ; URL where go optionally when clicked
  20. <param name=regnewframe value="YES">    ; Reglink opened in new frame?
  21. <param name=regframename value="_blank"> ; Name of new frame for reglink
  22. <param name=statusmsg value="Life2d applet">  ; Statusbar message
  23. <param name=res value="2">            ; Resolution (1-8)
  24. <param name=backR value="20">         ; RED comp. of backg. color (0-255)
  25. <param name=backG value="20">         ; GREEN comp. of backg. color (0-255)
  26. <param name=backB value="230">        ; BLUE comp. of backg. color (0-255)
  27. <param name=foreR value="250">        ; RED comp. of foregr. color (0-255)
  28. <param name=foreG value="250">        ; GREEN comp. of foregr. color (0-255)
  29. <param name=foreB value="60">         ; BLUE comp. of foregr. color (0-255)
  30. <param name=ldensity value="2">       ; Initial life density (1-9)
  31. <param name=textscroll value="tcubescr.txt"> ; File for scrolltext or "NO"
  32. <param name=textoffset value="140">          ; Txtscroll y offset
  33. <param name=textspeed value="1">          ; Txtscroll speed
  34. <param name=textfont value="Arial">       ; Txtscroll font name
  35. <param name=textbold value="NO">          ; Txtscroll bold ("YES" or "NO")
  36. <param name=textsize value="24">          ; Txtscroll font size
  37. <param name=textshadow value="YES">       ; Txtscroll shadow ("YES" or "NO")
  38. <param name=TextColR value="200">         ; Txtscroll color (red component)
  39. <param name=TextColG value="255">         ; Txtscroll color (green component)
  40. <param name=TextColB value="190">         ; Txtscroll color (blue component)
  41. <param name=TextSColR value="20">         ; Txtscroll shadow col. (red c.)
  42. <param name=TextSColG value="20">         ; Txtscroll shadow col. (green c.)
  43. <param name=TextSColB value="50">         ; Txtscroll shadow col. (blue c.)
  44. <param name=TextJumpAmp value="0">        ; Txtscroll jump aplitude
  45. <param name=TextJumpSpd value="0">        ; Txtscroll jump speed
  46. <param name=TextSineAmp value="0">        ; Txtscroll sineshape amplitude        
  47. <param name=TextSineSpd value="0">        ; Txtscroll sineshape movement
  48. <param name=TextSineAngle value="0">      ; Txtscroll sineangle / pixel  
  49. <param name=memdelay value="1000">    ; Memory deallocation delay
  50. <param name=priority value="3">       ; Task priority (1..10)
  51. <param name=MinSYNC value="10">           ; Min. milliseconds/frame for sync
  52. Your browser doesn't suppor Java.     ; Msg in no java browsers
  53. </applet>                             ; End of classtag
  54.  
  55.  
  56. NOTE: Don't place "; comments" on final HTML!!!
  57.  
  58. Copy and paste in your html document this cleared and correct tag:
  59.  
  60.  
  61. <applet code="life2d.class" width=200 height=180>
  62. <param name=credits value="Applet by Fabio Ciucci (www.anfiteatro.it/java.html)">
  63. <param name=regcode value="NO">
  64. <param name=reglink value="NO">
  65. <param name=regnewframe value="YES">
  66. <param name=regframename value="_blank">
  67. <param name=statusmsg value="Life2d applet">
  68. <param name=res value="2">
  69. <param name=backR value="20">
  70. <param name=backG value="20">
  71. <param name=backB value="230">
  72. <param name=foreR value="250">
  73. <param name=foreG value="250">
  74. <param name=foreB value="60">
  75. <param name=ldensity value="2">
  76. <param name=textscroll value="NO">
  77. <param name=textoffset value="70">
  78. <param name=textspeed value="1">
  79. <param name=textfont value="Arial">
  80. <param name=textbold value="YES">
  81. <param name=textsize value="14">
  82. <param name=textshadow value="YES">
  83. <param name=TextColR value="255">
  84. <param name=TextColG value="155">
  85. <param name=TextColB value="20">
  86. <param name=TextSColR value="20">
  87. <param name=TextSColG value="20">
  88. <param name=TextSColB value="50">
  89. <param name=TextJumpAmp value="0">
  90. <param name=TextJumpSpd value="0">
  91. <param name=TextSineAmp value="0">
  92. <param name=TextSineSpd value="0">
  93. <param name=TextSineAngle value="0">
  94. <param name=memdelay value="1000">
  95. <param name=priority value="3">
  96. <param name=MinSYNC value="10">
  97. Sorry, your browser doesn't suppor Java.
  98. </applet>
  99.  
  100.  
  101.                              ---------
  102.  
  103.  
  104. Here detailed instructions about how to change parameters:
  105.  
  106.  
  107. The credits parameter can't be changed otherwise the applet will not work.
  108.  
  109. To activate the reg parameters read the shareware registration notes.
  110. In the "regcode" parameter you have to place the registration code you
  111. purchase from the author. If it is correct and the applet is run from the
  112. registered domain name, you can use "reglink" parameter, where you can specify
  113. an URL where bring user when the applet is clicked.
  114. If you set to "YES" regnewframe, you can specify a frame where load the
  115. reglink:
  116.  
  117. "_blank"  : To load the link in a new blank unnamed browser window.
  118. "_self"   : To load the link into the same window the applet occupies.
  119. "_parent" : To load the link into the immediate FRAMESET parent.
  120. "_top"    : To load the link into the top body of the window.
  121.  
  122. Otherwise the frame name, for example "myframe1".
  123.  
  124. The size of the applet is determined by width and height tags.
  125.  
  126. The res parameter determine the resolution: with res=1 pixels are small,
  127. but effect is slow, with res=8 pixels are too great but effect fast.
  128. I think the best choices are 2-4.
  129.  
  130. You can change the background and foreground colours for best results over
  131. your web page, the RGB values are same as HTML tags, but in decimal values.
  132.  
  133. The "ldensity" parameter determine the amount of lifeforms at beginning.
  134.  
  135.  
  136.                              ---------
  137.  
  138.  
  139. Optional Scrolltext parameters:
  140.  
  141.  
  142. You can optionally activate a scrolltext that will scroll over the applet.
  143. If you don't need the scrolltext, deactivate it placing "NO" at the
  144. "textscroll" parameter.
  145. Otherwise you must supply the name of an ASCII text file, where you must
  146. write the text that you want to be scrolled.
  147. Is supported one only line of text, that can be long as you want.
  148. Remember to upload the text file too, if you activate the scrolltext!
  149.  
  150. If activated, here are the parameters:
  151.  
  152. With "textoffset" you choose the Y offset from the top: placing it to 0 the
  153. scroll will be placed on the top, for example, and placing a value near the
  154. height of the applet it will scroll at the bottom.
  155.  
  156. With "textspeed" parameter you decide the scrolling speed.
  157.  
  158. With "textfont" you choose the font of text. Don't choose a strange or not
  159. standard font, not present in all systems.
  160. The most common fonts are "Arial", "TimesRoman" and "Courier".
  161. If the required font is not present, the most "near" will be used.
  162.  
  163. Setting "textbold" to "YES" you will enlarge a bit the font, otherwise set
  164. it to "NO" for normal contours.
  165.  
  166. With "textsize" you can change the size of text font.
  167. The most common sizes are: 8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72.
  168. Intermediate values will be scaled to nearest available size.
  169.  
  170. Setting "textshadow" to "YES", a shadow will be added to textscroll.
  171. Otherwise, setting it to "NO", any shadow will be "projected".
  172.  
  173. You can choose the color of text with:
  174.  
  175. TextColR = Red component of color (0-255)
  176. TextColG = Green component of color (0-255)
  177. TextColB = Blue component of color (0-255)
  178.  
  179. For example, 0,0,0 is black, 255,255,255 is white, 255,0,0 is red,
  180. 255,255,0 is yellow, 128,128,128 is grey.
  181. You can compose any color you want, do it trying manually or use any paint
  182. program's color selector to find Red Green Blue components of your desired
  183. colors.
  184.  
  185. With TextSColR,TextSColG,TextSColB you can select the color for text shadow.
  186.  
  187. If you like, you can activate the text jumping function.
  188. If "TextJumpAmp" is set to "0", any jumping will be shown.
  189. But increasing the value will result in text jumping: more aplitute, more
  190. high jumps.
  191.  
  192. With "TextJumpSpd" parameter you can select the jumping speed.
  193.  
  194. If you like, you can also activate the sine scroll function.
  195. If "TextSineAmp" is set to 0, no sine distortion will be generated.
  196. But increasing the value will result in the that the text is waving. The
  197. higher amplitude, the more waving.
  198.  
  199. With the "TextSineSpd" parameter you can select the speed of the wave.
  200.  
  201. With the "TextSineAngle" parameter you control how many degrees in a sinewave
  202. shape the text will be deformed for each pixel. A higher value gives more
  203. distortion.
  204.  
  205.                              ---------
  206.  
  207.  
  208. Compatibility parameters:
  209.  
  210.  
  211. The "memdelay" parameter is useful only to run the applets without problems
  212. on some bugged versions of Netscape 3, that don't deallocate correctly
  213. the memory allocated, resulting in filling all the memory after a minute
  214. the applet is running. This can cause also a system crash in some cases.
  215. Last versions of browsers have fixed this problem, but if you want to run
  216. the applets on old bugged browsers too, set "memdelay" to low values, like
  217. "10" or "16", for example.
  218. But this will slow down a lot the applet speed, so you have to choose
  219. between speed (memdelay set to 1000 or higher) or slow compatibility with
  220. old browsers (memdelay set to 20 or lower).
  221.  
  222. The "priority" parameter is useful mainly when you are running more than
  223. one applet in same page, and one slows down or hangs.
  224. If this applet run too slow or hangs because other one steal all the CPU
  225. power, try increasing the priority.
  226. Otherwise, if this applet runs well and others slows down, decrease the
  227. priority. Consider the min priority is 1, normal priority is 5, and the
  228. max priority is 10. Usually a priority of 3 is ok for single applets.
  229.  
  230. The "MinSYNC" parameter must be set to a value between 8 and 16 to slow
  231. down animation in the case it runs too faster on faster computers or because
  232. the applet size is very small. The optimal value seems to be 10, but you can
  233. disable this feature placing a value of 0 if you see flickerings or excessive
  234. slow down.
  235. If the applets steal 100% of CPU power or slows down the browser and Operating
  236. System, try increasing MinSYNC until all runs ok.
  237. Usually values between 40 and 400 fixes all problems, even if applet slows
  238. down for compatibility.
  239.  
  240.                              ---------
  241.  
  242.  
  243. Copyright and distribution notices
  244.  
  245.  
  246. Fabio Ciucci is the author and owner of this applet.
  247. You can use freely this applet to enhance your web pages. But since I am
  248. the author of the applet, I placed a secret linkware window that will appear
  249. if the applet is clicked with mouse, only when the applet is online on a site:
  250. it is external to the web browser, so it will not hit the design of your
  251. beautyful html page.
  252. This small window will simply show my name and ask for a link to my java
  253. applets page.. the user can connect to it or cancel, or hide the window and
  254. connect after visiting all your pages.
  255. I hope this credit part is not a problem for you...
  256. In any case, if link is accepted a new browser window will appear and your
  257. page will remain on the original window, so you will not lost the visitor.
  258. Consider you will use an effect programmed by me, without pay, for FREE!
  259.  
  260. NOTE: You can include the applets archive on CD-ROMS or shareware collections
  261. and shareware sites without ask me, but only if you leave the archive(s)
  262. unchanged.
  263.  
  264.  
  265.                              ---------
  266.  
  267.  
  268. Fabio Ciucci (Randy/Ram Jam)
  269.  
  270. fabioc@anfiteatro.it
  271.  
  272. http://www.anfiteatro.it/java.html
  273.  
  274.  
  275.