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.7.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.7-py3-none-any.whl (23.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dynamic_pong-1.0.7.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.7.tar.gz
Algorithm Hash digest
SHA256 88b8088858cdbfa75fc17debdc8548581c6595f993fface6897d1427a37320a4
MD5 d3d94ffedaffa837a69e6c964c9f2ea1
BLAKE2b-256 d467c9ffced5021d962185536f6a88092bdb81eb0e278dfa7be9a2b2e59ad34a

See more details on using hashes here.

Provenance

The following attestation bundles were made for dynamic_pong-1.0.7.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.7-py3-none-any.whl.

File metadata

  • Download URL: dynamic_pong-1.0.7-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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 3790552c0812dca7e06a13c7b9e9fbc45dc3bcd73a09ac49ba37a2c196330e6d
MD5 f09c0f79db4d3fad5a41bf79d64940d9
BLAKE2b-256 0f1b6c429ed82d2a2464c00e19cf2c55b2a6ccafe97414684bbdd0b2fe5fdb11

See more details on using hashes here.

Provenance

The following attestation bundles were made for dynamic_pong-1.0.7-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