Skip to content

A clone of the simple brick-breaking arcade game by Atari

License

Notifications You must be signed in to change notification settings

elailai94/Breakout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 

Repository files navigation

Breakout

About

Breakout is a simple 2D video game, originally published by Atari in 1976. It is written entirely in C++. The graphical component of the game is implemented using the X11 library. In the game, a layer of bricks lines the top third of the screen. A ball travels across the screen, bouncing off the top and side walls of the screen. When a brick is hit, the ball bounces away and the brick is destroyed. The player loses a turn when the ball touches the bottom of the screen. To prevent this from happening, the player has a movable paddle to bounce the ball upward, keeping it in play.

Screenshots

Splash Screen

Breakout!_Screenshot1

Gameplay Screen

Breakout!_Screenshot2

Compilation

make

Clean Build

make clean

Execution

./breakout

Note: The compilation and execution step can be combined into a single step by running: make run.

Usage

Command-Line Options

  • -frame-rate n is measured in frames per second and controls how often the screen is painted or redrawn. The default frame rate is 30 frames per second.
  • -speed n is measured in pixels per second and controls how fast the ball moves. The default speed is 3.5 pixels per second.

Game Controls

The game can be played using a mouse or a keyboard. At any point in the game, you can switch between the two.

Mouse Controls
  • move left to move the paddle left
  • move right to move the paddle right
  • click to release the ball from the paddle
Keyboard Controls
  • A to move the paddle left
  • D to move the paddle right
  • Space Bar to release the ball from the paddle
  • Escape to quit the game

Bonus Features

There are two other special types of bricks in addition to the normal bricks (represented by a rectangle with a solid colour fill). The first type of special brick is "elongate" brick (represented by an outline of a rectangle with a smaller black rectangle in it), which makes the paddle twice as long when They are hit by the ball. The second type of special brick is "shorten" brick (represented by a rectangle with a strip of white in the centre of it), which make the ball speed slower by 0.2 pixels per second. However, the "elongate" brick will not make the paddle longer than a third of the screen width. Similarly, the "shorten" brick will not slow the ball slower than 3 pixels per second. There is a 1/50 chance that a "elongate" brick or a "shorten" brick is on the screen.

Known Issues

  • X11 library has memory leaks.

License

Breakout is licensed under the MIT license.

About

A clone of the simple brick-breaking arcade game by Atari

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published