Plaintext: Difference between revisions

From LifeWiki
Jump to navigation Jump to search
Elithrion (talk | contribs)
m Changed names to link to "patterns found by..." category pages
Update LifeLexicon link
Line 45: Line 45:
==External links==
==External links==
*[http://www.bitstorm.org/gameoflife/lexicon/ John Conway's Game of Life] by Edwin Martin
*[http://www.bitstorm.org/gameoflife/lexicon/ John Conway's Game of Life] by Edwin Martin
*[http://www.argentum.freeserve.co.uk/lex.htm The Life Lexicon] by Stephen Silver
*[http://www.conwaylife.com/ref/lexicon/lex.htm The Life Lexicon] by Stephen Silver


[[Category:Everything else]][[Category:File formats]]
[[Category:Everything else]][[Category:File formats]]

Revision as of 23:32, 9 January 2017

The plaintext file format is a recent ASCII file format that is similar to Life 1.05 in that it stores patterns simply by representing dead and alive cells by different characters and "drawing" the pattern with those characters. The particulars of the plaintext file format described here are based on the format used by Edwin Martin's Game of Life program, which uses the .cells file extension.

Description of format

The first line is a header line, which has the form

!Name: Something

where "Something" is the name of the pattern described by the file. This is followed by optional "!" lines that describe the pattern. For example:

!This is a really cool pattern.
!It was first discovered by Some Guy.

It seems as though the convention is to add one final "!" line with nothing else on it before the pattern itself, but this is optional.

To store the pattern itself, a "." is used to represent a dead cell, while an "O" (capital o) is used to represent an alive cell. This choice of characters was derived from the visual format used on Stephen Silver's Life Lexicon.

Because this file format was created much more recently than other similar file formats (such as Life 1.05), there is no restriction on the number of characters per line.

Examples

The following is a glider in plaintext format:

!Name: Glider
!
.O.
..O
OOO

The following is the Gosper glider gun in plaintext format:

!Name: Gosper glider gun
!
........................O...........
......................O.O...........
............OO......OO............OO
...........O...O....OO............OO
OO........O.....O...OO..............
OO........O...O.OO....O.O...........
..........O.....O.......O...........
...........O...O....................
............OO......................