Skip to main content

Dynamic Pong: A Python-based modern twist on classic Pong

Project description

Dynamic Pong

Dynamic Pong is a modern rendition of the classic arcade game Pong, crafted with Python using the Pygame library. It offers an engaging and interactive gaming experience, featuring responsive paddle controls and dynamic game speed adjustments. This project is an excellent showcase of Python programming skills, game design, and software development principles.

Features

  • Adaptive Gameplay: The game's difficulty increases as you progress, offering a challenging and engaging experience.
  • Collision Detection: Implements collision logic for paddles and game boundaries.
  • Score Tracking: Real-time score display for both the player and the computer-controlled opponent.
  • Customizability: Adjustable game window size and element proportions to fit various screens.

Installation

To install and play Dynamic Pong, follow these simple steps:

  1. Open a terminal or command prompt.
  2. Run the command:
    pip install dynamic_pong
    
  3. Wait for the installation to complete.

How to Play

  1. After installation, run the command:
    dynamic_pong
    
  2. Control the left paddle using the Up and Down arrow keys or the W and S keys.
  3. The game continues indefinitely until manually exited.

Code Examples

# Creating a block representing a paddle
block = Block("white", 20, 100, 50, 300)
# Initializing a player paddle
player = Player("white", 20, 140, 5)
# Handling a ball collision with the top edge of the screen
ball = Ball("white", 30, 30, paddle_group)
ball.rect.top = -5
ball.speed_y = -5
ball.collisions()

Contributing

Contributions to Dynamic Pong are welcome! If you have suggestions for improvements or encounter any issues, please feel free to open an issue or submit a pull request.

License

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

About the Author

Adamya Singh - Software developer with a passion for machine learning and functional programming. Feel free to connect with me on LinkedIn.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dynamic_pong-1.0.4.tar.gz (23.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dynamic_pong-1.0.4-py3-none-any.whl (23.1 kB view details)

Uploaded Python 3

File details

Details for the file dynamic_pong-1.0.4.tar.gz.

File metadata

  • Download URL: dynamic_pong-1.0.4.tar.gz
  • Upload date:
  • Size: 23.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for dynamic_pong-1.0.4.tar.gz
Algorithm Hash digest
SHA256 538a4f50709e5387a7ac8ba651be4aefaf615e8080b94e3614762927328f3a66
MD5 4ba0f0413685fdf9945889f628f614f6
BLAKE2b-256 a606345abde4ea50e8870159d9b09701bee374425bab7979cac571fbc86597fc

See more details on using hashes here.

Provenance

The following attestation bundles were made for dynamic_pong-1.0.4.tar.gz:

Publisher: publish-to-pypi.yml on adamya-singh/dynamic_pong

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dynamic_pong-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: dynamic_pong-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 23.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for dynamic_pong-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 688c26ed9b964be706277622a10fa4d39956eee40a443384f46b56c5ff2c1d81
MD5 bd9baabd947f8e2753da814d023d0cf6
BLAKE2b-256 498104bbe98bc726fa23ca64c15e9eefba09d5d7d6ce0c6b2babd2e5ae5157db

See more details on using hashes here.

Provenance

The following attestation bundles were made for dynamic_pong-1.0.4-py3-none-any.whl:

Publisher: publish-to-pypi.yml on adamya-singh/dynamic_pong

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page