Welcome to the Brick Breaker Game! This game is a modern take on the classic arcade game where players control a paddle to bounce a ball and break bricks. The game includes various power-ups and different types of bricks, making it an exciting and challenging experience.
- Screenshots
- Features
- Installation
- Gameplay
- Classes and Structure
- Power-ups
- Bricks
- Contributing
- License
- Classic brick-breaking gameplay with modern graphics.
- Multiple power-ups that can double the paddle size, halve the paddle size, double the ball speed, halve the ball speed.
- Different types of bricks, each with unique properties and power-ups.
- Player lives and score tracking.
- Dynamic paddle and ball physics.
To get the game up and running, follow these steps:
-
Clone the repository:
git clone https://github.com/aleena-zahra/Brick-Breaker-Cpp.git cd Brick-Breaker-Cpp
-
Install dependencies: Ensure you have a C++ compiler and the necessary graphics libraries installed. This game uses a custom graphics library (
util.h
), along with Glut Librarysudo apt install freeglut3 freeglut3-dev sudo apt install build-essential libx11-dev libxmu-dev libxi-dev libglu1-mesa libglu1-mesa-dev
-
Compile the game:
make
-
Run the game:
./game
- Use the mouse to move the paddle left and right.
- Bounce the ball off the paddle to hit and break bricks.
- Collect power-ups that fall from broken bricks.
- Try to break all the bricks to advance to the next level.
- Keep an eye on your lives and score.
The game is organized into several classes, each handling different aspects of the game:
- Score: Manages the player's score.
- Lives: Manages the player's lives.
- Paddle: Controls the paddle's properties and movement.
- Player: Combines the paddle, score, and lives into a single entity.
- Ball: Manages the ball's properties and movement.
- Powerup: Base class for various power-ups.
- Brick: Base class for different types of bricks, with inherited classes for specific brick behaviors.
The game includes several power-ups, each with unique effects:
- PowerupGreen: Doubles the size of the paddle.
- PowerupPink: Halves the size of the paddle.
- PowerupBlue: Halves the speed of the ball.
- PowerupRed: Doubles the speed of the ball.
- PowerupYellow: Adds additional balls (planned feature).
Different types of bricks are included in the game, each with unique properties:
- PinkBrick: Requires two hits to break, contains a pink power-up.
- YellowBrick: Requires two hits to break, contains a yellow power-up.
- RedBrick: Requires three hits to break, contains a red power-up.
- BlueBrick: Requires three hits to break, contains a blue power-up.
Contributions to enhance the game are welcome! To contribute:
- Fork the repository.
- Create a new branch.
- Make your changes and commit them.
- Push your changes to your fork.
- Submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
Enjoy playing the Breakout Game! If you have any questions or feedback, feel free to open an issue on the repository.