tomdunn wrote:hkoenig - thanks a lot for the input, its very helpful.
The "h" and "v" values seem very useful.
They definitely are very useful. Unfortunately that syntax has never gotten widely adopted: the only place I know of where it gets used regularly is the Game of Life News weblog on pentadecathlon.com. Here's an example multi-layer RLE file, from
this weblog posting:
Code: Select all
#C smaller highway-robber device: Calcyman, 27 February 2009
x = 113, y = 117, rule = B3/S23
64bo$62b3o$38bo22bo$26bo11b3o20b2o$24b3o14bo$8bo14bo16b2o39b2o$8b3o12b
2o56b2o5b2o$11bo76b2o$10b2o2$67b2o17b2o$11b2o55bo17b2o$11b2o17b2o36bob
o21b2o$30b2o37b2o21b2o6$27b2o32b2o$27bo20b2o11b2o$29bo19bo$28b2o16b3o$
24b2o20bo$24bo$25b3o68bo$27bo66b3o$93bo$93b2o2$8b2o$7bobo$7bo25b2o$6b
2o25bo$14b2o15bobo$14b2o15b2o65b2o$98bo$96bobo$96b2o3$82b2o$81bobo$81b
o$80b2o3$13b2o83b2obo$12bobo83bob2o$12bo$11b2o78b2o$91b2o7$81b2o$23b2o
57bo$23b2o57bobo$35b2o46b2o$35bobo$37bo$37b2o2$12b2o$13bo19b2o$13bobo
17bo71b2o$14b2o15bobo71bo$26bo4b2o70bobo$25bobo75b2ob2o$25bobo78bo$14b
2o10bo79bobo$13bobo67b2o20b2ob3o$13bo70bo26bo$7bo4b2o70bobo18b2ob2o2bo
$7b3o17b2o56b2o18b2obob2o$10bo16bo82bo$o8b2o17b3o79bo$3o27bo77bob2o$3b
o104b2o2bo$2b2o15b2o65b2o23b2o$19b2o66bo$84b3o$47bo36bo$45b3o$44bo$44b
2o62b2o$50b2o56bo$9b2o39b2o7bo49b3o$8bo2bo45b3o51bo$8bobo45bo26bo$9bo
46b2o25b3o$86bo$64b2o19b2o$64bo16b2o$62bobo16bo$62b2o19bo$82b2o6$79b2o
$79b2o17b2o$98b2o$40b2o$40bo$41b3o6b2o47b2o$43bo2b2o2b2o47bo$43bobobo
38b2o12b3o$24b3o15b2obo23b2o16bo14bo$24bo17bo2bo23bo14b3o$25bo17b2o25b
3o11bo$72bo!
#C envelope layer
x = 110, y = 111, h=0, v=4, color=(0,0,0), alpha=48
59b4o$58b3o$40b4o14b4o18bo2b2o$19b2ob3o3b7obo5b3o12b5o19b4o2bo2bo$18b
5o5b13ob4o11b6o14bob6o3b2o$10b5o2b36o2b8o12b10o2b2o$12b52o11b11o2b2o$
13b50o11b12o2b3obo$13b17o2b22ob7o9bo2b18o$12bob16o2b31o8bo3b15obo$14b
23o3b2o2b19o8b18o3bo$15b9o2b10o11b17o7b18o$16b8o3b6o16b15ob2o2b19o$17b
7o4b3o19b38o$14b11o3bo21b8ob20ob7o$13b12o23b8o3b2o2b16o2b6o$13b12o28bo
5b2o2b17ob7o$13b11o36b21ob6o$13b8ob4o35bob3ob4o7b9o$13b7o46b4o9b8o$13b
7o45b4o11b8o$13b6o45b4o13b7o$12b7o44b4o15b6o$11b8o43b4o16b7o$10b8o43b
4o17b7o$10b8o42b4o18b8ob4o$10bo2b6o40b4o19b11o$10bob7o39b4o20b12o$12b
6o39b4o21b12o$12b8o4bo31b4o23b11o$13bo2b6ob4o3bo24b4o27b7o$12b2o2b13ob
o23b4o27b8o$13b18o22b4o27b8o$14b17o21b4o29b8o2bo$17b13o21b4o29b10obo$
16b12o22b4o30b12o$16b10o23b4o31b12o$15b11o22b4o32bo2b9o$15b7ob2o22b4o
33bo2b8o$14b11o21b4o38b6o$15b11o19b4o38b6o$15b11o18b4o40b5o$15b11o17b
4o41b7o$15bo2b8o16b4o42b8o$15bo3b7o15b4o41b12o$19b7o14b4o42b11o$20b6o
13b4o43b5o2b4o$20b7o11b4o44b5o2b3o$20b8o9b4o45b10o$21b8o7b4o46b9o$21b
9o5b4o47b9o$20b6ob4o3b4o49b8o$20b7ob4ob4o49b8o$21b6o2b7o51b6o$21b6o3b
5o52b6o$21b2o2bo4b5o52b6o$20b3o2b2o2b6o50bob7o$20b7ob4o2bo50b2ob6o$21b
5ob4o3bo50b8o$21b9o55b8o$21b8o57b8o$21b7o59b7o$21b6o61b6o$21b7o60b7o$
16bo3b7o61b7o$16bob11obo57b8ob2o$16b10ob2obo57b13obo$15b10obob3o57b13o
bo$16b9obob3o57b16o$16bob8ob2o60b14o$16bo2b8o65b11o$18b4o2b3o64b11o4bo
$17b4o3b5o58bo2b13obo2bo$16b4o6bo60bob16o$15b4o68b20o$14b4o69b18o$9b8o
71b18obo$11b5o70b20obo$11b4o75b18o$2b5o3b6o2bo2bo69b17o$4b4ob8o2b2o73b
13o$3b9o2b4o2b2o72b14o$2b10o2b4ob4o5b2o6bo57b14o$ob10ob11ob6o4b3o57b
10ob4o$32o3b3o57b10o$32o2b5o3b4o46b11o$9o2b29ob3o5bo2bo38b12o$b7ob2ob
32o5b3o39b12o$2b6obob33o6bobo38b13o$3b6ob34o4b6o38b12o$4b42o2b10o33b
12o$5b51o35b12o$6b4o2b44o29b4ob12o$7b4ob43o6bo25b11ob2o$8b4o2b41o2b3ob
o24b12o$9b4ob48o24b12o$10b52o20bo3b11o$11b50o19b3o4b7o$12b50o16b6o3b8o
$13b8ob42o11b10o2b9o$14b5o8b17o3b20o2b2o3b23o$15b4o10bo3b10o5b31o2b16o
bo$16b4o14b8o7b7ob22o2b17o$17b4o14b7o7b6o2b41o$18b4o26b6o3b42o$19b4o
25b4o6b36o2b5o$20b4o24b2o2bo12b4ob13o5b5o$21b4o23bo17b3o5bob7o3b3ob2o$
22b4o22bo18b4o$23bo$25b2o!
CB 1,1,1,1
GP F NW x=24, y=113, len=30, color=(255,0,0)
GP F NW x=44, y=9, len=20, color=(0,255,0)
Notice that the current grammar doesn't allow this as valid RLE, but Golly, LifeViewer and so on have no problem with this as input. The rule is that anything at all can follow the exclamation point at the end of the RLE section, with no need for #C tags or any other annotations at the beginnings of lines. So the usual behavior is that all layers following the first one are silently ignored. Or they get reported as comments, right along with any comments before the header line.
So far, I think the pentadecathlon.com server has the only code anywhere that can process the h={X}, v={Y} and other special commands and produce a correct stacked view for this kind of multilayer RLE -- to say nothing of the other annotations such as GP ("glider path"), CB (something to do with padding around images, but now I forget what it stands for... aha,
"cell border")... and so on.
It would be easy to write a Golly script to process the clipboard and produce a reasonably good equivalent stacked-layers view with the correct offsets -- up to ten layers, anyway! But nobody has actually written such a script, probably because there are only a few RLE files out there that use that convention, and they're all on pentadecathlon.com and are already getting rendered perfectly well.
There's an alternate syntax supported by Golly and LifeViewer for the h=, v= offset:
#CXRLE Pos={x},{y}
Could also be something like
#CXRLE Pos={x},{y} Gen={t}
or only the Gen= keyword might be defined, if you want to set a non-zero generation number.
There's also the #P syntax --
"P" | "R" ; top-left corner coordinates -- but that also hasn't seen much of any use except maybe in Xlife. I don't think it's even supported in LifeViewer or Golly:
Code: Select all
#P -10000,5000
x = 3, y = 3, rule = B3/S23
bo$2bo$3o!
-- Nope, Golly doesn't seem to like the #P line at all, and LifeViewer just ignores it. #P is also used in some ASCII formats, which might be confusing the parser I suppose.
So: pentadecathlon.com format for that second layer quoted in the multilayer RLE above, looks like this:
Code: Select all
#C envelope layer
x = 110, y = 111, h=0, v=4, color=(0,0,0), alpha=48
59b4o$58b3o$40b4o14b4o18bo2b2o$19b2ob3o3b7obo5b3o12b5o19b4o2bo2bo$18b
5o5b13ob4o11b6o14bob6o3b2o$10b5o2b36o2b8o12b10o2b2o$12b52o11b11o2b2o$
13b50o11b12o2b3obo$13b17o2b22ob7o9bo2b18o$12bob16o2b31o8bo3b15obo$14b
23o3b2o2b19o8b18o3bo$15b9o2b10o11b17o7b18o$16b8o3b6o16b15ob2o2b19o$17b
7o4b3o19b38o$14b11o3bo21b8ob20ob7o$13b12o23b8o3b2o2b16o2b6o$13b12o28bo
5b2o2b17ob7o$13b11o36b21ob6o$13b8ob4o35bob3ob4o7b9o$13b7o46b4o9b8o$13b
7o45b4o11b8o$13b6o45b4o13b7o$12b7o44b4o15b6o$11b8o43b4o16b7o$10b8o43b
4o17b7o$10b8o42b4o18b8ob4o$10bo2b6o40b4o19b11o$10bob7o39b4o20b12o$12b
6o39b4o21b12o$12b8o4bo31b4o23b11o$13bo2b6ob4o3bo24b4o27b7o$12b2o2b13ob
o23b4o27b8o$13b18o22b4o27b8o$14b17o21b4o29b8o2bo$17b13o21b4o29b10obo$
16b12o22b4o30b12o$16b10o23b4o31b12o$15b11o22b4o32bo2b9o$15b7ob2o22b4o
33bo2b8o$14b11o21b4o38b6o$15b11o19b4o38b6o$15b11o18b4o40b5o$15b11o17b
4o41b7o$15bo2b8o16b4o42b8o$15bo3b7o15b4o41b12o$19b7o14b4o42b11o$20b6o
13b4o43b5o2b4o$20b7o11b4o44b5o2b3o$20b8o9b4o45b10o$21b8o7b4o46b9o$21b
9o5b4o47b9o$20b6ob4o3b4o49b8o$20b7ob4ob4o49b8o$21b6o2b7o51b6o$21b6o3b
5o52b6o$21b2o2bo4b5o52b6o$20b3o2b2o2b6o50bob7o$20b7ob4o2bo50b2ob6o$21b
5ob4o3bo50b8o$21b9o55b8o$21b8o57b8o$21b7o59b7o$21b6o61b6o$21b7o60b7o$
16bo3b7o61b7o$16bob11obo57b8ob2o$16b10ob2obo57b13obo$15b10obob3o57b13o
bo$16b9obob3o57b16o$16bob8ob2o60b14o$16bo2b8o65b11o$18b4o2b3o64b11o4bo
$17b4o3b5o58bo2b13obo2bo$16b4o6bo60bob16o$15b4o68b20o$14b4o69b18o$9b8o
71b18obo$11b5o70b20obo$11b4o75b18o$2b5o3b6o2bo2bo69b17o$4b4ob8o2b2o73b
13o$3b9o2b4o2b2o72b14o$2b10o2b4ob4o5b2o6bo57b14o$ob10ob11ob6o4b3o57b
10ob4o$32o3b3o57b10o$32o2b5o3b4o46b11o$9o2b29ob3o5bo2bo38b12o$b7ob2ob
32o5b3o39b12o$2b6obob33o6bobo38b13o$3b6ob34o4b6o38b12o$4b42o2b10o33b
12o$5b51o35b12o$6b4o2b44o29b4ob12o$7b4ob43o6bo25b11ob2o$8b4o2b41o2b3ob
o24b12o$9b4ob48o24b12o$10b52o20bo3b11o$11b50o19b3o4b7o$12b50o16b6o3b8o
$13b8ob42o11b10o2b9o$14b5o8b17o3b20o2b2o3b23o$15b4o10bo3b10o5b31o2b16o
bo$16b4o14b8o7b7ob22o2b17o$17b4o14b7o7b6o2b41o$18b4o26b6o3b42o$19b4o
25b4o6b36o2b5o$20b4o24b2o2bo12b4ob13o5b5o$21b4o23bo17b3o5bob7o3b3ob2o$
22b4o22bo18b4o$23bo$25b2o!
CB 1,1,1,1
GP F NW x=24, y=113, len=30, color=(255,0,0)
GP F NW x=44, y=9, len=20, color=(0,255,0)
Golly/LifeViewer format -- notice the coordinate change gets picked up by LifeViewer in this case. I've left off the color and alpha commands. LifeViewer has equivalents for color but can't do multi-layer displays; Golly can do layers and colors, but the alpha is adjusted automatically if I remember right.
Code: Select all
#CXRLE Pos=-4 0
#C envelope layer
x = 110, y = 111, rule = B3/S23
59b4o$58b3o$40b4o14b4o18bo2b2o$19b2ob3o3b7obo5b3o12b5o19b4o2bo2bo$18b
5o5b13ob4o11b6o14bob6o3b2o$10b5o2b36o2b8o12b10o2b2o$12b52o11b11o2b2o$
13b50o11b12o2b3obo$13b17o2b22ob7o9bo2b18o$12bob16o2b31o8bo3b15obo$14b
23o3b2o2b19o8b18o3bo$15b9o2b10o11b17o7b18o$16b8o3b6o16b15ob2o2b19o$17b
7o4b3o19b38o$14b11o3bo21b8ob20ob7o$13b12o23b8o3b2o2b16o2b6o$13b12o28bo
5b2o2b17ob7o$13b11o36b21ob6o$13b8ob4o35bob3ob4o7b9o$13b7o46b4o9b8o$13b
7o45b4o11b8o$13b6o45b4o13b7o$12b7o44b4o15b6o$11b8o43b4o16b7o$10b8o43b
4o17b7o$10b8o42b4o18b8ob4o$10bo2b6o40b4o19b11o$10bob7o39b4o20b12o$12b
6o39b4o21b12o$12b8o4bo31b4o23b11o$13bo2b6ob4o3bo24b4o27b7o$12b2o2b13ob
o23b4o27b8o$13b18o22b4o27b8o$14b17o21b4o29b8o2bo$17b13o21b4o29b10obo$
16b12o22b4o30b12o$16b10o23b4o31b12o$15b11o22b4o32bo2b9o$15b7ob2o22b4o
33bo2b8o$14b11o21b4o38b6o$15b11o19b4o38b6o$15b11o18b4o40b5o$15b11o17b
4o41b7o$15bo2b8o16b4o42b8o$15bo3b7o15b4o41b12o$19b7o14b4o42b11o$20b6o
13b4o43b5o2b4o$20b7o11b4o44b5o2b3o$20b8o9b4o45b10o$21b8o7b4o46b9o$21b
9o5b4o47b9o$20b6ob4o3b4o49b8o$20b7ob4ob4o49b8o$21b6o2b7o51b6o$21b6o3b
5o52b6o$21b2o2bo4b5o52b6o$20b3o2b2o2b6o50bob7o$20b7ob4o2bo50b2ob6o$21b
5ob4o3bo50b8o$21b9o55b8o$21b8o57b8o$21b7o59b7o$21b6o61b6o$21b7o60b7o$
16bo3b7o61b7o$16bob11obo57b8ob2o$16b10ob2obo57b13obo$15b10obob3o57b13o
bo$16b9obob3o57b16o$16bob8ob2o60b14o$16bo2b8o65b11o$18b4o2b3o64b11o4bo
$17b4o3b5o58bo2b13obo2bo$16b4o6bo60bob16o$15b4o68b20o$14b4o69b18o$9b8o
71b18obo$11b5o70b20obo$11b4o75b18o$2b5o3b6o2bo2bo69b17o$4b4ob8o2b2o73b
13o$3b9o2b4o2b2o72b14o$2b10o2b4ob4o5b2o6bo57b14o$ob10ob11ob6o4b3o57b
10ob4o$32o3b3o57b10o$32o2b5o3b4o46b11o$9o2b29ob3o5bo2bo38b12o$b7ob2ob
32o5b3o39b12o$2b6obob33o6bobo38b13o$3b6ob34o4b6o38b12o$4b42o2b10o33b
12o$5b51o35b12o$6b4o2b44o29b4ob12o$7b4ob43o6bo25b11ob2o$8b4o2b41o2b3ob
o24b12o$9b4ob48o24b12o$10b52o20bo3b11o$11b50o19b3o4b7o$12b50o16b6o3b8o
$13b8ob42o11b10o2b9o$14b5o8b17o3b20o2b2o3b23o$15b4o10bo3b10o5b31o2b16o
bo$16b4o14b8o7b7ob22o2b17o$17b4o14b7o7b6o2b41o$18b4o26b6o3b42o$19b4o
25b4o6b36o2b5o$20b4o24b2o2bo12b4ob13o5b5o$21b4o23bo17b3o5bob7o3b3ob2o$
22b4o22bo18b4o$23bo$25b2o!
There really doesn't seem to have been much of a market for stacking multiple layers. For example, envelope.lua does it, but it just makes a mess if you already have multiple layers open in not-stacked not-tiled mode (which I usually do).
More commonly layers of information are handled LifeHistory-style: keep everything in the same layer for editing and copy/paste convenience, and just add extra states to show different "pseudo-layers", overlaps, etc. For example, LifeViewer has an envelope/history pseudo-layer (state 2) and a "marked cell" pseudo-layer (states 3, 4, and 5). This has its own problems and trade-offs, of course, but it seems to be what people use in practice.