Skip to content

Repository files navigation

🏓 Advanced Pong Game

A modern, feature-rich implementation of the classic Pong game using Python, Turtle graphics, and CustomTkinter. This isn't your basic Pong - it's a fully-featured game with AI difficulties, countdown systems, fullscreen support, and professional polish.

Python License Platform

✨ Features

🎮 Game Modes

  • PVP (Player vs Player): Challenge a friend locally
  • PVE (Player vs AI): Battle against 4 AI difficulty levels
    • EASY: Perfect for beginners
    • MEDIUM: Balanced challenge
    • HARD: For experienced players
    • EXPERT: Near-impossible AI opponent

🖥️ Modern Interface

  • CustomTkinter GUI: Professional dark-themed launcher
  • Fullscreen Mode: Automatic fullscreen with perfect scaling
  • Proportional Scaling: Game adapts to any screen resolution
  • Smooth Animations: Enhanced physics and collision detection

⏱️ Advanced Systems

  • 5-Second Startup Countdown: Get ready before the action starts
  • 3-2-1 Goal Countdown: Dramatic pause after each score
  • Pause Functionality: Space bar to pause/unpause anytime
  • Responsive Controls: Simultaneous input support for smooth gameplay

🚀 Quick Start

Prerequisites

  • Python 3.7 or higher
  • pip package manager

Installation

  1. Clone the repository

    git clone https://github.com/SauceSlinger/pong_Game.git
    cd pong_Game
  2. Install dependencies

    pip install customtkinter
  3. Launch the game

    python enhanced_launcher.py

🎯 Controls

PVP Mode (Player vs Player)

Player Up Down
Player 1 W S
Player 2

PVE Mode (Player vs AI)

  • Player Movement: W/S keys OR ↑/↓ arrow keys (your choice!)
  • Pause/Resume: Space bar

📁 Project Structure

pong_Game/
├── enhanced_launcher.py    # Modern CustomTkinter launcher
├── main.py                # Core game coordinator
├── screen_config.py       # Dynamic screen scaling system
├── game_board.py         # Game field and boundaries
├── ball.py               # Ball physics engine
├── player1.py            # Player 1 paddle (with AI)
├── player2.py            # Player 2 paddle (with AI)
├── scoreboard.py         # Score tracking and countdown display
├── tests/                # Test suite
├── LICENSE              # MIT License
└── README.md           # This file

🔧 Technical Highlights

Proportional Scaling System

  • Dynamic Resolution Support: Game perfectly scales to any screen size
  • Consistent Gameplay: Physics remain identical across all resolutions
  • Cross-Platform: Tested on Windows, macOS, and Linux

Enhanced Physics Engine

  • Smooth Ball Movement: 60 FPS with interpolated motion
  • Precise Collision Detection: Accurate paddle and wall interactions
  • Realistic Ball Behavior: Angle changes based on paddle hit location

AI System

  • Difficulty Progression: Four distinct AI personalities
  • Adaptive Behavior: AI adjusts reaction time and accuracy
  • Human-like Movement: Natural paddle positioning and timing

🧪 Testing

Run the comprehensive test suite:

# Test all systems
python test_enhanced_features.py

# Test scaling system
python test_proportional_scaling.py

# Test control responsiveness
python test_fixed_controls.py

# Test AI difficulties
python test_ball_improvements.py

🎮 Game Features

AI Difficulty Levels

  • EASY (🟢): Slow reaction, 50% accuracy, perfect for beginners
  • MEDIUM (🔵): Balanced AI with moderate speed and 75% accuracy
  • HARD (🟠): Fast AI with 85% accuracy and quick reactions
  • EXPERT (🔴): Near-perfect AI with 90% accuracy and instant reactions

Game Mechanics

  • Win Condition: First to 5 points wins
  • Ball Physics: Speed increases every 2 paddle bounces
  • Paddle Segments: 5-segment paddles for realistic deflection
  • Speed Reset: Ball resets to base speed after each goal

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

Development Setup

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • Built with Python's Turtle graphics library
  • Modern UI powered by CustomTkinter
  • Inspired by the classic Atari Pong

📸 Screenshots

Launch the game to see it in action! The modern interface and smooth gameplay speak for themselves.


Made with ❤️ by SauceSlinger

About

python pong video game reminiscent of the classic video game. if you play I hope you have fun

Resources

Contributing

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages