Home

Awesome

Colorful Game of Life with Pygame

A simple implementation of Conway's Game of Life using Python and Pygame, featuring adjustable parameters through command-line arguments. In my RGB-LED-Matrix have added color to the cells to make the simulation more visually appealing. The colors are generated randomly for each cell at the start of the game. Most people are fascinated by the colorful Game of Life, so i decided to rewrite the LED-Matrix code to a pygame version. So everyone can enjoy the colorful Game of Life on their computer.

If you want to know more about the Game of Life, check out the Wikipedia page.

If you want to know more about the RGB-LED-Matrix, check out the GitHub page.

If you want to know more about how to program Conway's Game of Life in various programming languages, check out the GitHub page.

Requirements

Usage

python rgb_cgol.py [options]

Options

Examples

  1. Run the Game of Life with default parameters:
    python rgb_cgol.py
    
  2. Run with a 256x256 grid, 10x10 pixel cells, and 60 frames per second:
    python rgb_cgol.py -w 256 --ht 256 -s 10 -f 60
    
  3. Load an initial state from an image file:
    python rgb_cgol.py -o structures/01.txt
    
  4. Set the game to run for 500 frames at 30 frames per second:
    python rgb_cgol.py -d 500 -f 30
    
  5. Run the game in fullscreen mode:
    python rgb_cgol.py --fullscreen
    
    • Note: When in fullscreen mode, the cell size is automatically adjusted to fit the screen.
    • Press the ESCAPE key to exit the game.

Notes

License

This project is licensed under the MIT License.