Skip to content

A simple Java-based Breakout game built in 2020 as my first hands-on programming project during university. Features pause, scoring, and brick rows.

Notifications You must be signed in to change notification settings

vickshan001/Breakout-CI401-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿงฑ Breakout Game โ€“ Java Application

A simple Breakout game developed as part of the CI401 module coursework during my first year at university (2020). This was my first hands-on experience with Java, where I learned the basics of object-oriented programming and graphical user interface development. The game allows players to bounce a ball using a paddle to break rows of bricks, complete with scoring and pause/resume functionality.


๐ŸŽฎ Description & Aims

This project is a classic Breakout game where the player:

  • Controls a bat (paddle) to keep the ball in play.
  • Aims to destroy all bricks by bouncing the ball.
  • Gains points for each brick destroyed.

Initial game state included a working scoreboard, bat, and ball. Enhancements aimed to:

  • โœ… Add rows of bricks
  • โœ… Fix bat from moving outside the window
  • โœ… Add Pause and Resume functionality

โœจ Features

๐Ÿ”ท Add Rows of Bricks

  • Dynamically generated bricks using nested loops for rows and columns.
  • Each row is assigned a different color for better visual clarity using a predefined color array.

โธ๏ธ Add Pause and Resume Function

  • Implemented keyboard controls:
    • P โ†’ Pause
    • C โ†’ Continue
  • Ball and bat motion are controlled by setting their movement units to 0 during pause.

๐Ÿšซ Prevent Bat From Leaving the Window

  • Added if condition to constrain bat movement within screen borders.
  • Movement direction and bat position are checked and adjusted accordingly.

๐Ÿ›  Technologies Used

  • Java
  • Java Swing (GUI)
  • MVC Architecture
  • Object-Oriented Programming principles

๐ŸŽฏ How to Play

  1. Run the application.
  2. Use arrow keys (or specified controls) to move the bat.
  3. Hit the ball to break the bricks.
  4. Press P to pause and C to continue.
  5. Prevent the ball from falling and try to clear all bricks!

๐Ÿ‘จโ€๐Ÿ’ป Developed By

Vickshan Vicknakumaran
University of Brighton
First-year university project (2020)


About

A simple Java-based Breakout game built in 2020 as my first hands-on programming project during university. Features pause, scoring, and brick rows.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published