Life as a Bit - DLX-1.00
A full-featured cellular automata simulator. The focus is on "Conway's Game of Life." With the 'Rule Panel' you can also explore other rule combinations.
Sean J McKiernan
"Life as a Bit" is a cellular automata simulator. It defaults to the well known set of rules known as "Conway's Game of Life."
A classic Conway Breeder added using the stamp interface.
- In draw mode add cells with the left mouse button and delete with the right.
- Magnification both with Zoom panel and scroll wheel.
- Panning with the arrow keys (and with the mouse in 'Grab Pan' mode).
- Space: Start
- p: Pause
- Backspace: Reset
- 1,2,3,4: Switch between Draw, Stamp, Drag-Pan, and Selector modes
- q,w,e,r: Stamp rotation and mirror copy hotkeys
- +,-: Increase/decrease desired speed (limited by computational speed)
- del,ctrl+x/c/v: Delete, cut, copy, and paste for Selector mode
- ctrl+s: Save all living cells in a pattern file
- g: Toggle grid on/off
- i: Toggle info window on/off
- ctrl+q: Hard quit (no prompt, immediate exit)
You know the Rules and so do I. Modify them here.
(Warning: Combinations resulting in explosive growth will quickly surpass the computational abilities of most computers.)
Explore other interesting patterns of emergent life.
- Birth (3,3) and Survival (1,5) for an interesting maze-like growth.
- Birth (4,8) and Survival (1,7) creates interesting seemingly aperiodic closed oscillators.
- Birth (3,4) and Survival (1,5) creates very strange octagonal life.
The above was generated with Birth (3,3) and Survival (1,5).
Stamp Mode (hotkey = 2):
"Life as a Bit" includes a database of well known and theoretically interesting patterns.
Using the stamp mode you can place these in any orientation using the rotation and mirror copy buttons.
A ghost image is also generated to assist in placement.
For those seeking a little more information, hit the information button and the available
information on the currently selected pattern will be displayed.
"Life as a Bit" reads three common formats of life pattern file ('Life 1.05', 'Life 1.06', and 'Run-Length-Encoded').
If you wish to add other patterns to the stamp database simply place your '*.lif' or '*.rle' file in
the 'lifep' subdirectory of the program.
The LifeWiki is a great place to find additional patterns and information.
Grab Pan Mode (hotkey = 3):
Pan with speed and ease using the mouse while in Grab-Pan mode.
Selector Mode (hotkey = 4):
Cut (ctrl+x), copy (ctrl+c), and delete using the convenient Selector mode. Simply place your selector rectangle using the mouse.
Cut and copied selections will be placed in the clipboard, and can be pasted in by pressing ctrl+v.
Selections can then be rotated and mirrored just as a stamp would.
Notes regarding saving (hotkey ctrl+s):
If you would like to save the currently living cells on the screen press ctrl+s.
Be aware however, the saved pattern will be named "savescreen.lif" and will be located in the "classic" directory.
If you do not rename this file, the next time you save, it will be overwritten.
Pygame.org account Comments
josmiley 2011-11-12 23:21:37
nothing happens, just displays gen
Mekire 2011-11-12 23:30:39
o.0 Did you add any cells to the field, or just hit start without adding anything?
josmiley 2011-11-13 01:33:52
it would be nice to add cells holding the mousebutton down
Mekire 2011-11-13 08:41:46
^_^ Done... New download is up with mouse button holding functional for both adding and deleting cells.
josmiley 2011-11-13 10:25:28
it would be possible to add cells during generation ? :)
Mekire 2011-11-14 06:46:33
Spawning during generation implemented. I also implemented/stole your method for generation calculation for the performance boost =P.
Next comes zoom controls and panning I think.
Rockachu2 2012-01-05 03:39:52
could you allow rendering to images? I would like to have a grid of 1920x1080, and an option would be nice.
Great pattern, looks intricate: birht:(1,1), survival(1,1)
diamond: (1,1), surv(1,3)
Mekire 2012-01-05 11:24:52
Hmm... Yeah I suppose image saving could be added fairly easily. Right now I am trying to get a new release of one of my other projects done though so I might not get to it for awhile.
I do like those rule settings you posted; unfortunately they overpower my machine pretty fast.
Yux50000 2012-07-12 18:04:37
Very cool application, but it always annoys me when people shove all of their game logic into one file. I prefer a more spread out, modular type thing, so I know exactly where to look when modifying things.
Mekire 2012-07-12 23:14:53
^_^ I understand. I actually started this program as a very minor side project and then it grew. The code could definitely be cleaned up more. Most of the GUI type things should probably be made into separate usable classes if nothing else; especially if I intend to ever reuse them in other programs. For the size of the program though, I don't know if I would bother creating more separate files or not though. Anyway, thanks for the download and hope you enjoyed it.
CrazyDave 2014-12-22 21:17:45
Better than any other simulator, you can stamp.
CrazyDave 2014-12-22 21:28:38
Sequel to Life as a Bit:
Life in a Bitfort
like this one, but pixels must be bought.
Add many more gun designs.
Load the Gopher gun and click run. Then try placing a pixel in front of the projectile; a big reaction will occur.
Living "people" would be non-stable reactions occurring in the fortress.
Walls could be penetrated by outgoing projectiles but nothing else.
To generate a random seed, make random small bits. Then see if it grows big enough, one seed had only 5 pixels and lived for many minutes.
Also implement war.