Seperating physics simulation

I have an application where I must first do some physics simulation on it’s own (possibly multiple simulations each in it’s own thread) for some amount of time then in the end I just have to play one of those.



If I extends SimpleApplication I can’t use only physics right?



How should I get started with this?

You can simply step the PhysicsSpace yourself, the bullet api is more or less 1:1 available through the jme api, so its mostly like using plain bullet.

I found another simpler option. I do my stuff in class that extends SimpleApplication and implements Runnable. I make it run in headless mode then start it in seperated thread. I get no jme dialog and it doesnt stop when it’s out of focus.



Is this a good approach? I know it’s not the best but I think it’s the simplest one.

I don’t think thats easy if you just want to use bullet but w/e.

I dont need to use just bullet actually. That was my first assupmtion. I’m actually fine with this, I just have to run multiple physics simulations at the same time (in threads). But if I did this extending SimpleApplication I would get first that first popup window and I the windows didn’t have focus they would pause.



But…



It would be better to to just the physics simulation without visualization yes. I’m gonna go with the easier one now and if I have time left consider doint the right one later. :slight_smile: