This project is a copy of Pong made with C++ and SFML.
For educational purposes only
For building this project you're going to have:
- C++
- CMake version 3.16+
- SFML
- Create a folder called
build
and navigate to it - Run
cmake .. && make
- Then run
./Pong
- Window
- Draw Paddle's and Ball
- Move Paddle's
- Move Ball
- Keep ball bouncing within window
- Detect ball collision with Paddle's
- Detect collision with 'wall'
- Point system
- If ball hit right wall, player 1 scores. If ball hit left wall, payer 2 scores
- Write points to screen
- Restart game
- Adjust ball velocity using paddle velocity (if ball if going down and hits a paddle going up, make ball go up)
Feel free to download and play it.
When ready :)
Enjoy.