InvestorsHub Logo
Followers 41
Posts 12861
Boards Moderated 23
Alias Born 04/16/2001

Re: None

Wednesday, 12/08/2004 7:40:09 AM

Wednesday, December 08, 2004 7:40:09 AM

Post# of 4
WLIFE.EXE - Windows Port of 1989 Jon Bennet's Xlife

Oops, not fractal stuff but a program I wanted :o)

wlife.zip 183,449 bytes
from http://www.ma.hw.ac.uk/maths/Teaching/masterclass

Contents
----------
Introduction
Features
Keys
Mouse Buttons
Loading a Life File
Saving a Life File
Save File Format

============
Introduction
============

W-Life brings up a window to 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
========

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.

====
Keys
====

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.

=============
Mouse Buttons
=============

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.

===================
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.

================
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.

(end of download)
---------------------------
(Loaded onto my Windows XP)

Directory of C:

wlife <DIR>
wlife zip 183,449

Directory of C:\wlife

PATTERNS <DIR>
PATTERNS ZIP 85,006
README 1,420
RELNOTES 1,165
WLIFE EXE 118,784
WLIFE HLP 18,015
WLIFE32 EXE 110,592

Directory of C:\wlife\PATTERNS

[.] [..] 12GLIDER.LIF 2_AK47.LIF ACORN.LIF
AK47.LIF ALU.LIF BAKER.LIF BARBER.LIF BEACONMA.LIF
BENCHMAR.LIF BG1.LIF BHEPTOMI.LIF BIGGLIDE.LIF BILLIARD.LIF
BOATCAP.LIF BOATMAKE.LIF BPUSH.LIF BPUSH2.LIF BPUSH3.LIF
BPUSH4.LIF BREEDER.LIF BSHIP.LIF BSHIP2.LIF BSHIP3.LIF
BUNNIES.LIF CENTINAL.LIF CHESHIRE.LIF CITIESIN.LIF CLAPPING.LIF
CLOCK.LIF CMU.LIF CMU2.LIF CMU3.LIF COLLAPSE.LIF
COUNTER.LIF COW.LIF CROSS.LIF DIAGFUSE.LIF EATERS3.LIF
F.LIF F2.LIF F3.LIF FENCEPOS.LIF FIGURE8.LIF
FISHEATE.LIF FLASHER.LIF FLYWHEEL.LIF FUSEBRAN.LIF FUSECORN.LIF
FUSEHING.LIF FUTILITY.LIF GARDENOF.LIF GEAR.LIF GGGUN.LIF
GGUN.LIF GGUN2.LIF GLIDEG1.LIF GLIDEG2.LIF GLIDEG3.LIF
GLIDEG4.LIF GLIDEG5.LIF GLIDEG6.LIF GLIDEG7.LIF GLIDER.LIF
GLIDERAR.LIF GLIDERBA.LIF GLIDERFO.LIF GLIDERME.LIF GLIDERS1.LIF
GLIDERS2.LIF GLIDERS4.LIF GLIDERSI.LIF GLIDERSP.LIF GLIDERTO.LIF
GOURMET.LIF GREYMATT.LIF GUNANDEA.LIF HARVESTE.LIF HORIZFUS.LIF
J.LIF KICKBACK.LIF LAMBDABO.LIF LARGEFIS.LIF LFUSE2.LIF
LINE.LIF LONGFUSE.LIF LONGSNAK.LIF MEDIUMFI.LIF MFG.LIF
MFG2.LIF MOREJUNK.LIF O.LIF O1.LIF O2.LIF
O3.LIF O6.LIF O7.LIF P120GLID.LIF P24.LIF
P26.LIF P28.LIF P47.LIF P54SHUTT.LIF P55.LIF
P66.LIF P94.LIF PENTADEC.LIF PIECOLLE.LIF PIFUSE.LIF
PISTON.LIF PISTON2.LIF PUFFERTR.LIF PULSAR18.LIF PULSAR48.LIF
PULSE.LIF PULSE1.LIF PULSE2.LIF PUMP.LIF R.LIF
RABBIT.LIF RAKE.LIF RAKE2.LIF RAKE3.LIF RAKE4.LIF
RAKE5.LIF RAKE6.LIF RAKE7.LIF RAKECOLL.LIF RAKESHIP.LIF
RANDOMGU.LIF RELAY.LIF ROUND.LIF RPENTOMI.LIF SCHOOLOF.LIF
SFISHG.LIF SGLIDER.LIF SHININGF.LIF SIXGLIDE.LIF SKYLINE.LIF
SLOWSHIP.LIF SMALLFIS.LIF SOMEJUNK.LIF SPARK.LIF SPARK2.LIF
SPARKFUS.LIF SPARKTOP.LIF SQUAREBL.LIF SQUARECA.LIF SQUAREDA.LIF
SSHIP2.LIF SSHIP3.LIF STARGATE.LIF SWITCHEN.LIF TBIRDF.LIF
TEST.LIF TESTTUBE.LIF THUNDERB.LIF TTB.LIF TURBINE8.LIF
WASHERWO.LIF WAVE1.LIF
less than 160 File(s) 249,209 bytes

-end-

Lactose Free Milkman

Join the InvestorsHub Community

Register for free to join our community of investors and share your ideas. You will also get access to streaming quotes, interactive charts, trades, portfolio, live options flow and more tools.