https://sourceforge.net/projects/golly/ ... golly-2.5/
As always, see Help > Changes for the full list of changes. The most important changes are given below.
- This version introduces a new rule format. A file in the new format has a .rule extension and contains all the information about the rule: its name, description, table/tree data, and any color/icon information. All the details, along with some examples, can be found here:
http://code.google.com/p/ruletablerepos ... RuleFormat - The RuleTable and RuleTree algorithms have been merged into a new algorithm called RuleLoader. When asked to load a rule called "Foo", RuleLoader will look for Foo.rule first, then Foo.table, then Foo.tree.
- To help the transition to the new rule format, the Control menu has a new command called Convert Old Rules that can be used to convert all your old .table/tree/colors/icons files into new .rule files. After the conversion finishes you're given the option of deleting all the old files. (Before using Convert Old Rules it would be a good idea to backup your current rules folder -- the one set in Preferences > Control -- just in case something goes wrong. Please let me know if that happens!)
- The .rule format makes it much easier to publish new rules in these forums. Consider this example:
To install this rule in the correct place, simply select all, copy it to the clipboard, then switch to Golly and select File > Open Clipboard (or Edit > Paste). When Golly sees that the clipboard text begins with "@RULE rulename" it will save the text as rulename.rule in your rules folder and then switch to that rule.
Code: Select all
@RULE SlowLife A variant of Life that shows births (green cells) and deaths (red cells) in every 2nd generation. SlowLife patterns work the same as in Life, but twice as slow. Author: Andrew Trevorrow (andrew@trevorrow.com). The @TREE data was created by copying the following Python code to the clipboard and running Golly's make-ruletree.py script. name = "SlowLife" n_states = 4 n_neighbors = 8 def transition_function(s): # NW, NE, SW, SE, N, W, E, S, C = s C = s[8] # live states: normal = 1 birth = 2 death = 3 if C == birth: return normal if C == death: return 0 # count the number of normal neighbors ncount = 0 for i in xrange(8): if s[i] == normal: ncount += 1 # no change if there are any birth/death neighbors if s[i] > normal: return C if C == 0 and ncount == 3: return birth if C == normal and (ncount < 2 or ncount > 3): return death return C @TREE num_states=4 num_neighbors=8 num_nodes=39 1 0 3 1 0 1 0 1 1 0 2 0 0 1 1 2 0 1 1 1 2 1 1 1 1 3 2 3 4 4 1 2 1 1 0 2 1 6 1 1 3 3 7 4 4 3 4 4 4 4 4 5 8 9 9 2 6 0 1 1 3 7 11 4 4 4 8 12 9 9 4 9 9 9 9 5 10 13 14 14 3 11 2 4 4 4 12 16 9 9 5 13 17 14 14 5 14 14 14 14 6 15 18 19 19 3 2 2 4 4 4 16 21 9 9 5 17 22 14 14 6 18 23 19 19 6 19 19 19 19 7 20 24 25 25 4 21 21 9 9 5 22 27 14 14 6 23 28 19 19 7 24 29 25 25 7 25 25 25 25 8 26 30 31 31 5 27 27 14 14 6 28 33 19 19 7 29 34 25 25 8 30 35 31 31 8 31 31 31 31 9 32 36 37 37 @COLORS 0 48 48 48 background is dark gray 1 255 255 255 normal is white 2 0 255 0 birth is green 3 255 0 0 death is red @ICONS XPM /* width height num_colors chars_per_pixel */ "31 93 10 1" /* colors */ ". c #303030" "B c #404040" "C c #808080" "D c #C0C0C0" "E c #FFFFFF" "F c #004000" "G c #007F00" "H c #00C000" "I c #00FF00" "J c #FF0000" /* icon for state 1 */ "..............................." "..............................." "..........BCDEEEEEDCB.........." ".........CEEEEEEEEEEEC........." ".......BEEEEEEEEEEEEEEEB......." "......DEEEEEEEEEEEEEEEEED......" ".....DEEEEEEEEEEEEEEEEEEED....." "....BEEEEEEEEEEEEEEEEEEEEEB...." "....EEEEEEEEEEEEEEEEEEEEEEE...." "...CEEEEEEEEEEEEEEEEEEEEEEEC..." "..BEEEEEEEEEEEEEEEEEEEEEEEEEB.." "..CEEEEEEEEEEEEEEEEEEEEEEEEEC.." "..DEEEEEEEEEEEEEEEEEEEEEEEEED.." "..EEEEEEEEEEEEEEEEEEEEEEEEEEE.." "..EEEEEEEEEEEEEEEEEEEEEEEEEEE.." "..EEEEEEEEEEEEEEEEEEEEEEEEEEE.." "..EEEEEEEEEEEEEEEEEEEEEEEEEEE.." "..EEEEEEEEEEEEEEEEEEEEEEEEEEE.." "..DEEEEEEEEEEEEEEEEEEEEEEEEED.." "..CEEEEEEEEEEEEEEEEEEEEEEEEEC.." "..BEEEEEEEEEEEEEEEEEEEEEEEEEB.." "...CEEEEEEEEEEEEEEEEEEEEEEEC..." "....EEEEEEEEEEEEEEEEEEEEEEE...." "....BEEEEEEEEEEEEEEEEEEEEEB...." ".....DEEEEEEEEEEEEEEEEEEED....." "......DEEEEEEEEEEEEEEEEED......" ".......BEEEEEEEEEEEEEEEB......." ".........CEEEEEEEEEEEC........." "..........BCDEEEEEDCB.........." "..............................." "..............................." /* icon for state 2 */ "..............................." "..............................." "..........FGHIIIIIHGF.........." ".........GIIIIIIIIIIIG........." ".......FIIIIIIIIIIIIIIIF......." "......HIIIIIIIIIIIIIIIIIH......" ".....HIIIIIIIIIIIIIIIIIIIH....." "....FIIIIIIIIIIIIIIIIIIIIIF...." "....IIIIIIIIHGF.FGHIIIIIIII...." "...GIIIIIIIH.......HIIIIIIIG..." "..FIIIIIIIG.........GIIIIIIIF.." "..GIIIIIIH...........HIIIIIIG.." "..HIIIIIH.............HIIIIIH.." "..IIIIIIG.............GIIIIII.." "..IIIIIIF.............FIIIIII.." "..IIIIII...............IIIIII.." "..IIIIIIF.............FIIIIII.." "..IIIIIIG.............GIIIIII.." "..HIIIIIH.............HIIIIIH.." "..GIIIIIIH...........HIIIIIIG.." "..FIIIIIIIG.........GIIIIIIIF.." "...GIIIIIIIH.......HIIIIIIIG..." "....IIIIIIIIHGF.FGHIIIIIIII...." "....FIIIIIIIIIIIIIIIIIIIIIF...." ".....HIIIIIIIIIIIIIIIIIIIH....." "......HIIIIIIIIIIIIIIIIIH......" ".......FIIIIIIIIIIIIIIIF......." ".........GIIIIIIIIIIIG........." "..........FGHIIIIIHGF.........." "..............................." "..............................." /* icon for state 3 */ "..............................." "..............................." "..JJJJ....BCDEEEEEDCB....JJJJ.." "..JJJJJ..CEEEEEEEEEEEC..JJJJJ.." "..JJJJJJEEEEEEEEEEEEEEEJJJJJJ.." "..JJJJJJJEEEEEEEEEEEEEJJJJJJJ.." "...JJJJJJJEEEEEEEEEEEJJJJJJJ..." "....JJJJJJJEEEEEEEEEJJJJJJJ...." "....EJJJJJJJEEEEEEEJJJJJJJE...." "...CEEJJJJJJJEEEEEJJJJJJJEEC..." "..BEEEEJJJJJJJEEEJJJJJJJEEEEB.." "..CEEEEEJJJJJJJEJJJJJJJEEEEEC.." "..DEEEEEEJJJJJJJJJJJJJEEEEEED.." "..EEEEEEEEJJJJJJJJJJJEEEEEEEE.." "..EEEEEEEEEJJJJJJJJJEEEEEEEEE.." "..EEEEEEEEEEJJJJJJJEEEEEEEEEE.." "..EEEEEEEEEJJJJJJJJJEEEEEEEEE.." "..EEEEEEEEJJJJJJJJJJJEEEEEEEE.." "..DEEEEEEJJJJJJJJJJJJJEEEEEED.." "..CEEEEEJJJJJJJEJJJJJJJEEEEEC.." "..BEEEEJJJJJJJEEEJJJJJJJEEEEB.." "...CEEJJJJJJJEEEEEJJJJJJJEEC..." "....EJJJJJJJEEEEEEEJJJJJJJE...." "....JJJJJJJEEEEEEEEEJJJJJJJ...." "...JJJJJJJEEEEEEEEEEEJJJJJJJ..." "..JJJJJJJEEEEEEEEEEEEEJJJJJJJ.." "..JJJJJJEEEEEEEEEEEEEEEJJJJJJ.." "..JJJJJ..CEEEEEEEEEEEC..JJJJJ.." "..JJJJ....BCDEEEEEDCB....JJJJ.." "..............................." "..............................." XPM /* width height num_colors chars_per_pixel */ "15 45 10 1" /* colors */ ". c #303030" "B c #404040" "C c #808080" "D c #C0C0C0" "E c #FFFFFF" "F c #004000" "G c #007F00" "H c #00C000" "I c #00FF00" "J c #FF0000" /* icon for state 1 */ "..............." "....BDEEEDB...." "...DEEEEEEED..." "..DEEEEEEEEED.." ".BEEEEEEEEEEEB." ".DEEEEEEEEEEED." ".EEEEEEEEEEEEE." ".EEEEEEEEEEEEE." ".EEEEEEEEEEEEE." ".DEEEEEEEEEEED." ".BEEEEEEEEEEEB." "..DEEEEEEEEED.." "...DEEEEEEED..." "....BDEEEDB...." "..............." /* icon for state 2 */ "..............." "....FHIIIHF...." "...HIIIIIIIH..." "..HIIIIIIIIIH.." ".FIIIHF.FHIIIF." ".HIIH.....HIIH." ".IIIF.....FIII." ".III.......III." ".IIIF.....FIII." ".HIIH.....HIIH." ".FIIIHF.FHIIIF." "..HIIIIIIIIIH.." "...HIIIIIIIH..." "....FHIIIHF...." "..............." /* icon for state 3 */ "..............." ".JJ.BDEEEDB.JJ." ".JJJEEEEEEEJJJ." "..JJJEEEEEJJJ.." ".BEJJJEEEJJJEB." ".DEEJJJEJJJEED." ".EEEEJJJJJEEEE." ".EEEEEJJJEEEEE." ".EEEEJJJJJEEEE." ".DEEJJJEJJJEED." ".BEJJJEEEJJJEB." "..JJJEEEEEJJJ.." ".JJJEEEEEEEJJJ." ".JJ.BDEEEDB.JJ." "..............." XPM /* width height num_colors chars_per_pixel */ "7 21 11 1" /* colors */ ". c #303030" "B c #404040" "C c #808080" "D c #C0C0C0" "E c #FFFFFF" "F c #004000" "G c #007F00" "H c #00C000" "I c #00FF00" "J c #FF0000" "K c #E0E0E0" /* icon for state 1 */ ".BKEKB." "BEEEEEB" "KEEEEEK" "EEEEEEE" "KEEEEEK" "BEEEEEB" ".BKEKB." /* icon for state 2 */ ".FHIHF." "FIIIIIF" "HIH.HIH" "II...II" "HIH.HIH" "FIIIIIF" ".FHIHF." /* icon for state 3 */ "JBKEKBJ" "BJEEEJB" "KEJEJEK" "EEEJEEE" "KEJEJEK" "BJEEEJB" "JBKEKBJ"
- Two new scripts (in Scripts/Python/Rule-Generators) allow Golly to be used as an icon editor. Run icon-importer.py first to import any icons for the current rule and display their bitmaps in a new layer for you to edit. When you've finished editing, run icon-exporter.py to extract the icon images and create or update the @ICONS section in the appropriate .rule file, then display the icons in a separate test layer.
- Support for monochrome icons has been extended to allow grayscale icons, where shades of gray can be used to do anti-aliasing. Most of the default icons are now grayscale bitmaps.
- Patterns can now be displayed at scale 1:32. If you want to use that scale when creating a new pattern then choose the appropriate pop-up menu option in Preferences > File.