GtkLife


This file documents some of the less obvious aspects of the GtkLife interface. If you're not familiar with Conway's Life itself, you should start by reading a good introduction.

Moving Around

In addition to the scrollbars, you can use the numeric keypad (with numlock on) to move around the grid. To scroll by page, hold down the <ctrl> key. Keypad "5" recenters at the middle of the world.

To recenter the screen around a particular point, right-click on it.

Drawing

Left-click to toggle a cell between alive and dead. Drag the mouse to continue either setting or erasing cells. You can even draw while the pattern is running. Try it; it's fun :-)

Cut and Paste

To select a region, left-click on the upper-left cell of the region while holding down the "shift" key, then drag. You can then copy, cut, or clear the region (clearing empties the region without copying it). When you paste by choosing "Paste" from the menu or by typing Ctrl-V, a highlighted rectangle will appear as you move over the grid. Left-click when the rectangle is located where you want to paste. You can also paste Unix-style by simply middle-clicking on the upper-left corner of the desired region.

If a selection is active when you paste, it will be implicitly copied and used rather than the existing copy buffer. The Ctrl-C binding is provided mainly for completeness.

One special feature is the "Move" command, Alt-M. This is essentially a shortcut for Cut-Paste, but it leaves the original region on display while pasting, so that you can easily displace a block of cells by a chosen margin.

Note: GtkLife pasting is "transparent"--only live cells are copied. In other words, empty cells in the source region will not overwrite live cells in the target region.

Some Useful Keybindings

As with any Gtk+ app, you can set your own custom keybindings by typing a [ctrl] or [alt] combination while a menu item is highlighted. These keybindings will be saved across program runs.

Notes on Speed

Speed is set in generations per second. By default, the program will start to drop frames if it finds itself falling behind---that is, the next generation will be computed, but the screen will not update during that tick. This greatly improves performance, especially if you don't have 2D acceleration on your video card. If you want to temporarily disable frame skipping, deselect the check box in the Speed dialog (accessible from the "Run" menu). Go to Preferences/Run to set it off by default.

The speed slider on the toolbar goes up to 200 gen/s (by default), but this is not a hard limit. The speed dialog will accept any value up to 10000. Of course, what speed you will actually attain depends on the complexity of the pattern and on your processor.

The Life Pattern Archive

GtkLife comes with the Life Pattern Archive, as amassed by Alan Hensel. By default, a sidebar listing these patterns is displayed to the left of the grid. Click on a pattern name to load it. You can set a different patterns directory in Preferences--any files with a ".lif" extension in that directory will be listed in the sidebar. Of course, you can also use the standard File->Open command to load a pattern file from anywhere.

File Format

Pattern files are loaded and saved in the .LIF file format used by the Life Pattern Catalog. This format is recognized by a number of other Life programs, including XLife and the MS Windows Life32. It has one niggly limitation: the pattern description stored in the file is limited to 22 lines by 78 characters. GtkLife will complain if your description goes out of those bounds.