GithubHelp home page GithubHelp logo

soft-physics-engine's Introduction

Soft Physics Engine

![alt text] (https://raw.githubusercontent.com/exigow/soft-physics-engine/master/screenshots/logo.png "Soft Physics Engine logo")

A simple 2D soft physics engine fully written in Java.

Design goal

The main goal is to provide easy-to-use, feature-rich physics engine completely written in Java, where each model can be parametrized on-the-fly during simulation by simply assigning the new value of the field. It is as simple as it sounds.

Demos

Library contains several usage examples in an interesting way, or showing some feature.

Demos are interactive. You can grab every particle using left mouse button on desktop. Multi-touch has been tested on mobile devices too.

Dependencies

  • [libGDX] (https://github.com/libgdx/libgdx) - cross-platform Java game development framework

    Used only to show demos including window creation, particles/joints rendering, texturing, mouse gripping, etc. This part can be easily converted into something else like Slick2d or raw LWJGL.

  • [JOML] (https://github.com/JOML-CI/JOML) - Java math library for OpenGL rendering calculations

    Responsible for engine's math. This library is fast, GC-friendly and produces clean code (this is the reason why I do not use the built-in math with libGDX, which is fast ofc, but not readable).

Future

Things to do:

  • parts of the world are just mutable DTO's (data transfer objects), created using static inner classes (builders or smth) to achieve major design goal (still wip)
  • add minimal sample to README.md
  • collisions (to debate)
  • fixed constant length joint (temporarily it can be achieved with 'hard spring' but may cause some glitches)
  • vector calculations on primitive types, losing code readability :( (or find another way to improve the performance of the GC)
  • particle weight

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.