Brick Breaker made in C++ (OpenGL) as a semester project for OOP module at FAST-NU.
- Clone the repository in Linux Ubuntu Distro
- Run the following commands:
(i) sudo apt update
(ii) sudo apt-install build-essential
(iii) sudo apt-get install freeglut3-dev glew-utils libglew-dev libfreeimage-dev - A Game exe will be created that can be executed by ./game
Use the mouse to control the primary paddle
Arrow Keys can be used to control the secondary paddle (only in Level 3)
Each Brick has different lives and PowerUps based on randomly assigned initial attributes
Escape (ESC) Key can be used to go back to the previous window where the Keys aren't specifically observable
- A primary class Paddle that inherits from the Grid class and has other class objects made in composition.
- Grid class only contains constant so inheriting it multiple times in other classes is only purposed for accessing constants and drawing a layout of the grid.
- By creating a Brick class pointer in Paddle, Levels are created and drawn using polymorphism.
- Brick class contains mechanism for collision with the Bricks and activating PowerUps when each of the bricks gets destroyed.
- The Ball class contains all the functionality of the Ball including: setting the deflection angles and movement. The collision with Paddles is handled in Paddle class itself.
- A Point class is used by every class to set the coordinates of their objects easily.