Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Patches
  • Category Plugins
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by Matthias Wientapper - 2007-02-02
Last edited by Antoine Cellerier - 2007-06-29

FS#6616 - rocklife: Conway's Game of Life

This is rocklife, Conway’s Game of Life, a completely pointless plugin :-P

“The Game of Life is a cellular automaton devised by the British mathematician John Horton Conway in 1970. It is the best-known example of a cellular automaton.
The “game” is actually a zero-player game, meaning that its evolution is determined by its initial state, needing no input from human players. One interacts with the Game of Life by creating an initial configuration and observing how it evolves.” (Wikipedia)

The initial configuration is a random pattern. The grid is computed modulo (i.e. exceeding a border means entering it on the opposite side). The age of a cell is shown by its colour.

Usage:
* Play/Select: Next generation
* Up: Play/Pause
* Down: re-initialize grid
* Power: quit

Screenshots:

http://mattzz.dyndns.org/twiki/bin/view/Projects/RockboxGameOfLife

Closed by  Antoine Cellerier
2007-06-29 19:40
Reason for closing:  Accepted
Additional comments about closing:  

Applied. Thanks.

Matthias Wientapper commented on 2007-02-03 01:14

- Added selectable start patterns (random, acron, growth_1, growth-2 - choose with button down)
- fixed bug in mode/button management
- added status line, showin generation count and population (activate with button left)
- re-defined buttons:
pla_fire: run/pause
pla_right: step
pla_down: select start pattern
pla_left: toggle status line

Paul Louden commented on 2007-02-03 06:32

I'm not sure but there may be a bug.

Static things fade to white, I assume this is intentional.

Oscillating things fade to white, and then suddenly vanish. I'm assuming the vanishing is not supposed to be intentional, when the static things get to hang around, is it?

Matthias Wientapper commented on 2007-02-03 11:38
Static things fade to white, I assume this is intentional.

yes, this is intended.

Oscillating things fade to white, and then suddenly vanish.

They should not. This is a bug, probably driven by an overflow of the "unsigned char age" value.

I will have a look into this - thanks for the feedback.

Matthias Wientapper commented on 2007-02-03 12:05

Fixed vanishing of oscilating things. I attached a new patch file.

Dominik Riebeling commented on 2007-02-03 12:47

Your latest patch doesn't compile for h120 – you check for LCD_DEPTH > 1 but use the color functions in that case, missing the fact that there are non-color devices with a depth greater than 1.
The attached patch changes this, it also uses greyscales on greyscale targets. This might make the result a bit "lighter" as there is no different background color. Haven't checked this though, the result looks ok from a first look. Also included the needed change to the SOURCES file (which was missing in your patch)

Michael Sevakis commented on 2007-02-03 13:45

Lol. I was planning on converting the GOL screensaver I wrote eons ago to rockbox. :P Guess you've taken on this responsibility.

I did do my coloring by neighbor count though. Look forward to seeing the effect of using age.

Matthias Wientapper commented on 2007-02-03 21:09

- optimized algorithm, improved speed
- added "glider gun" start configuration
- fixed 2bpp handling
- checked on ipod video, nano, h120 simulators
- checked on ajr, sansa hardware

Paul Louden commented on 2007-02-09 02:32

A note: You should have the plugin display on a clean background. Right now it displays on top of whatever background image is set. This can make it impossible to use if you have a black or dark background image.

Matthias Wientapper commented on 2007-02-10 21:28

- Fixed the backdrop/bg_color initialization
- backlight stays on now

Oleg G commented on 2007-02-15 02:28

I don't really understand how the button configuration works, but it doesn't let me do anything apart from start/stop with my Gigabeat. Could you explain how to edit the button mappings?

Matthias Wientapper commented on 2007-02-15 18:39

On Toshiba Gigabeat you should be able to start/stop GOL by pressing the middle button of the cursor cross.
Cursor down selects start pattern, cursor left toggles status display and cursor right does a single step (when stopped).
Pressing "A" quits the plugin.

At least that's what works fine in the simulator.

What exactly is it what you are missing?

Oleg G commented on 2007-02-15 20:46

Sorry my mistake. I just tried it again and found out that the other buttons only worked when GOL is paused.

Pascal Briehl commented on 2007-03-19 16:14

synced to svn

Antoine Cellerier commented on 2007-06-28 21:33

Nice :) (but completely useless … :p) Anyone object to applying this patch to svn?

Michael Sevakis commented on 2007-06-28 23:52

Yes, completely useless…like plasma, mandelbrot et al. :) I had mentioned above that had I planned on writing a GOL plugin myself but got beaten to it so of course I don't object.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing