Breakout game made using Java Swing. I managed to finish this in a couple of days as a code example for an interview.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
build
screenshots
source
Play Breakout.exe
Readme.md

Readme.md

How to play

Open "Play Breakout.exe" to play the game. If the file is named "Play Breakout.dat", change the extension to exe ("Play Breakout.exe") and run it.

Objective

The objective of the game is to use the paddle to bounce the ball towards the bricks and destroy them. You win when all the bricks are destroyed. But if the ball falls below the paddle into the fiery pits of doom, you lose the game.

The paddle has "zones" which bounce the ball in different angles. Try out the game and you will notice it. If the ball bounces at the center, it goes straight up. As it goes to the sides, it's angle and speed increase. This gives you a certain degree of control over the direction of the ball.

Controls

Left Arrow: Move paddle left. Right Arrow: Move paddle right.

While the mouse is inside the game window, the paddle will follow the mouse. Playing with the mouse gives the best sense of control, as using the keyboard limits the speed at which you can move the paddle.

Also note that the paddle is capable of going out of the screen by about half it's width. Take advantage of this.

Planned features

The following features were planned (in order of priority), but were not implemented due to lack of time:

  1. Implement Pause
  2. Implement Lives and Scores
  3. Make mouse cursor invisible when in game window
  4. Implement powerups, powerdowns and score multipliers
  5. Implement level loading from text files (create your own levels!)

Known bugs

  1. The first time a sound effect is played, there is a short delay, perhaps due to the Audio System loading for the first time.

Other notes

References

Oracle's Documentation on Java

http://www.brackeen.com/javagamebook/

http://www3.ntu.edu.sg/home/ehchua/programming/java/J8c_PlayingSound.html

http://www.roseindia.net/java/example/java/awt/RanderingHintsGraphics.shtml

http://www.gamedev.net/page/resources/_/technical/general-programming/java-games-active-rendering-r2418

Credits

Graphics: Gautham Yerroju

Sounds: http://www.grsites.com/archive/sounds/

Special Thanks

  • NetBeans and Google, which drastically cut down the development time.
  • JSmooth, which was used to generate the exe wrapper.
  • Photoshop, which was used to make all the graphics.
  • Audacity, which was used to edit the sound files.