taskwrite a bouncing ball video game the balls


Task

Write a bouncing ball video game. The balls bounces within the screen where the two horizontal walls are fixed. The two vertical walls are bounded by the two paddles. Each paddle is a third of the height of the screen. The user presses keys to move the paddles up and down. Your task is to control the two paddles to keep the ball bouncing within the screen to simulate two players playing the ball. The game stops when one player wins or when the time is up. A player wins if the ball bounces out from the other player's side.

Requirements

1. Initially, the ball is placed at the center of the screen. The ball starts moving with a steady speed when the user presses a key. See Figure 1 for a screenshot.

                                            2171_terminal.png

                                                          Figure 1: Game Screenshot

When the ball hits a wall it should bounce off it.

2. You may reference bounce2d.c and associated code from your text book or write your own using the techniques and functions covered in previous lecture.

3. You may assign any key combination to move the paddles, but each paddle must be able to be moved independently.

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: taskwrite a bouncing ball video game the balls
Reference No:- TGS0443322

Expected delivery within 24 Hours