iamBijoyKar / floating_hippo

A simple 2D simulation library using Pymunk and Pygames

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

logo

Floating Hippo

Floating Hippo is a simple, abstracted, and easy to use library for 2D simulations using Pymunk and Pygames. This is designed to make it easier to create simulations without worrying about the complexity of Pymunk and Pygames. Is is a good starting point for beginners who want to learn about physics simulations.

Note: This library is still in development and is not ready for use. We are looking for contributors to help us finish this project πŸ™‚

Features πŸš€

  • Simple: Floating Hippo is designed to be simple and easy to use.
  • Abstracted: Floating Hippo abstracts the complexity of Pymunk and Pygames to make it easier to create simulations.
  • Customizable: Floating Hippo allows you to customize the simulation as per your needs.
  • Event Handling: Floating Hippo provides an event handling system to handle events like mouse clicks, key presses, etc.
  • Built-in Shapes: Floating Hippo provides built-in shapes like circle, segment, and polygon to create the simulation.

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

# Create a simulation
simulation = Simulation(800,600,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)

falling_balls_floating_hippo - Made with Clipchamp

License πŸ“œ

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing 🀝

Contributions, issues and feature requests are welcome! Feel free to check issues page.

Show your support ⭐️

Give a ⭐️ if this project helped you!

About

A simple 2D simulation library using Pymunk and Pygames

License:MIT License


Languages

Language:Python 100.0%