Looking inside the Application.java

Hello guys, I was playing with the tutorials and reading some forums and you always advise to extends the SimpleApplication for any one project, but browsing the Application.java I can see that a lot of things are instantiated, things that I won’t need like an audioRenderer, JoyInput and a lot of other things, I came from Ogre and I am used to create all these objects and of course to manage my own game loop. Application.java has some low level things mixed with these already declared objects, i guess it is not flexible cause I am locked with the Application class, would not be more interesting if we had one more level of abstraction?

Thanks guys

You can disable audio and joysticks by setting the appropriate values on AppSettings

Can I manage my own game loop? It will be very difficult to do cause it is managed in another thread that is not the main and I pass my listener with context.setSystemListener(this); and my update will be called. yeah… my own game loop went to space or I will need to create my own LwjglAbstractDisplay class and etc… Why the main loop does not run on the main thread?


The main loop is your main loop for doing opengl related things in jme3 :slight_smile: Theres nothing “slowing down” the application through the fact that it has some options you don’t use. Consider its like the AWT update loop, you don’t expect to be able to trigger the updates yourself there too. The reason is that this way changes we make to the render system don’t result in either lots of different classes like doing things just slightly different (as in jME2) or strangeness in the users application (due to some uninitialization processes missing etc. Also this allows us best to add and implement multithreaded features to the engine. So technically you can call the update yourself but really then you should do it like its done in the update loop now, so you can just use it as it is right away :wink:

How about copying the Application class and changing what you need? Of course it will make deployment much harder as you cannot use jMP’s one click to applet, one click to android, etc, features