CompSci 307
Fall 2021
Software Design and Implementation

Programming Exercise: Breakout

This exercise is intended to be a fun way to get you back into the flow of coding as well as introduce you to the course policies and expectations. It will not be explicitly graded but, instead, serve as a starting point for us to see your coding strengths and weaknesses (and how well you follow directions). Thus, you will get the most out of this assignment by putting in a good faith effort.

Submission

You will be provided a GIT repository, game_NETID, hosted in the course's Gitlab group to work on this project. All submissions for this course will be based on only the version of your files in the provided Gitlab repository by 3:07am ET in the morning on the day after that given on the course Calendar (so it is effectively a few extra hours grace time past midnight).

As your submission for this project, use GIT to add, commit, and push the following to your game_NETID repository:

Your code is expected to follow the course coding conventions and be reasonably commented (full Javadoc comments are encouraged but not required yet).

Specifications

Individually, write a Java program using OpenJFX that allows someone to play the game of Breakout, in which a ball bounces around the window and destroys blocks as it hits them.

Focus on the following functionality features:

Design Ideas

One goal of this exercise is to practice writing a program from scratch (which some of you may never have done!). While you are welcome to borrow code from the course examples or other OpenJFX tutorials (with attributions!), your game must be distinctly different from any given examples you find (i.e., create your own game, do not simply copy one). This exercise is your opportunity (again, perhaps for the first time) to think beyond the functionality — about how you want to organize a program and how to make your code readable.

To balance the game play between fun and challenge (and simply ensuring it is possible to win), you will need to be strategic about the many "magic" values in your game (e.g., ball's velocity, paddle size, and speed, block size, or score for each block). You will likely spend time experimenting with different values before choosing one. Think about how to clarify your choices for future programmers and make them reasonable to find and change.

Resources

Take time now to learn and practice with these tools which will be used throughout the semester: