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

Uploaded Python 3

File details

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

File metadata

  • Download URL: dynamic_pong-1.0.8.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.8.tar.gz
Algorithm Hash digest
SHA256 039001d8db11229b7ae8f318cce10e49975dd5b548de2aa19cc7ea4278af27eb
MD5 96835d687a4a255d401df4e00acb3bbd
BLAKE2b-256 f47ea7bac3ff697ef218cdded3f6f0197f03f2d206b8e905d34b99df69a87c16

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: dynamic_pong-1.0.8-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.8-py3-none-any.whl
Algorithm Hash digest
SHA256 b15952e1ea24ec8dc98daa89c2bef1c403f6ff9c7e46e19d87976bc4466bc9c4
MD5 f02abb3806f76a996b76909021927d6f
BLAKE2b-256 1da9fe859dd6d9228b7f5a54d1581211d3182fbdc2f991254556297b8164d14b

See more details on using hashes here.

Provenance

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