Title: Conway's Game of Life
Competition: Software Engineering Competition (ALX SE CUP Semi-finals🚀🏆)
- Project Overview
- Project Description
- Live Demos
- Transition from Tkinter to CustomTkinter
- Features
- Technical Stack
- Challenges Faced
- Learning Outcomes
- Installation (Running Locally)
- Authors
This project is an implementation of Conway's Game of Life, a cellular automaton devised by the mathematician John Conway. The application is built using Python and the Tkinter library, providing an interactive interface where users can visualize and interact with the game's mechanics.
Game_of_life_customtkinter.mp4
GameOfLife_tkinter.mp4
Initially we developed the game of life using Tkinter, then the project was upgraded to CustomTkinter, offering a more modern and customizable interface, along with enhanced features such as improved game controls, dynamic UI elements, and better performance.
-
User Interface: A clean and intuitive UI built with CustomTkinter, allowing users to navigate easily between the lobby, settings, and game screens.
-
Settings Configuration: Users can customize the grid size (rows and columns) and select colors for alive and dead cells.
-
Save/Load Patterns: Users can save grid states as patterns and load them later to continue their gameplay.
-
Game Controls:
- Start and Stop buttons to control the game's execution.
- Reset functionality to clear the grid and start anew.
- Randomize button to populate the grid with random cell states.
- Custom Themes: Users can apply different color themes and adjust the appearance of the grid and controls.
-
Interactive Grid: Clickable grid cells that allow users to toggle between alive and dead states and also draw pattern on grid.
-
Dynamic Updates: The game updates the grid based on the rules of Conway's Game of Life, providing a real-time visualization of cell evolution.
- Programming Language: Python
- Framework: Tkinter and Customtkinter
- Randomization Logic: Utilizes Python's
random
module for initial grid state generation.
- Dynamic UI Updates: Ensured smooth transitions between different UI frames and efficient updates of the game grid.
- Cell State Management: Implemented the logic for counting alive neighbors and updating cell states according to the rules of the game.
- Error Handling: Addressed issues related to the management of game states and transitions between settings and game pages.
- Gained experience in developing GUI applications using Tkinter.
- Improved understanding of algorithms related to cellular automata and dynamic state management.
- Enhanced skills in handling user input and managing application flow in Python.
If you want to run the application locally on your terminal, follow these steps:
-
Clone the Repository
git clone https://github.com/Oxshady/dragons-game-of-life.git cd dragons-game-of-life
-
Create a Virtual Environment Navigate to your project directory and create a virtual environment:
python3 -m venv venv
-
Activate the Virtual Environment To activate the virtual environment:
source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the backend dependencies
pip install -r requirements.txt
-
Run the application
cd GameOfLife python3 app.py
- Karem Hany - GitHub Profile
- Shadi Mahmoud - GitHub Profile
- Youssef Ahmed - GitHub Profile
- Ahmed Harhash - GitHub Profile
- Sayed Abdelaal - GitHub Profile
- Sondoss Essam - GitHub Profile