Welcome to the Pong Game! This is a simple implementation of the classic Pong game using Pygame. Enjoy playing against a friend and see who can score the most points before the time runs out!
pip install -r .\requirements.txt
- Music: Background music that loops during the game.
- Score Tracking: Keep track of the scores for both players.
- Game Timer: The game ends after 2 minutes, and the winner is determined.
- Tie Condition: If the scores are tied when the time runs out, a "TIE" message is displayed.
- Welcome Screen: A welcome screen that prompts the player to start the game.
- Player 1: Use
W
to move up andS
to move down. - Player 2: Use the
Up
arrow key to move up and theDown
arrow key to move down.
-
Install Pygame: Make sure you have Python and Pygame installed. You can install Pygame using the following command:
pip install pygame
-
Run the Game: Save the game code to a file, e.g.,
pong_game.py
, and run it using Python:python pong_game.py
Here is a brief overview of the main parts of the game code:
- Initialization: Set up Pygame, the display, colors, and game variables.
- Welcome Screen: Displays a welcome message and waits for the player to start the game.
- Game Loop: The main game loop where the game logic is executed, including paddle movement, ball movement, collision detection, and score updating.
- Game Over and Tie Screens: Display messages when the game ends, either due to a time limit or a tie.
- Single Player Mode: Add an AI opponent for single-player gameplay.
- Power-ups: Introduce power-ups for more dynamic and interesting gameplay.
- Customization: Allow players to customize the game settings, such as the paddle size and ball speed.
This game was created using the Pygame library. Special thanks to the Pygame community for their excellent documentation and tutorials.
Enjoy the game!
This project is licensed under the MIT License - see the LICENSE file for details.
Developed by Halip26