Batch3-Group2 OOP CP

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 12

BRICK BREAKER

Game
in Java
OOP-COURSE PROJECT
End Sem-Review
Contents
● Introduction
● Architecture of the code.
● Output and Results.
● Future Scope.
● References.
Introduction
● This game is a popular game played by users worldwide in free time or for a
change from work.
● This game consists of a ball, a paddle and bricks.
● In this game, the player moves a paddle on the screen and bounces a ball and
saves it from passing beneath the paddle.
● The objective is to destroy bricks present at the top of the window.
● After successfully breaking all the bricks present, the user will win the game and
get popped up “You Won” with score displayed at top right else the game will be
over displaying “Game Over”.
● We have implemented the code in Java programming using Eclipse IDE.
● The game is visible on a Java Frame or

Window in which each component is present.


● A green coloured paddle is present to

deflect the ball.


● A yellow moving ball is present.
● A total 21 red bricks are present at top.
● Score is displayed at top right corner.
Architecture of the code

Main Game Play Map Generator

Importing packages Importing packages


Importing packages
In JFrame we have to Map Generator class
Main Class implement Actionlistener
and KeyListener This class for brick
Creating JFrame frame generation
Parameters for Constructor of
JFrame Map Generator class Functions for graphical
parameters
Creating Object for Functions for graphics
Gameplay class Constructor for
Implemet Methods for No. of rows & column
action and key listener To be generated.
● Creating a Main class with main method and objects of Frame and Gameplay,
and creating JFrame with proper parameters.
● Creating a class Gameplay and initialising variables bricks, score and timer and
this class will implement all the methods for running the game.
● Creating another class MapGenerator to generate a map for drawing bricks on
screen using ‘draw’ function and to detect intersection of ball and bricks.
Output and Results
● Once you break all the bricks on the screen you get a pop up “You Won!!!”
with the score at top right corner and we can restart by pressing Enter key.
● If we are unable to deflect the ball by controlling the paddle and ball passes
down the paddle then you lose with a pop up “Game Over!!!” and press Enter
to restart.
Future Scope
● The scope of work for Java developers is very broad as they perform tasks
from designing user interfaces to testing dynamic applications.
● Web-based games also use Java, in conjunction with Flash.
● Java is considered among the top high-performance language in the Industry
with large scale of demand.
● Its compatibility, versatility and scalability make Java the go-to language for
most programmers.
● GUI made up of graphical components (e.g., buttons, labels, windows) in
Java makes user easier to interact with the page or application.
References
● www.javatpoint.com
● P. Schliep, “Usability of Error Messages for Introductory Students,” Scholarly
Horizons: University of Minnesota, Morris Undergraduate Journal, vol. 2, no. 2
April 2015.
● www.geeksforgeeks.com
● . Korhonen and L Malmi, "Taxonomy of visual algorithm simulation exercises,"
in Proceedings of the Third Program Visualization Workshop. Warwick, UK, pp.
118-125, 2004.

You might also like