Skip to main content

Floating Hippo is a simple, abstracted, and easy to use library for 2D simulations using Pymunk and Pygames.

Project description

logo

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()

falling_balls_floating_hippo - Made with Clipchamp

Contributing 🤝

Contributions, issues and feature requests are welcome!

Show your support ⭐️

Give a ⭐️ if this project helped you!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

floating_hippo-0.0.10-py3-none-any.whl (5.2 kB view hashes)

Uploaded Python 3

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