Pong Game Project
Version 1.0.0
A classic game of Pong implemented using the SDL2 library.
This project is a submission for the Udacity C++ Nanodegree program capstone project. No template code from Udacity was used.
Expected Behavior
Dependencies for Running Locally
- cmake >= 3.7
- make >= 4.1 (Linux, Mac), 3.81 (Windows)
- SDL2 >= 2.0
- All installation instructions can be found here
- Note that for Linux, an
apt
or apt-get
installation is preferred to building from source.
- SDL_Image >= 2.0
- All installation instructions can be found here. Download link can be found here is the official site.
- SDL_ttf >= 2.0
- Follow the same installation procedure as SDL_Image. Download link to library is here.
- gcc/g++ >= 5.4
Basic Build Instructions
- Clone this repo.
- Enter directory:
cd Pong-Game
- Make a build directory in the top level directory:
mkdir build && cd build
- Compile:
cmake .. && make
- Copy resources folder to executable folder
cp -r ../FP/Resources .
- Run it:
./PongByCan
Gameplay instructions
Player 1 controls : W/D
Player 2 controls : UP/DOWN
Press SPACE to start the game.
File Class Structure
Rubric points addressed
- The project demonstrates an understanding of C++ functions and control structures.
- The project uses Object Oriented Programming techniques.
- Classes use appropriate access specifiers for class members.
- Classes abstract implementation details from their interfaces.
- The project follows the Rule of 5.
- The project uses smart pointers instead of raw pointers.
- The project uses multithreading.
- A mutex or lock is used in the project.