Rockbox Development > Feature Ideas
Ability for Rocklife to open .cells files
Chronon:
It would be nice to be able to open .cells files, a standard format for representing starting configurations for the Game of Life. There's a Life Lexicon located here with many samples for download. It doesn't seem like a very difficult feature to add. The .cells files are basically an optional comment or two (signified by a "!" character) and a grid of characters.
The first example from the Life Lexicon that I linked is:
--- Quote ---101 (p5) Found by Achim Flammenkamp in August 1994. The name was suggested by Bill Gosper, noting that the phase shown below displays the period in binary.
--- End quote ---
Here is 101.cells:
--- Code: ---!Name: 101
!
....OO......OO....
...O.O......O.O...
...O..........O...
OO.O..........O.OO
OO.O.O..OO..O.O.OO
...O.O.O..O.O.O...
...O.O.O..O.O.O...
OO.O.O..OO..O.O.OO
OO.O..........O.OO
...O..........O...
...O.O......O.O...
....OO......OO....
--- End code ---
So we need to open the file, strip comments and then start populating the cells in the grid corresponding to the O's. If I get some time I may work on this.
Llorean:
Personally, I think mono-bitmaps (or color bitmaps as long as there's black bits, basically any bitmap we can normally load) should be loadable in Life as a starting configuration too.
yapper:
Bitmap loading sounds like an excellent method.
Chronon:
Sure. I just mentioned this method because there's already an extensive library of interesting starting configurations in this format. Reading a monochrome bitmap in and populating the grid using that information should be the same, in principle.
Llorean:
And there's a bitmap editor in Rockbox, so it allows you to create your own layouts with less work from a programming perspective, so that's a nice benefit of bitmap loading too. Ideally it'd have support for both formats, of course.
Navigation
[0] Message Index
[#] Next page
Go to full version