0% found this document useful (0 votes)
36 views3 pages

Assignment-1, Pong

The document describes an assignment to develop the classic Pong game in Java. Students must implement gameplay mechanics like paddles, balls, scoring, and menus to start, restart, and quit the game. Functionality like special balls that modify paddle size and gameplay speed options are also required. The assignment will be evaluated based on implementation of required features and overall presentation quality.

Uploaded by

filiposka04
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views3 pages

Assignment-1, Pong

The document describes an assignment to develop the classic Pong game in Java. Students must implement gameplay mechanics like paddles, balls, scoring, and menus to start, restart, and quit the game. Functionality like special balls that modify paddle size and gameplay speed options are also required. The assignment will be evaluated based on implementation of required features and overall presentation quality.

Uploaded by

filiposka04
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

COMP 2800

Software Development
Winter 2024
ASSIGNMENT-1
SCHOOL OF COMPUTER SCIENCE TOTAL MARKS: 20
DEADLINE: FEB 29
LAND ACKNOWLEDGEMENT
The School of Computer Science at the University of Windsor sits on the Traditional Territory of the Three Fires Confederacy
of First Nations. We acknowledge that this is the beginning of our journey to understanding the Significance of the history of
the Peoples of the Ojibway, the Odawa, and the Pottawatomie.

Description
In this assignment, you need to develop a game, called Pong, using Java Swing and Java 2d APIs
you learned in the classes. Pong is a table-tennis themed two-player arcade game. Each player
controls a paddle (there are two paddles) and the paddle is used to hit a ball to the opponent. If a
player misses the ball, the other player gets a point. The player who gains 10 points wins the
game. You can play a free version of the game on this website: https://www.ponggame.org/.
More information about the game can be found here: https://en.wikipedia.org/wiki/Pong

Figure: Pong (collected from https://www.ponggame.org)

Required Functionalities
• The game needs to be played by two persons. There should be two paddles. One paddle
should be controlled by W (Up) and S (Down). Other paddle should be controlled by up
and down arrow keys.
• At the beginning of the game, the ball should be in the middle and can travel in any
direction at a reasonable speed. The speed can be set by the players.
• If the ball hits a wall, it should be bounce off the wall at the same speed. The same happens
if the ball hits a paddle. It is up to you how you want to determine the angle of the bounce
off (i.e., at which direction and angle you want to reflect the ball). I suggest you play the
game to finalize your decision. You can consider the location of the paddle where the
intersection with the ball occurs and the angle of incidence to determine the angle of
reflection. You can also consider the speed of the paddle to determine the speed of
reflection but this is not required. We assume a constant speed for the ball.
• A sound should be played when the ball hits by a paddle or by the wall. A simple approach
would be playing the beep sound.
• At certain interval, the game throws a special kind of balls in both directions (either blue
or red in color). They will not be reflected, instead consume when hit by a paddle. If a
player consumes a blue ball, the paddle size will be increased by a small amount.
Consuming the red ball will decrease the size of the paddle. There should be a minimum
and maximum length of the paddle (make a reasonable decision). Be creative when
implementing this functionality.
• The game should display the current scores of both players. The game starts with the initial
score of zero. When a player obtains 10 points (i.e., wins the game), the game should show
the winner with the final score.
• You should provide options to start, restart and quite the game. Use menu(s) for this
purpose.

Implementation Related Requirements


• Use Java Swing APIs and Java 2d APIs to implement the game. You can use other
libraries, if needed.
• Use menu and menu items so that player(s) can set the speed (consider three different
speed options: slow, normal, fast) and start/restart/quit the game.
• Use a JFrame to hold all the required components including the game board. Use a JPanel
to represent the game board.
• You can use basic shapes to represent the paddles and boards. You can also use
images/sprites to represent them. No additional marks will be added or deleted for this
selection. However, you can obtain marks for good presentation.

Marking Scheme
• Add a menu/menu item(s) to start/restart/quit the game and the menu is functional .
(0.5+2 = 2.5 Marks)
• Add a menu/menu item(s) to set the speed of the game and the menu is functional.
(0.5+2 = 2.5 Marks)
• Implement the paddles and players can control the paddles (1+1 = 2 Marks).
• The balls behave as expected (i.e., start from the middle, reflects by wall or paddles at an
angle) (5 Marks)
• Implement the feature involving special balls (red and blue color) (4 Marks)
• The game update/show scores of both players and determine the winner (1 Marks).
• The game is playable, and the quality of the presentation is good (3 Marks).

Submission
• Complete your implementation.
• Upload the program on the course website. For each assignment, you will find a folder
(Assignment-X, X represents the assignment number) in the assignment section of the
website.
• If you have only one Java file to submit, upload only that file. If you have created
multiple files, compress the project folder (zip compression) you created and upload the
zip file.
• Rename the file/folder as follows: LastName_FirstName_A_LabExerciseNumber
(Example: Asaduzzaman_Muhammad_A_1.Java or
Asaduzzaman_Muhammad_A_1.zip).
• Include a plain text file with explanations (such as note.txt) if there are any additional
requirements to run your program.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy