Description

5/5 - (2 votes)

Create the well known Pong Game

 

  1. The Players should be Rectangles drawn using Element Buffer Objects. [3 marks]

 

  1. Draw the Ball using Triangle Fan. [3 marks]

 

  1. Add ability to move player with keyboard. [3 marks]

 

  1. Basic Score keeping (hitting the ball with paddle adds 1 to score, while missing the ball resets it). [3 marks]

 

  1. Basic Collision detection using AABB’s (ball can be approximated as a square with side equal to ball diameter. [3 marks]

 

  1. Draw Side Walls. [3 marks]

 

  1. [2 marks]

 

 

 

Instructions

 

  • Your final submission should look something like

 

  • Open up the accompanying project uploaded on google classroom. Running the project will show you a blank window with the Score widget. You just have to use the use showScore function in Game class to update and show score. Nothing else is required on GUI programming.

 

  • The Shaders required for this assignment are already included in the resources folder. They should be enough for this assignment, but in case you need to add your own shaders just add them to the resources folder and access them the way shaders sprite shader is loaded. Any other resource like textures should also be placed in the resources folder only.

 

  • You are free to create your own classes. To add them to project, modify the line 49 set(SOURCE files) in the Cmake File and reload the project.You can refer to links posted to know more about CMake.

 

  • A brief documentation is required. In this document you will be expected to explain your design choices, describe the algorithms and data structures that you have used, and attach screenshots of your program output.

 

 

 

 

Deliverables

 

  • C/C++ code (make sure to upload full Cmake Project.

 

  • 2~3 page PDF Report written with Latex/MS Word. Use the acmlarge option (single column) (see sample-acmlarge.tex if writing with Latex).

 

 

 

 

Total marks for this assignment: 20 marks

 

 

 

!1 of 2!

 

Bonus (bonus marks to a maximum of 5 will be awarded for the following features. This part is completely optional)

 

  • Add ability to make the game harder with time (ball becomes faster) [3 marks]

 

  • Ability to pause the game [1 mark]

 

  • Save high scores to a file [1 mark]

 

  • See the textures section on learnopengl.com and add textures to the table, player and ball [3 marks]

 

 

 

Note: Your code should be written by you and be easy to read. You are NOT permitted to use any code that is not written by you. (Any code provided by the TA can be used with proper credits within your program)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

!2 of 2!