1 Project Notes

After this lab, you should have plenty of background and resources to help you complete PA18 as well as the course project. Make sure that you alot enough time for these two assignments.

  • If you are still unclear about your game, discuss it with your TA. Make sure that it’s a 2D game that makes substantial use of gamebox and that you know the requirements in the project description. You can make many different games within these rules.
  • It’s a good idea to talk with the instructor or a TA about your game idea. You should have parts of the game working at that point.
  • There are still PA’s during the project time. Plan your time accordingly!

2 Mechanics for today’s Lab

You will be filling in missing code of a Pong game.

3 Pong

Today we are doing an example game in gamebox; specifically the classic game Pong. If you are unfamiliar with Pong, head over to http://www.ponggame.org/ to see what it’s all about.

We’ll play by a basic version of the rules:

  • There is a ball that bounces back and forth.
  • Move your paddle on your side of the screen to prevent it from getting past you.
  • If it gets past you, your opponent earns a point.
  • First player to 10 points wins.

After you’ve figured out how the game plays, copy the following files and code into a new Python file in the same directory as your gamebox.py file:

3.1 Finish pong.py

If you run the game as is, you should see what the game will look like, but nothing actually works. We have left comments in the pong.py file that describes the code you need to add to make the game work. Add some code, try it out, and keep going until you have a working Pong game!

3.2 Submission

Both partners should submit the same .py file named pong.py to Kytos (the submission system): https://kytos.cs.virginia.edu/cs1110/. Please put both partners’ ids in comments at the top of the file.