I saw several users asking for a 2D physics engine for jME so I started to integrate jBox2d into jME a couple of weeks ago. I have never use jBox2d before but It looks no so hard and a lot of fun also. I will add more details about the implementation later.
There is a lot of work to do but a would like to share some videos
@t0neg0d said:
Might I make the suggestion that before you get too far with this, you switch to Dyn4j?
jBox2D is riddled with issues.
:-o , ok. Thanks for the suggestion. I researched about most popular 2d physics engine for java and I found jBox2d and Dyn4j. I choose jBox2D wiouth any good reason I have to say. I will take your suggestion into account, thanks
Updated:About last tense: I meant, I will think about your suggestion and I will decide if I move to Dyn4j and abandon jBox2d or just finished a basic implementation for jBox2d and move to Dyn4j.
+1 for dyn4j - I’ve been using it (not-jME), it’s really solid. One thing that is particularly nice is that William (author of dyn4j) recently made some changes to the Decomposer utility classes for breaking a convex polygon into triangles which is rather nice for rendering
Nice ! i’d really like to see these things on JME engine like also @t0neg0d are doing . I didn’t know about the existence of Dyn4j but as @erlend_sh said the fact that is written pure in java is a good point . Did you know about liquidfun , yes is a box2d fork but the particle and softbodies features are really cool!
pretty cool, also keep in mind that Bullet has 2D support as well, which we will get for free once we move to Native Bullet completely. Whether it’s close in performance to a full 2D engine, I’m not sure
@wezrule said:
pretty cool, also keep in mind that Bullet has 2D support as well, which we will get for free once we move to Native Bullet completely. Whether it's close in performance to a full 2D engine, I'm not sure
According what I have read so far, using a 3D physics engine for 2d Physics calculations is a bad idea for performance point of view (and it sounds logical). I’m not familiar with Bullet, so I don’t know if Bullet has some optimizations for 2D calculations.
@relucri said:
Nice ! i'd really like to see these things on JME engine like also @t0neg0d are doing . I didn't know about the existence of Dyn4j but as @erlend_sh said the fact that is written pure in java is a good point . Did you know about liquidfun , yes is a box2d fork but the particle and softbodies features are really cool! :)
I didn't know about liquidfun, thanks. I will take a look. jBox2d and Dyn4j are for simulation rigid bodies. I prefer to star with one of those two first making a very basic integration (an appstate, a class to handle the physics world interactions with mesh and a few controlers). Keep it simple let say, then add more funtionality.
I appreciate all your suggestions and ideas. Thanks
@H said:
I didn’t know about liquidfun, thanks. I will take a look. jBox2d and Dyn4j are for simulation rigid bodies.
Yes but , since liquidfun is a box 2d fork, it can also handle rigid body simulation . Look this video . Finally I agree with you, a simple implementation is good by now.