Welcome to the Pong Game! This is a classic arcade game implemented in Python using the Turtle graphics package. In this game, two players control paddles and try to hit a ball back and forth across the screen. The objective is to score points by making the ball pass the opponent's paddle.
- Two-player mode: Each player controls a paddle using keyboard inputs.
- Realistic ball movement and collision detection.
- Score tracking for both players.
- Simple and intuitive graphics using the Turtle package.
To run this game, you need to have Python installed on your system. Additionally, you need the Turtle package, which is included in the standard Python library.
-
Clone or download the repository to your local machine.
-
Open a terminal and navigate to the directory containing the game files.
-
Run the game by executing the following command:
python pong_game.py
-
Player 1 (Left Paddle)
- Move Up:
W
key - Move Down:
S
key
- Move Up:
-
Player 2 (Right Paddle)
- Move Up:
Up Arrow
key - Move Down:
Down Arrow
key
- Move Up:
- The objective of the game is to score points by hitting the ball past the opponent's paddle.
- The first player to reach a predetermined score wins the game.
The game consists of several main components:
pong_game.py
: The main script that initializes the game and runs the game loop.paddle.py
: Contains the Paddle class, responsible for creating and controlling the paddles.ball.py
: Contains the Ball class, responsible for creating the ball and handling its movement and collision detection.scoreboard.py
: Contains the Scoreboard class, responsible for displaying and updating the score.
If you would like to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes and commit them (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature-branch
). - Open a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
- This game was created using the Turtle graphics package, a standard Python library for creating graphics.
- Inspired by the original Pong game developed by Atari.
Enjoy playing the Pong Game! Feel free to report any issues or suggest enhancements.