Python binding for Nova Physics Engine
This binding aims to provide a Pythonic API while keeping everything as similar as to the original.
pip install nova
import nova
# Create the space
space = nova.Space()
# Create a body with box shape
body = nova.Rect(
nova.DYNAMIC, # Type of the body
nova.Vector2(0, 0) # Initial position of the body
0, # Initial rotation of the body
5, 5 # Width & height of the rect shape
)
# Add body to the space
space.add(body)
# Main loop
while True:
# Advance the simulation with the timestep of 60 times a second.
space.step(1 / 60)
- Python (3.8+)
- Nova Physics (Prebuilt in the PyPI release)
- Setuptools (Should be included by default)
MIT © Kadir Aksoy