Assignment 0: “Pong, The AI Update”

Objectives

Getting Started

git and GitHub

First of all, welcome to GD50!

If you don’t already have a GitHub account, head over to https://github.com/join and create an account. You’ll use this account throughout the course to work on assignments, submit your work, and receive feedback.

You’ll also need to make sure you have git installed on your computer. Go to GitHub’s instructions for setting up and configuring git on your machine, and follow the steps there to install git (if you didn’t already have it installed) and configure git with your GitHub username and email address.

Source Code

To grab the source code for Assignment 0, do head here to fetch the ZIP or the clone link; optionally, you can also run git clone https://github.com/games50/assignment0.git once you have git configured per the above instructions!

It’s Game Time

Your first assignment in the course will be a fairly easy one, since the dive into game programming can be deep enough as it is without having to implement an entire code base from scratch! Instead, we’ll take the Pong example we covered in class and extend it in a small but fun way by giving one of the paddles (or perhaps both) logic for playing the game so that you don’t always need a buddy to play the game with you! We’ll approach problem sets in the course this way generally, taking the full code bases we’ve used in lecture and extending them so that you’ll get plenty of experience interacting with fully implemented games. You can even use these projects as templates and jumping boards for your own games!

Of course, the code won’t run if you don’t have LÖVE2D installed, so we’ll have to tackle that in addition to grabbing the code; choose whichever distribution is appropriate for your system here, but make sure to grab version 0.10.2, which the class uses.

For further information on how to actually run games, do just visit the following page:

https://love2d.org/wiki/Getting_Started

Once the code and LÖVE2D have been downloaded and installed, the actual change you’ll be making to the code base is small, but it will require you to understand what many of the pieces do, so be sure to watch Lecture 0 and read through the code so you have a firm understanding of how it works before diving in! In particular, take note of how paddle movement works, reading both the Paddle class as well as the code in main.lua that actually drives the movement, located in the update function (currently done using keyboard input for each). If our agent’s goal is just to deflect the ball back toward the player, what needs to drive its movement?

Your goal:

How to Submit

Step 1 of 1

Fill out this form!

Congratulations! You’ve completed Assignment 0.