Contents

Introduction to life

Features of W-Life

Keys

Mouse buttons

Loading a life file

Saving a life file

Save file format


Introduction

W-Life brings up a window in which the user may play the game of life, designed/discovered by John Conway in the early 1970's

W-Life is a port of XLife 2.0 to the PC.

Rules of Life

A cell with either 2 or 3 neighbors will survive and remain in an on state, other cells will die. Empty cells with 3 neighbors will become set. These rules give diverse results, a large number of simple still lifeforms exist along with a number of simple oscillators and traveling lifeforms. However, much more complex entities can be constructed and this is the real beauty of Life. It can also be shown that logic elements can be implemented, and other components necessary for the construction of a Life computer. Indeed the outline of a universal construction engine has been published which indicates that, in principal, a self replicating lifeform could be designed, though such an object would be truly enormous. As W-Life allows a 4 billion square life universe, get designing and you never know what you can construct!

Other rules can be specified in the program from the Options dialog box. Experiment away!

W-Life also comes with a large selection of life patterns stored in the <W-Life dir>\patterns\ directory.


Features of W-Life

W-Life contains the following features of XLife 2.0:

The life universe is effectively unbounded (4.2 billion on a side)

The algorithm uses hashed 8x8 boxes of cells, and computes the next generation by using a 1Mb lookup table for added speed.

Files can be loaded and saved in XLife format. The default DOS file extension is .lif.

The view in the main window can be zoomed to scales 1-5, where the cell sizes are 2^scale pixels on each side.

The survive/birth rules can be changed from the default 23/3 to any user specified selection to allow you to investigate other life geometry's.

Additional features of W-Life

The foreground (cell color) and background colors can be selected. Color advancing can be enabled, where the cell color is advanced through a series of color blends as the generation count is increased. The cells can also be displayed as 3D bitmaps, because I think it looks cool.

A box view window can be brought up which displays the 8x8 boxes as single pixels, this is useful

for navigating very large life patterns.

A benchmark dialog has been implemented for speed testing purposes.


Save File Format

A .lif image file is an ordinary text file consisting of lines terminated by

the newline character. It is interpreted as one or more image sections

separated by section lines beginning with '#'. Lines led by '##' are

considered comments and ignored.

Each image section is interpreted according to the format letter following its

section line '#'. The format letters are:

A -- Absolute.

Each line is interpreted as an absolute (x,y) coordinate pair.

R -- Relative.

Each line is interpreted as a relative (x,y) coordinate pair.

P -- Picture.

Each line in the section is interpreted as a scan line of a relative image.

Each '*' character turns the corresponding bit on. All other characters leave

the corresponding bit off.

I -- Include.

A '#I' line should have whitespace-separated fields after the '#I'; a pattern name

and optionally two integers interpreted as x and y offsets. The named pattern

file is loaded as if it had been included in the image at this point. The

offsets, if present, displace the load point of the pattern relative to the

current mouse position. The include facility is useful for assembling sampler

collections of interesting patterns.

Relative image sections are normally drawn with 0,0 on the current mouse

position (coordinates may be negative). This may be changed by including a

pair of whitespace-separated integers after the format character. If this is

done, these will be interpreted as a pair of x and y offsets, and the image

section will be drawn with its upper left corner displaced from the cursor

position by those offsets. This facility can be used to write image files

that will load patterns centered on the cursor.

A leading image section with no header line is treated as though it had a '#A'

header. Thus, XLife version 1.00 image files will load properly.

N -- Name

This line contains the internal name of the pattern (which may differ from the

XXX.lif name of the file.

O -- Owner

This line contains information on the person who wrote the file, it is written

in the form: id "name"@machine date, for example.

#O gsummers "Glen Summers"@physics.ox.ac.uk Sat Jul 2 16:30:20 1994

C -- Comment

Lines beginning with "C" are comments that the user may have automatically written

to the save file, and which may be viewed from within W-Life.


Loading a life file

To load a life file select Open from the File menu or press the 'l' key, and then select the desired file. Pressing the 'l' key will attempt to load the file at the position of the mouse pointer when the key was pressed, otherwise the pattern will be loaded to the screen center. However, if the file is internally flagged as absolute it will load to a predetermined position stored within the file.

Files are merged into the current life universe, so compound patterns can be formed by loading multiple files into different coordinates.

Information stored in the file such as, internal name, description and owner can be subsequently viewed in the File Info dialog, which can be opened from the File->View file info menu item.


Saving a life file

To save a life pattern select Save from the File menu or press the 'S' key. Enter the relevant file details in the save dialog box, and click on Save. All of the information in the life plane will be saved to the file. Small images will be saved in picture format, larger ones in an xy coordinate list, this ensures that large but sparse images will save to a reasonable file size.

See also:Save file format


Mouse buttons in W-Life

Button presses in main life Window:

Left button:	The state of the cell at the mouse pointer is inverted, subsequent dragging of the mouse will set neighboring cells to this new state. i.e. Click on an off cell to set it to on, drag to set additional cells on. Click on an on cell to turn it off, drag to blank out further cells.

Right button:	The coordinate of the life plane lying at the mouse pointer will be moved to the center of the screen. Enabling you to move around the life universe.

Button presses in box view Window:

Left button:	The coordinate of the life plane lying at the mouse pointer in the box view window will be centered in the main window. Use this option to quickly move around a large life object.

Right Button:	The coordinate of the life plane lying at the mouse pointer in the box view window will be centered in the box view window.


Keys for W-Life

The cursor keys, or the numeric keypad can be used to scroll around the Life plane.

Keypad-5	Centers the display.

ESCAPE 	Toggles the presence of the window title and menu.

+/-	Zooms in/out the area around the mouse cursor.

1-5	Sets the scale to the specified value.

g	Toggles the run state.

o	Step forward one generation.

h 	Toggles the hide state.

c	Toggles the display of the cell count.

C 	Clears the display.

r	Redraws the screen in hide mode.

R/O	Brings up the rules/options dialog.

S	Brings up the save dialog box, to save the universe to a file.

l 	Load (actually add to) the universe from a file.

f1 	Opens the W-Life help file.

f 	Sets the speed to fast (0 ms frame delay).

m 	Sets the speed to medium (250 ms frame delay).

s	Sets the speed to slow (500 ms frame delay).

!	Randomizes the area of the life plane visible in the main window.

B	Opens up the benchmark dialog.

Q	Quits the program.