Page 1 of 1

2Layer Viewer

Posted: August 21st, 2025, 1:56 am
by pifricted
Here it is!
2Layer Viewer.zip
(4.59 KiB) Downloaded 43 times

Features:
2 interactable 2-state CA universes
2-layer draws
Custom colors
Hot keys

Rule support:
2-Layer 2-state CAs
R1 INT

How to make rule?
The rules can describe in 4 rulestrings, or 8 birth/survival conditions:

Code: Select all

B1n2   -  Birth conditions for Layer 1 while Layer 2 is off
B1o2   -  Birth conditions for Layer 1 while Layer 2 is on
S1n2   -  Survival conditions for Layer 1 while Layer 2 is off
S1o2   -  Survival conditions for Layer 1 while Layer 2 is on
B2n1   -  Birth conditions for Layer 2 while Layer 1 is off
B2o1  -  Birth conditions for Layer 2 while Layer 1 is on
S2n1  -  Survival conditions for Layer 2 while Layer 1 is off
S2o1  -  Survival conditions for Layer 2 while Layer 1 is on
e.g. Rule:DoubleLiveButDouble (DoubleB3/S23, but state 3 always die) is:

Code: Select all

B1n2: 3
B1o2: 3
S1n2: 23
S1o2: None
B2n1: 3
B2o1: 3
S2n1: 23
S2o1: None
Hot keys:

Code: Select all

space     Next gen
Enter     Play
0        Draw on Layer 0
1        Draw on Layer 1
D         Draw
M         Move
R         Reset
[         Zoom in
]         Zoom out
Alt + o   Open pattern
Alt + s   Save pattern
Alt + n   Clean cells
Alt + r   Read rule
Alt + c   Set custom color
Planned features:
Select mode
Copy & Paste

Re: 2Layer Viewer

Posted: August 21st, 2025, 2:11 am
by Resu
pifricted wrote: August 21st, 2025, 1:56 am Here it is!
2Layer Viewer.zip

Edit1: Fix bug.
Is it like the deep cell?

Re: 2Layer Viewer

Posted: August 21st, 2025, 2:35 am
by pifricted
Resu wrote: August 21st, 2025, 2:11 am Is it like the deep cell?
Not really. The viewer runs 2 interactable CA universes.

Re: 2Layer Viewer

Posted: August 21st, 2025, 3:27 am
by Sokwe
It would be nice if you could give a description of what this is, and perhaps a brief tutorial showing how it can be used.

Re: 2Layer Viewer

Posted: August 21st, 2025, 7:38 am
by dvgrn
pifricted wrote: August 21st, 2025, 1:56 am B1n2 - Birth conditions for Layer 1 while Layer 2 is off
B1o2 - Birth conditions for Layer 1 while Layer 2 is off...
Please give a sample of the "8 birth/survival conditions" format.

I think there's a copy/paste error in the list. Did you mean to change the second "Layer 2 is off" in each pair, to "Layer 2 is on"?

It might also be worth adjusting "costom" to "custom" everywhere.

Am I thinking about this right, that it should be possible to write a script to generate a four-state Golly rule table that would emulate any of these pairs of interacting universes?

Re: 2Layer Viewer

Posted: August 21st, 2025, 8:05 am
by pifricted
dvgrn wrote: August 21st, 2025, 7:38 am
pifricted wrote: August 21st, 2025, 1:56 am B1n2 - Birth conditions for Layer 1 while Layer 2 is off
B1o2 - Birth conditions for Layer 1 while Layer 2 is off...
Please give a sample of the "8 birth/survival conditions" format.

I think there's a copy/paste error in the list. Did you mean to change the second "Layer 2 is off" in each pair, to "Layer 2 is on"?

It might also be worth adjusting "costom" to "custom" everywhere.

Am I thinking about this right, that it should be possible to write a script to generate a four-state Golly rule table that would emulate any of these pairs of interacting universes?
Done.

Here is a really bad script by me. I should rewrite it.

Re: 2Layer Viewer

Posted: August 21st, 2025, 4:35 pm
by dvgrn
pifricted wrote: August 21st, 2025, 1:56 am B1n2 - Birth conditions for Layer 1 while Layer 2 is off
B1o2 - Birth conditions for Layer 1 while Layer 2 is off
S1n2 - Survival conditions for Layer 1 while Layer 2 is on
S1o2 - Survival conditions for Layer 1 while Layer 2 is on...
I don't think you've edited the "on"s and "off"s quite correctly yet. Each pair of definitions still has identical text.

Asking a previous question again: am I thinking about this right, that it should be possible to write a script to generate a four-state Golly rule table that would emulate any of these pairs of interacting universes?