In the classic game of Pong, there are two players competing against each other. Player 1 controls their paddle using the keys W (up) and S (down), while player 2 uses the keys O (up) and L (down). The objective of the game is to hit the ball with the paddle and prevent it from reaching the opposite end of the screen. The player who scores a point gets to serve the ball, and the game continues until one player reaches the score of 10 points.
Before running the game, you need to have Pygame installed in your Python environment. To install it, execute the following command in the terminal:
pip install pygame
Once Pygame is installed, simply execute the AlonePong.py
file in your terminal using the command:
python3.9 pong.py
Some features of this classic game include:
- Multiplayer mode with two players;
- Paddles are controlled by the keys W and S for player 1, and O and L for player 2;
- The player who scores a point serves the ball, adding an additional challenge to the gameplay;
- The game ends as soon as one player reaches a score of 10 points;
- Classic, simple, and recognizable graphics.
This project was developed for learning and improving Python and Pygame skills. However, contributions are always welcome! If you encounter any issues in the code or have suggestions for improvements, feel free to open an issue or send a pull request.
This project is released under the MIT license. See the LICENSE file for more details.