This is a simple two-player Ping Pong game developed in Python using the turtle graphics library.
-
Two paddles controlled by players.
-
A ball that bounces off walls and paddles.
-
Score tracking for both players.
-
Left Paddle (Player 1):
-
Move Up:
Wkey -
Move Down:
Skey
-
-
Right Paddle (Player 2):
-
Move Up:
Up Arrowkey -
Move Down:
Down Arrowkey
-
-
The goal is to hit the ball past your opponent's paddle.
-
If the ball goes off the screen on your opponent's side, you score a point.
-
The first player to reach a certain score (not implemented in this version, but can be added) wins.
You need Python installed on your system. The turtle module is part of the Python standard library, so no additional installations are typically required.
-
Save the file: Save the provided Python code as
ping_pong.pyin a directory of your choice. -
Open a terminal/command prompt: Navigate to the directory where you saved the file.
-
Run the script: Execute the following command:
python ping_pong.pyA new window will open with the game running.
Feel free to fork this repository, make improvements, and submit pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.