An interactive and strategic desktop game built with Python and the Pygame library. Challenge your friends in this exciting 4-player adaptation of the classic Chain Reaction game.
Chain Reaction is a turn-based strategy game played on a grid. The goal is to be the last player standing by eliminating your opponents' orbs.
How to Play:
- Players take turns placing their colored orbs on the grid.
- You can place an orb on an empty cell or a cell you already occupy.
- When a cell reaches its critical mass (number of orbs equals its number of adjacent cells), it explodes!
- Upon exploding, the orbs propagate to all adjacent cells, converting them to your color and potentially causing a chain reaction of explosions.
- Eliminate all other players to win!
This project is an excellent exercise for understanding game logic, grid-based mechanics, and the Pygame library.
- 4-Player Local Multiplayer: Play with up to 4 friends on a single machine.
- Strategic Gameplay: Simple rules with deep tactical possibilities.
- Dynamic Chain Reactions: Watch as a single move triggers a massive cascade across the board.
- Colorful and Clear UI: Intuitive interface with distinct colors for each player.
- Turn-Based Mechanics: Perfect for taking your time and planning your next move.
Follow these steps to get the game running on your machine:
- Python 3.x must be installed on your computer.
- If you don't have it, download it from python.org.
-
Download the Source Code
- Clone this repository or download the ZIP file and extract it.
-
Install Pygame
- The game requires the Pygame library. Open your command prompt/terminal and run:
pip install pygame
- The game requires the Pygame library. Open your command prompt/terminal and run:
-
Run the Game
- Navigate to the project directory in your terminal.
- Run the main Python file:
python chain_reaction.py
- Alternatively, you can open
chain_reaction.pyin Python IDLE or your favorite IDE (like VS Code, PyCharm) and run it from there.
- The game will start with a grid and a display showing whose turn it is (Player 1, 2, 3, or 4).
- On your turn, click on a valid cell to place your orb.
- Plan your moves carefully to trigger chain reactions that will overwhelm your opponents!
- The last player with orbs remaining on the board wins the game.
- Language: Python
- Library: Pygame
- Type: Desktop Application
- Database: None
This project was developed for educational purposes. The source code is free to use and modify. Enjoy learning and coding!