ByteBlast is a BlockBlast clone using PyGame that includes an auto solver that uses a backtracking algorithm to find solutions. BlockBlast is a puzzle game where players place blocks on a grid to clear rows and columns much like Tetris.
- Block movement and placement: use the keyboard keys to move and place blocks on the grid.
- Line clear: clear entire rows and columns when they are filled.
- Random solvable block generation: generates new blocks that can always be solved.
- Score tracking: track the users score as they place blocks and clear lines.
- Auto-solve: an algorithm that automatically solves the puzzle indefinitely using backtracking.
- Clone the repo
git clone https://github.com/andrianllmm/byteblast.git cd byteblast - Create and activate a virtual environment
python -m venv venv source venv/bin/activate # or venv\Scripts\activate for Windows
- Install the dependencies
pip install -r requirements.txt
- Start the game
python src/main.py
-
Blocks can only be placed if they fully fit within the grid and do not overlap existing tiles.
-
Completing a full row or columnclears it and awards bonus points.
-
Your score increases based on:
- The number of tiles placed.
- The number of rows and columns cleared.
-
New blocks are generated only when all current blocks are placed.
-
Generated blocks are guaranteed to be solvable.
The game ends when none of the available blocks can be placed anywhere on the grid.
- A: Select first block
- S: Select second block
- D: Select third block
- TAB: Cycle through available blocks
- Arrow Keys: Move the selected block around the grid
- SPACE: Place the currently selected block
-
ENTER: Toggle auto-solve mode
- When enabled, the solver will automatically place blocks using a backtracking algorithm.
- The game will continue indefinitely until no valid solution exists.
Contributions are welcome! To get started:
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a pull request
Found a bug or issue? Report it on the issues page.
