C.Basic Archives : Conway's Game of Life

  Enterance > English Top > C.Basic > Archives > Conway's Game of Life

Conway's Game of Life - updated

This program was released on 2015, a long time ago for bench mark of C.Basic. In 2017 this has been updated to fit later version (at that time) of C.Basic.
I updated this to fix some bugs and to add some minor features running on the latest version of C.Basic for FX Ver. 2.45 build 20 and C.Basic for CG Ver 1.45 build 20.

- Author: Krtyski

- Program File: g1m file for C.Basic for FX and C.Basic for CG, not for genuine Casio Basic.

- Requirement: C.Basic for FX Ver 2.45 or laterC.Basic for CG Ver 1.45 or later

- RecomendationTuning-Up Tools (Ftune / Ftune2 / Ftune3 / Ptune2 / Ptune3)

- DownloadGame of Life Ver 2.45 (zip file)

- Installation: Transfer both of LIFE245.g1m and LMAP2P.g1m (subroutine) to root or a proper folder in storage memory. 

Run LIFE245.g1m.

With normal clock (59MHz) this program runs slow. If over-clocked to 236MHz or higher, it runs faster.


fx-9750GIII is used for this video.

- DownloadGame of Life Ver 2.45F (zip file) - High speed version

- Installation: Transfer both of LIFE245F.g1m and LMAP2P.g1m (subroutine) to root or a proper folder in storage memory.

Run LIFE245F.g1m.

You can enjoy Conway's Game of Life in high enough speed even with normal clock (59MHs). This version uses a special command as benchmark purpose to simulate C:Basic a comiler version in the future. This command is dedicated for Conway's Game of Life to update bitmap data from a generation to the next generation. 


fx-9750GIII is used for this video.

Start the program
Unzip the downloaded file and transfer all the g1m files to a proper folder in storage memory. LMAP2P.g1m is a sub-routine file. Start main program, LIFE245.g1m or LIFE245F.g1m.

How to play
Starting the main program, initila menu comes up. In this menyu screen select how to set initial cell pattern by pressing [F1] or [F6].

Press [F1] (Draw New Pattern) to show a simple instruction, then press [F1] again to start making initial cell perttern. 1 dot is 1 cell. Press [EXE] to show cross hair, move the cross hair using [up], [down], [left] or [right] key, pressing once is to move one dot. Then press [EXE] to draw one dot there. User can repeat this until finishing the initial cell pattern. 

Press [F6] (Select Pattern) to select pre-set initial cell patterns. 16 patterns are pre-set. Press [up] or [down] to select pattern. Especially a pettern #16 is randumly generated in whole screen. Press [F1] to fix the selection. User can add dots to the selected pettern. Press [EXE] to indicate cress hair then move it and press [EXE] again to add one dot drawn in the same way explained above. In the pattern selection / drawing screen press [EXIT] to return initial menu screen. 

In either way of setting initial cell pattern, now it's ready to go. At this moment it's generation 0 (zero). User should press [DEL] to step in the first generation (generation 1) of cell pattern. This program counts the generation in this way.

Press [(-)] to go step-by-step (generation-by-generation) or press [EXE] to continue updating generation. Current generation is indicated in top-right of your screen. Press [EXIT] to quit the program.

Right after pressing [EXIT] before the program completely quitted, screen shows some informaiton; the last generation number, time to get the generation and an instruction to swap to graphics screen.

User can save the graphics screen image of the last generation. Press [SHIFT][F6] to swap to graphics screen of the last generation, then press [SHIFT][7] (CAPTURE) to save the screen image in PICTURE format. User could save up to maximum 20 images and can download the image to PC in bitmap format (*.bmp) using PC link software supplied by Casio.

Preset Patterns
These videos below is obtained by LIFE245F.g1m running on fx-CG50 with C.Basic for CG Ver 2.45 build 20 with normal clock 58.9 MHz (not using Ftune3).

#1: 
Only 6 cells develops to 174th
generation and get stable.
#2: 
Only 5 cells widwly expand
launching 5 gliders and
develops to 652th generation.

#3: 
I found this pattern does not
expand so much and stay
within screen size of calc,
but develops to 517th
generation. I use this pattern
for bench mark.
#4: 
I found this expands towards to
horizontal within LCD screen.
#5: 


I found this pattern expand
to whole size of screen.
With current algorythm,
matrices size (for bitmap) is
suppressed as much as
possible and expand the size
as is necesary. I also use this
pattern for bench mark. 

#6: 
I found this pattern as
relatively long life one.
It expands to 658th
generation.

#7: 
This is one of famous blinkers.
#8: 
Famous pattern to reflect glider.
#9: 
A glider, famous as the smallest
moving object.
#10: 


Small and big space ship, a famous
one.

#11: 
A shuttle, one of famous patterns.
#12: 
Other shuttle, one of famous patterns.
#13: 
A glider gun, very famous pattern
as infinite proliferation. Gosper of
MIT (at that time) discoveres this
and got sweeptakes $50 from
Conway as the first discoverer of
infinite proliferation.
#14: 
A puffer train, one of famous patterns
of infinate proliferation.
#15: 
One of famous moving objects
leaving no spikes.
#16: 

This Pattern is ramdumly
generated.




inserted by FC2 system