-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.txt
83 lines (58 loc) · 2.39 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
################################################################################
Game of Life
--------------------------------------
© Lorenzo Martinico, Piotr Jander 2014
################################################################################
Overview
1. Installation.
2. Usage.
3. Features.
4. Contributions
#1 Installation
Before attempting to compile the program, make sure that the packages
`matrix' and `gloss' are installed.
The package has a structure:
\GameOfLife
\bin-*
...
\patterns
...
\src
Grid.hs
Main.hs
Suppose you want to compile the program for Windows. Then
1. Create a folder "bin-win32" in "GameOfLife".
2. Go to "src".
3. Run
> ghc -o ../bin-win32/Life -outputdir ../bin-win32 Main.hs
This will create the output files in "GameOfLife/bin-win32". They will include
an executable file "Life".
#2 Usage
To run the program, open "bin-*" in terminal, where * is your platform. Then run,
for example,
> Life 10 vacuum-cleaner
This command will open a window in which the system's evolution will be
animated. The program will get the pattern from
"GameOfLife/patterns/vacuum-cleaner.rle" and animate it at the speed of
10 frames per second. You can drag the canvas and zoom in/out with the mouse
to adjust the view.
You can also type
> Life patterns
to see a list of supplied patterns.
Once the display window is open, the user can drag around to move the viewport and use the mouse wheel to zoom in and out.
To close the current window and return to the command line, simply press ESC
#3 Features
The program can:
* read pattern data from RLE files.
* animate the evolution of a big system in real time.
* chaotically colours the grid; each time the program is run, it uses a random
palette of colors from the file `palettes'.
It also has, however, some limitations:
* it can't animate very big patterns at a very high fps rate.
* it can only animate systems which shrink or whose size stays about the same;
this is because the grid is represented as a matrix of fixed size.
#4 Contribuitions
While we have designed the enginge for converting RLE files to animated drawing,
most of the example patterns included in our program are taken by the libraries of the Golly Game of Life simulator.
The authors of each pattern are credited in the appropriate file.
When no author is included, the code was written by us (but it's still based on "stock" game of life patterns).