/JeuDeLaVie

Yet another (Python+PyGame) implementation of John Horton Conway's Game of Life

Primary LanguagePythonBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

About JeuDeLaVie

Yet another (Python+PyGame) implementation of John Horton Conway's Game of Life.

With goals of readability (it was intended as an example for my son - no sophisticated algorithms such as HashLife here), providing a PyGame example, in a program (project) with rather complete functionalities (configuration file, saves, multi modes, etc.) BUT with a minimalist GUI only using the window title (a challenge!), the idea being to later use a PyGame GUI framework, for example such as Simple Game Code

Installation / Configuration / Usage

Install Python 3 and PyGame, then launch vie.py from your file explorer or use "python vie.py" on the command line.

After first launch, a vie.cfg configuration file will be created that you'll be able to tweak to your taste (including setting the game in English).

Windows users: you can download Python and PyGame from the following locations:

On first launch, it'll automatically download and install LifeWiki's 1500+ pattern files collection.

Versions and changelog

1.1 2020-05-16

- CORRECTION: Corrected a bug when using File mode before the creation of the backup directory or the first file inside
- CORRECTION: Corrected a bug with PlainText files loading (empty lines instead of dot filled lines)
- CORRECTION: Correction a bug with RunLengthEncoded files loading (multiplicator before the "$" character)
- NEW FEATURE: Automatic download and install of LifeWiki's pattern collection
- NEW FEATURE: Measuring evolution cycle duration and displaying it on the console in DEBUG mode
- OPTIMIZATION: Use integers when comparing the number of cell neighbours with the birth/survival rule
- OPTIMIZATION: Evolve or crop only the useful part of the game grid
- PRESENTATION: Improve PEP8 compliance

1.0 2020-05-08

Initial public release.

Caveats

The source code comments and names are written in French (my primary audience is my son). However the game is released with both a French or English translation (set this in the configuration file).

Limits & Known bugs

  • Best displayed on Full HD (1920*1080) screens, else the text strings are shortened till SVGA resolution (800x600) then truncated
  • The examples' name in the internal library of patterns are only in French

Further development plans

All the main functionalities are implemented.

There's a list of possible unimplemented functionalities at the end of the vie.py file.

License

This open source software is distributed under a BSD license (see the "License" file for details).

Credits

  • In memory of John Horton Conway, 1937-2020.
  • The article La vie, seul où à deux in Jeux & Stratégie n°9, which made me discover this game in June 1981
  • The book "Récréations informatiques", bibliothèque Pour la Science, diffusion Belin, which made me (re)discover this game in 1987 and want to program it
  • Wikipedia which made me (re)discover the remarkable patterns provided in the included internal library
  • WikiLife for its pattern collection and its description of the usual file formats

Author

Hubert Tournier

May 16, 2020