Help with physics in Pygame
Project description
This project is to help with creating physics with Pygame Knowledge of Pygame is still required
This package contains 2 modules: Collisions and Physics, you only need to worry about the physics module
init function: • This function is for creating the object. You can not use this package if you create your own Pygame rect object • Args- x of object, y of object, width, height, color, the window object that you would like the object to be placed on, velocity of object (Cannot be changed later on)
setDimensions function: • Args- windowWidth, windowHeight
move function: • Moves the object in the direction specified (up, down, left, right) • Args- velocity, direction
setGravity function: • Sets the gravity for the different axis • Args- x gravity, y gravity
keepInBounds function: • Keeps the object in the bounds of the screen (Called in the update function)
update function: • Updates all of the objects' gravity and does collision resolution • Args- A list of all of the objects
processCollisions functions: • Handles collision resolution • Args- A list of all of the objects
draw function: • Draws the object on the window specified in the init function
jump function: • Makes the object jump • Args- jump power, object_list (This can be left with a None value, it is not used
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file PygamePhysics-0.0.1.tar.gz.
File metadata
- Download URL: PygamePhysics-0.0.1.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/2.7.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33c452c0152d0b70b883f8c4c44cdc166fdd6837b6657e2300f5c89389fd0cc8
|
|
| MD5 |
1b1ba43f30b79479a2270c3d9a39f80c
|
|
| BLAKE2b-256 |
8e1e4f20470c33020e39b9834212e76ccefe8b234edb7cb3b576dbebe7e4d42b
|
File details
Details for the file PygamePhysics-0.0.1-py2-none-any.whl.
File metadata
- Download URL: PygamePhysics-0.0.1-py2-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/2.7.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10a7a1e9cc1260e676c95bbc6ca898bfd2e8d660d69552796f91bb0ef3e167d4
|
|
| MD5 |
1f1adf4f490665a80a49b13f2971334b
|
|
| BLAKE2b-256 |
02c8da7818a3589ef2b1c21c9264cbabab5965c641d6331c5d9d2d968bbb6b2d
|