Skip to main content

Polygon collider library for Pygame

Project description

Pygame colliders will enhance your game or application to have more complex colliding system beyond standard Rect colliders in Pygame.

Despite the name colliders aren’t bound to Pygame and Pygame library is not prerequisite.

Documentation

Documentation is located at https://pygame-colliders.readthedocs.io/

Usage

Look how easy it is to use:

from pygame_colliders import ConcaveCollider, ConvexCollider

# Create colliders
collider_a_points = [(3, 3), (5, 3), (5, 4), (4, 4), (4, 5), (5, 5), (5, 6), (3, 6)]
collider_b_points = [(4.5, 3.5), (6, 2), (6, 4)]

collider_a = ConcaveCollider(poly_a_points)
collider_b = ConvexCollider(poly_b_points)

# Check collision
if collider_a.collide(collider_b):
    print("Collision detected!")

Features

Collisions between

Installation

Install pygame colliders by running:

pip install pygame-colliders

Contribute

Support

If you are having issues, please let us know. We have a Discord channel located at : https://discord.gg/VXVRPxe

License

The project is licensed under the 3-clause BSD license.

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

pygame-colliders-0.1.4.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

pygame_colliders-0.1.4-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file pygame-colliders-0.1.4.tar.gz.

File metadata

  • Download URL: pygame-colliders-0.1.4.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.3 CPython/3.9.0 Windows/10

File hashes

Hashes for pygame-colliders-0.1.4.tar.gz
Algorithm Hash digest
SHA256 e6eeb4a06775bfb2721c5e727b792504e638640347f8514538732d2aa79f15e6
MD5 df719656729a4ce44eb9629b60af5a2d
BLAKE2b-256 2f179bf33cdfc68092cd900b4613af2a0198014a28321957fee3728a37d19ec5

See more details on using hashes here.

File details

Details for the file pygame_colliders-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for pygame_colliders-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 5abbc85d1959c35a5f787ee881a455f0de07e0537a791d81142da0a32fe25deb
MD5 ad63746938305bdc06ad34cc5999fd1b
BLAKE2b-256 b17fb9abfe7f931a61cd5f4d9b7b350343998388d7704abe93d27b46cd4b2198

See more details on using hashes here.

Supported by

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