More then one SimpleApplication / Headless Mode

Hey guys, :slight_smile:
I read that you should not create more than one SimpleApplication in the same process (because of something OpenGL related If I remember right).
Is this still a problem if one of two SimpleApplications runs in Headless mode (No output)? This would make things easier for me since I could use appstates etc., but of course it wouldn’t be a very clean solution.

Just wondering,
destro :slight_smile:

Why do you need more than one? That part wasn’t really specified.

I have something like a masterserver which starts several ingame servers on his own. I thought it would be handy to have each of this ingame servers as a headless application since it comes with a loop, the app state mechanism and so on.
Of course, this can be programmed relatively easy and fast without dependancies to jme, I was just wondering if it would be possible. :slight_smile:

Well headless uses no grafic, so that part should not make problems.

@destroflyer said: I have something like a masterserver which starts several ingame servers on his own. I thought it would be handy to have each of this ingame servers as a headless application since it comes with a loop, the app state mechanism and so on. Of course, this can be programmed relatively easy and fast without dependancies to jme, I was just wondering if it would be possible. :)

So you’d be using multiple application instances essentially just to run an AppStateManager at regular intervals?

I know people do this but I’ve never personally understood the charm.

Of course, this can be programmed relatively easy and fast without dependancies to jme, I was just wondering if it would be possible. :)
I just want to know if the reason why one shouldn't create more than one application is renderer-related. I'm still thinking which way to go and if the only reason will be the app states, I will propably write something on my own. But I still don't know what is acceptable in the jme design and what is not.

btw you can just create your own app state manager. if thats all you need you might want to look in to that.

Of course, this can be programmed relatively easy and fast without dependancies to jme, I was just wondering if it would be possible.
I was just wondering if it would be possible.

… As I said, I will most likely program some thingy on my own, I just wanted to know if running more than one app in headless is possible or not. (@pspeed Do you understand now, why I didn’t put too much details in the first post? :D)

I think it’s supposed to be possible. I don’t know if it is because I don’t know how many people (if any) do it successfully. I guess beyond demos, most people probably roll their own or just use Runnables in an executor since 95% of what’s in application isn’t needed for a scene-graphless back end.

I have a really light weight service management thing I created for Mythruna. Just a handful of classes (4 I think) and supports J2EE-style standard dependency injection. For my game loop, I just grab every service that implements a GameLoopListener, cache and iterate. I could be persuaded to share the classes, I suppose.