Floating Hippo is a simple, abstracted, and easy to use library for 2D simulations using Pymunk and Pygames.
Project description
Floating Hippo
Floating Hippo is a simple, abstracted, and easy to use library for 2D simulations using Pymunk and Pygames.
Note: This library is still in development and is not ready for use. We are looking for contributors to help us finish this project 🙂
Installation 🪄
pip install floating-hippo
Usage 📖
Simple example of a simulation dropping balls on a |_| shaped platform on mouse click using Floating Hippo.
Code 👇
from floating_hippo import Simulation
# Width and Height of the window
WIDTH,HEIGHT = 800,600
# Create a simulation
simulation = Simulation(WIDTH,HEIGHT,caption="Test",gravity=(0,1000))
# Create a segment shape like |_|
simulation.create_segment((100,100),(100,500))
simulation.create_segment((100,500),(600,500))
simulation.create_segment((600,500),(600,100))
@simulation.events.add_event("mousebuttondown")
def on_click(event,*args,**kwargs):
simulation.create_ball(event.pos)
if __name__ == "__main__":
simulation.run()
Contributing 🤝
Contributions, issues and feature requests are welcome!
Show your support ⭐️
Give a ⭐️ if this project helped you!
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 Distributions
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 floating_hippo-0.0.10-py3-none-any.whl.
File metadata
- Download URL: floating_hippo-0.0.10-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3db4d965900ffccaff4a7b555330979aa20c32b5b35737c36a08c7edeaf09a39
|
|
| MD5 |
5555b90af3468fa497cdec26c31c9fd4
|
|
| BLAKE2b-256 |
948671c7b84c0fbbd0cd5d77ebfd4e1d9261791acae8403c2c6fcac2ef285002
|