This repository contains my project on a classic Ping Pong game made on C++. This is my first C++ project and I have tried my best to simulate the game.
Ping Pong happens to be a very popular video game since the dawn of video games.
This game takes a console input/output based approach on displaying objects and controlling the game.
- Clone the repository and open the directory
- Run main.exe
- I Key - to move right blade up.
- K Key - to move right blade down.
- W Key - to move left blade down.
- S Key - to move left blade down.
- main.cpp - contains the source code (thoroughly explained through comments)
- main.o - object code
- main.exe - executable file for game
- iostream - for outputting to screen (cout).
- conio.h - for listening for keys pressed.
- ctime - for generating random number seed.
- cstdlib - for generating random numbers.
- Ball - to store position of ball.
- Blade - to store position of blades.
- Game - to display the ball and blade and implement the logic.
- int main() - main activity handler - to run the game loops.
This project taught me many basic coding skill. The biggest challenge with the project was to make the ball move. This part of code required lot of efforts figuring out the geometry of grid.
Here's a snapshot of the game:
Thank You. :)