Git Product home page Git Product logo

floating_hippo's Introduction

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!

floating_hippo's People

Contributors

iambijoykar avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.