Skip to content

Ball Breaker is a classic arcade-style game developed in Java 11

License

Notifications You must be signed in to change notification settings

VirajMadhu/Brick-Breaker-Game

Repository files navigation

Brick Breaker Game (Java)

Brick Breaker is a classic arcade-style game developed in Java 11. Use the left and right arrow keys to control the paddle, keep the ball in play, and break all the bricks to earn points. If you miss the ball, you lose the game, but you can restart it anytime by pressing the Enter key.

Game Features

  • Paddle Control: Move the paddle left and right using the arrow keys to keep the ball in play.
  • Brick Breaking: Aim the ball at the brick wall to break the bricks and score points.
  • Ball Dynamics: The ball changes direction based on its impact with the paddle, bricks, and walls.
  • Restart Game: Press the Enter key to restart the game after a loss.
  • Score Tracking: Keep track of your score as you break more bricks.

How to Play

  • Start the Game: Launch the game and a ball will start moving.
  • Control the Paddle: Use the left (←) and right (→) arrow keys to move the paddle.
  • Break Bricks: Bounce the ball off the paddle and hit the bricks to break them and earn points.
  • Avoid Missing the Ball: Ensure the ball does not fall below the paddle, or you will lose the game.
  • Restarting the Game: If you lose, press the Enter key to restart and play again.

Installation and Setup

Clone the Repository:

git clone https://github.com/VirajMadhu/Brick-Breaker-Game.git

Navigate to the Project Directory:

cd BallBreaker-Game

Compile the Game:

javac -d out/production/BallBreaker src/Main.java

Run the Game:

java -classpath out/production/BallBreaker Main

Development Setup

Prerequisites

  • Java 11: Ensure you have Java 11 installed on your system. You can download it from the official website or use a package manager like apt for Linux.

Running the Game in an IDE

  • Import the Project: Open your favorite Java IDE (e.g., IntelliJ IDEA, Eclipse) and import the ball-breaker project.
  • Build and Run: Use the IDE’s build and run features to compile and launch the game.

Contributing

Contributions are welcome! If you find any bugs or have suggestions for improvements, please open an issue or submit a pull request.

Submitting Issues

  • Use the GitHub Issues page to submit bug reports and feature requests.
  • Provide detailed information to help reproduce the issue.

Pull Requests

  • Fork the repository.
  • Create a new branch (git checkout -b feature/your-feature).
  • Commit your changes (git commit -am 'Add your feature').
  • Push to the branch (git push origin feature/your-feature).
  • Open a pull request on GitHub.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

About

Ball Breaker is a classic arcade-style game developed in Java 11

Topics

Resources

License

Stars

Watchers

Forks

Languages