Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Feature Ideas
| | |-+  Ability for Rocklife to open .cells files
« previous next »
  • Print
Pages: [1]

Author Topic: Ability for Rocklife to open .cells files  (Read 2857 times)

Offline Chronon

  • Rockbox Expert
  • Member
  • *
  • Posts: 4379
Ability for Rocklife to open .cells files
« on: December 21, 2008, 12:14:55 AM »
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.
Here is 101.cells:
Code: [Select]
!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....

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.
« Last Edit: December 21, 2008, 12:17:30 AM by Chronon »
Logged
Sansa e280, Gigabeat F40, Gigabeat S60, Sansa Clip+, iPod Mini 2g

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: Ability for Rocklife to open .cells files
« Reply #1 on: December 21, 2008, 10:45:12 AM »
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.
Logged

Offline yapper

  • Rockbox Expert
  • Member
  • *
  • Posts: 794
Re: Ability for Rocklife to open .cells files
« Reply #2 on: December 21, 2008, 10:59:03 AM »
Bitmap loading sounds like an excellent method.
Logged
G2 iPod 20GB / Sansa c240 v1 + 2GB microSD / Sansa c250 v1 / Sansa e250 v1 + 8GB microSDHC / Sansa Fuze v2 + 32GB microSDHC

Offline Chronon

  • Rockbox Expert
  • Member
  • *
  • Posts: 4379
Re: Ability for Rocklife to open .cells files
« Reply #3 on: December 21, 2008, 12:29:02 PM »
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.
Logged
Sansa e280, Gigabeat F40, Gigabeat S60, Sansa Clip+, iPod Mini 2g

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: Ability for Rocklife to open .cells files
« Reply #4 on: December 21, 2008, 06:52:11 PM »
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.
Logged

Offline Chronon

  • Rockbox Expert
  • Member
  • *
  • Posts: 4379
Re: Ability for Rocklife to open .cells files
« Reply #5 on: March 31, 2009, 05:21:17 AM »
I posted a patch for reading .cells files here: http://www.rockbox.org/tracker/task/10079
Logged
Sansa e280, Gigabeat F40, Gigabeat S60, Sansa Clip+, iPod Mini 2g

Offline soap

  • Member
  • *
  • Posts: 1678
  • Creature of habit.
Re: Ability for Rocklife to open .cells files
« Reply #6 on: March 31, 2009, 05:58:47 AM »
Quote from: Chronon on March 31, 2009, 05:21:17 AM
I posted a patch for reading .cells files here: http://www.rockbox.org/tracker/task/10079

Now add .cells support to RBUtil.  ;)
Logged
Rockbox Forum Guidelines
The Rockbox Manual
How to Ask Questions the Smart Way

Offline LambdaCalculus

  • Member
  • *
  • Posts: 2257
  • Dreaming of Turing Machines...
    • The Nostalgia Roadtrip
Re: Ability for Rocklife to open .cells files
« Reply #7 on: March 31, 2009, 06:55:56 AM »
Quote from: Chronon on March 31, 2009, 05:21:17 AM
I posted a patch for reading .cells files here: http://www.rockbox.org/tracker/task/10079

I'll probably commit this later on. This is something I've wanted in Rocklife for quite some time now. Thanks, Chronon! ;)

(EDIT) Committed!
« Last Edit: March 31, 2009, 10:47:09 AM by LambdaCalculus379 »
Logged
Former Rockbox dev. Rising from the ashes...

Players: iPod Video /w 128GB SSD mod, H320 /w 128GB SSD mod

Offline Chronon

  • Rockbox Expert
  • Member
  • *
  • Posts: 4379
Re: Ability for Rocklife to open .cells files
« Reply #8 on: March 31, 2009, 02:24:15 PM »
Thanks.   :)

--
I might look into bitmap loading, but it will probably be a bit before I get free time.  I also need to read up on C and the plugin API a bit.  ;)

---

Just for fun, here's a Turing Machine implemented in the Game of Life: http://rendell-attic.org/gol/tm.htm
« Last Edit: April 05, 2009, 10:07:38 PM by Chronon »
Logged
Sansa e280, Gigabeat F40, Gigabeat S60, Sansa Clip+, iPod Mini 2g

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Feature Ideas
| | |-+  Ability for Rocklife to open .cells files
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.094 seconds with 15 queries.