SDL implementation of PONG
Simple DirectMedia Layer is a popular cross-platform software development library for C++ It has been used here to create a clone of the classic 70's arcade game, PONG.
The basic SDL, as well as SDL True Type Font libraries have been used.
MinGW(for Windows), gcc(for Linux)
Download the release here and run pong.exe .
Download the release here.
- Get the SDL developement libaries
Note : Skip this step if you already have the SDL2 development/runtime libraries
$ sudo apt install libsdl2-dev
$ sudo apt install libsdl2-ttf-dev
- Build it using any C++11 supporting compiler
$ g++ pong.cpp -std=c++11 -lSDL2 -lSDL2_ttf -o pong
- Run it
$ ./pong
You can change all the attributes of the paddles and the ball in the config.txt file.
There are two game modes : VS COMP and VS PLAYER
W and S to move
P1 : W and S
P2 : ↑ and ↓