Hello all. I have been looking into the jme physics 2 and followed a few tutorials about it. All in all I really like the capabilities it has and it would save me a lot of time to just use it.
However while testing the tutorials nr 4, 5 and 6 I noticed that after a few forces are applied to the object in question the fps drops drammatically, so much that it should be expressed in spf instead.
I know physics can be a bit heavy, but this was just a ball on a box (or an icecube on a box, tried that as well), if this is normal at this point what is going to happen when I have a hundred or so vehicles shooting and bumping into each other while trying to follow a certain behavior?
I know the problem is not my hardware as I have just upgraded it. I'd not be surprised however if I did something wrong (even though I don't know what could go wrong when copy-pasting). Especially since this only occurs after forces left and right have been applied for a while, in the beginning the fps is just fine.
So what I'd like to know is whether it's a good idea to use physics or whether it will slow down the game too much?
What I need physics for is about the following:
- collision on faces (with separated low-polygon collision meshes ofc)
- Make sure fast moving object (or slow moving object under high interpolation values on update calls) don't avoid collision by being "setLocalTranslation"-ed farther away than what would have been the point of collision
- things bouncing off one another (cannon bullets bouncing off heavy armored, well, whatever and collision between characters/vehicles)
- gravity (ok this is an easy one)
- the use of force, weight (for blunt damage, correct bouncing etc) and (air)friction (mainly not to make objects go at speed infinity with a given force) (this also doesn't seem hard to implement)
Also, further in development I'd like to use some sort of ragdoll for character animation were animations are not hardcoded but created by some form of physics implementation (were recoil etc affect the model depending on the force of the blast). I have no idea how this would be done yet as I haven't even worked with bone animations but ASAICT it seems jme physics has some usefull functions to that end as well.
The first two points are the most important as I have an idea on how to handle the rest.
Thanks in advance for your suggestions.