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.
- cmake >= 3.7
- All OSes: click here for installation instructions
- make >= 4.1 (Linux, Mac), 3.81 (Windows)
- Linux: make is installed by default on most Linux distros
- Mac: install Xcode command line tools to get make
- Windows: Click here for installation instructions
- SDL2 >= 2.0
- All installation instructions can be found here
- Note that for Linux, an
apt
orapt-get
installation is preferred to building from source.
- SDL_Image >= 2.0
- SDL_ttf >= 2.0
- Follow the same installation procedure as SDL_Image. Download link to library is here.
- gcc/g++ >= 5.4
- Linux: gcc / g++ is installed by default on most Linux distros
- Mac: same deal as make - install Xcode command line tools
- Windows: recommend using MinGW
- 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
Player 1 controls : W/D Player 2 controls : UP/DOWN Press SPACE to start the game.
- The project demonstrates an understanding of C++ functions and control structures.
- Game.cpp, line 267
- The project uses Object Oriented Programming techniques.
- GameObjects.h
- Classes use appropriate access specifiers for class members.
- GameObjects.h
- Classes abstract implementation details from their interfaces.
- Game.h
- The project follows the Rule of 5.
- GameObjects.h line 36-40
- The project uses smart pointers instead of raw pointers.
- Game.h line 46-48
- The project uses multithreading.
- Timer.cpp line 34
- A mutex or lock is used in the project.
- Timer.cpp line 20