A simple two-player Pong game where players compete to keep the ball in play and score points. The main purpose of making this game is to enhance my skills further and to practice programming. I started this project from scratch to simulate the process of understanding the requested tasks to make a project.
- Basic classic Pong mechanics.
- Player vs Player mode.
- Basic UI for score display.
- Simple menu setting to change colors.
- Clone this repository to your local machine.
git clone 'https:\\github.com\MXD-K1\Ping-Pong-Game.git'
- Ensure Python is installed (Python version >= 3.6 is required).
You can verify your Python version with:python --version
- Install the required dependencies:
pip install pygame
- If you are not in code file write this into the terminal:
cd code
- Run the main script:
python main.py
- To move the first paddle use the keys w, s.
- To move the second paddle use the up and down arrow keys.
- To end a game use k. The reason is that it is far form the first player movement keys.
- Refactoring and simplifying the code
- Adding a basic AI to the game.
Contributions to this project are welcome and encouraged! Whether it's improving the code, fixing problems, suggesting new features, or sharing ideas, feel free to get involved.
This project is open-source and available under the MIT License. Feel free to use, modify, and distribute the code, provided proper attribution is given. For more information see the included license.
Big thanks to Clear Code for the video of making ping pong which helped me fix the problem of collision detection. In addition, the sounds are taken from that tutorial.
For any questions, issues, or feedback, don't hesitate to open an issue on GitHub or email me at [email protected].