Life 1.06: Difference between revisions
New page: The '''Life 1.06''' file format is an ASCII format is just a list of coordinates of alive cells. Life 1.06 was designed to be easy and quick for a Life program to read and write, with the ... |
replaced <code> blocks with <pre> blocks |
||
| (23 intermediate revisions by 7 users not shown) | |||
| Line 1: | Line 1: | ||
The '''Life 1.06''' file format is an ASCII format is just a list of coordinates of alive cells. Life 1.06 was designed to be easy and quick for a Life program to read and write, with the drawback being that the file size is very large for large [[pattern | The '''Life 1.06''' [[File formats|file format]] is an ASCII format that is just a list of coordinates of alive cells. Life 1.06 was designed to be easy and quick for a Life program to read and write, with the drawback being that the file size is very large for large [[pattern]]s. Life 1.06 files are saved with a <code>.lif</code> or <code>.life</code> file extension. | ||
==Description of format== | ==Description of format== | ||
The first line is a header line, indicating that the file is in Life 1.06 format: | The first line is a header line, indicating that the file is in Life 1.06 format: | ||
< | <pre>#Life 1.06</pre> | ||
Each subsequent line is of the form | Each subsequent line is of the form | ||
< | <pre>x y</pre> | ||
where x and y are the x and y coordinates of an alive cell, respectively. Each alive cell must be on its own line, and the x and y coordinates are separated by a space. | where x and y are the x and y coordinates of an alive cell, respectively. Each alive cell must be on its own line, and the x and y coordinates are separated by a space. | ||
| Line 16: | Line 16: | ||
The following is a [[glider]] in Life 1.06 format: | The following is a [[glider]] in Life 1.06 format: | ||
< | <pre> | ||
#Life 1.06 | |||
0 -1 | |||
1 0 | |||
-1 1 | |||
0 1 | |||
1 1 | |||
</ | </pre> | ||
Note that the overall (x,y)-offset of the coordinates generally does not matter (for example, adding 3 to each x-coordinate will have no real effect), nor does the order that the cells are listed in. As a result of these ambiguities, the same pattern may be saved in several different ways. The following is another equivalent way that a glider might be saved in the Life 1.06 format: | |||
<pre> | |||
#Life 1.06 | |||
0 2 | |||
1 0 | |||
1 2 | |||
2 1 | |||
2 2 | |||
</pre> | |||
==See also== | |||
* [[Life 1.05]] | |||
* [[Plaintext]] | |||
* [[RLE]] | |||
* [[File formats]] | |||
==External links== | |||
* {{LinkMirek|ca_files_formats.html|title=Cellular automata file formats}} | |||
[[Category:Everything else]] | |||
[[Category:File formats]] | [[Category:File formats]] | ||
__NOTOC__ | |||
Latest revision as of 03:58, 15 December 2024
The Life 1.06 file format is an ASCII format that is just a list of coordinates of alive cells. Life 1.06 was designed to be easy and quick for a Life program to read and write, with the drawback being that the file size is very large for large patterns. Life 1.06 files are saved with a .lif or .life file extension.
Description of format
The first line is a header line, indicating that the file is in Life 1.06 format:
#Life 1.06
Each subsequent line is of the form
x y
where x and y are the x and y coordinates of an alive cell, respectively. Each alive cell must be on its own line, and the x and y coordinates are separated by a space.
Examples
The following is a glider in Life 1.06 format:
#Life 1.06 0 -1 1 0 -1 1 0 1 1 1
Note that the overall (x,y)-offset of the coordinates generally does not matter (for example, adding 3 to each x-coordinate will have no real effect), nor does the order that the cells are listed in. As a result of these ambiguities, the same pattern may be saved in several different ways. The following is another equivalent way that a glider might be saved in the Life 1.06 format:
#Life 1.06 0 2 1 0 1 2 2 1 2 2
See also
External links