This project is an implementation of Conway's Game of Life using Lua and the LÖVE 2D framework. It features customized rules that modify the behavior of the original game, allowing for creative and varied cell interactions.
The traditional Game of Life rules have been modified as follows:
- Any live cell with no neighbors dies due to underpopulation.
- Any live cell with more than 5 neighbors dies due to overpopulation.
- Any live cell at the border of the grid dies.
- Any dead cell with more than 3 neighbors becomes alive.
- All other cells remain in their current state.
- LÖVE 2D (version 11.0+ recommended)
-
Install LÖVE 2D:
- Download and install from https://love2d.org/
-
Clone the repository:
git clone https://github.com/nazmul-islam00/Game-of-Life.git cd Game-of-Life
-
Run the game:
love .
Game-of-Life/
├── main.lua # Entry point
├── Grid.lua # Game grid and cell logic
├── Box.lua # Cell rendering and interaction
├── class.lua # OOP helper for Lua
├── push.lua # Resolution handling library
├── font.ttf # Game font
├── game-of-life.gif # Sample gameplay preview
└── README.md
- Left Click: Toggle a cell's state (alive/dead)
- Spacebar: Start or pause the simulation
- R: Reset the grid
- Escape: Exit the game
This repository is licensed under the MIT License.