Block of Life is a simple C program that simulates the Game of Life, a cellular automaton devised by the British mathematician John Horton Conway. This project was created as a way to improve my C programming skills and to learn how to package software into a .deb package for Debian/Ubuntu-based systems.
- Implements the Game of Life algorithm.
- Simple terminal-based interface for visualizing the simulation.
- Random initialization of cells.
- Configurable grid size and iterations.
- Download the .deb package from the Releases section.
- Install the package with the following command:
sudo dpkg -i block-of-life_*.deb- If there are missing dependencies, run:
sudo apt-get install -fAfter installation, you can run the program with:
block-of-life- GCC compiler
- Make
- dpkg-dev (for creating .deb packages)
- Clone the repository:
[git clone https://github.com/MiracleForge/block-of-life.git
cd block-of-life- Compile the program:
gcc -o block-of-life.c block-of-life- Run the program:
./block-of-lifeTo create your own .deb package:
make packageThe Game of Life follows these simple rules:
- Any live cell with fewer than two live neighbors dies (underpopulation).
- Any live cell with two or three live neighbors lives on to the next generation.
- Any live cell with more than three live neighbors dies (overpopulation).
- Any dead cell with exactly three live neighbors becomes a live cell (reproduction).
block-of-life/
├── src/
│ ├── main.c
│ ├── game_of_life.c
│ └── game_of_life.h
├── debian/
│ ├── control
│ ├── changelog
│ └── rules
├── Makefile
├── README.md
└── LICENSE
🎯 Planned Updates (v2.0)
Auto-sizing: Grid automatically adapts to terminal dimensions Pattern library: Built-in famous Conway patterns (Glider, Gosper Gun, Pulsar, etc.) Color support: Colorized output for better visualization
Cell aging: Visual representation of cell age with different colors/symbols Statistics tracking: Population graphs, stability detection, period analysis
Export options: Generate GIF animations, PNG snapshots, or CSV data Configuration files: Save preferred settings and patterns
Package managers: Available on homebrew, snap, and flatpak
🎯 Planned Updates (v3.0)
Interactive mode: Pause, step through, and modify simulation in real-time
Zoom functionality: Focus on specific regions of large grids Toroidal topology: Wrap-around edges for infinite-like behavior Multiple rule sets: Support for different cellular automaton rules (B3/S23, HighLife, etc.) Zoom functionality: Focus on specific regions of large grids
Optimized algorithms: Sparse matrix representation for large grids Multi-threading: Parallel computation for faster iterations Memory efficiency: Dynamic allocation based on active regions
Cross-platform: Windows and macOS support Package managers: Available on homebrew, snap, and flatpak Using OpenGl
Contributions are welcome! Please feel free to submit a Pull Request.
- John Horton Conway for creating the Game of Life
- The open-source community for inspiration and tools
Paulo Henrique Moreira Rosado - paulomoreirarosado@hotmail.com