How to remove default JME settings?

Ok well i will try my best to explain.



Once you debug/compile a project you are creating using the simpleApplication method you get the JME box asking for resolution and other details then a button to star tthe game. You then run the game and it monitors the debugging in white writing on the bottom left.



I am curious if it is possible how would you go about changing those screens, Incase i would like to release a project i wouldnt want jme screens on it.



Thanks

You can bypass the settings window by using something similar to this:



[java]

app = new Base();

AppSettings gameSettings = null;

gameSettings = new AppSettings(false);

gameSettings.setResolution(1280, 720);

gameSettings.setFullscreen(false);

gameSettings.setVSync(false);

gameSettings.setTitle(“Stellar Conquest”);

gameSettings.setUseInput(true);

gameSettings.setFrameRate(500);

gameSettings.setSamples(0);

gameSettings.setRenderer(“LWJGL-OpenGL2”);

app.settings = gameSettings;

app.setShowSettings(false);

app.start();

[/java]

You should replace “app = new Base();” with the main class name you use, then put those into main or your preferred location where you call “app.start();”

2 Likes

Gamesettings being the name you called the frame



ah nvm you just updated :smiley: ye i had a feeling it was just basic syntax, Thanks mate

Had to edit so all the info was there since I save/load those info on file… Sorry for the unintentional misleading. :confused:

[java]saveSettings(gameSettings);[/java]



is there another method for saving the settings defined, If needed that is.



the saveSettings does not exist and i would need to create a method for it, ive also tryed:



[java]app.saveSettings(gameSettings);[/java]



also commented it out, Once commented out it seemed to work tho. So it isnt really needed is it.

Nevermind that line. I forgot to remove it. :s That’s what is called when I save the settings in a file. I edited the post to reflect that.



Hopefully I haven’t forgotten anything else.

:stuck_out_tongue: ok and another thing.



When setting the settings to full screen: java.lang.RuntimeException: Unable to find fullscreen display mode matching settings



and also you dont have to give me the code but if you could point me inthe right direction for this next question im sure ill find it :smiley:

The white text displaying when running the game to debug it, showing the frames per sec etc…



How would i remove it, Is there a way to edit the simple application.java and yes i have tryed searching around the forum:P



only had people trying to create there own simple application class.

For fullscreen you have to tell the app what resolution it will be first (that’s applicable in windowed mode or fullscreen). So if you want the window to be fullscreen at 1280x720 you would do it that way:

[java]



gameSettings.setResolution(1280, 720);

gameSettings.setFullscreen(true);



[/java]



As for the debug info etc, you can use the methods provided in SimpleApplication. I use the following in simpleInitApp() method.



[java]

setDisplayFps(true);

setDisplayStatView(false);

[/java]

2 Likes

ok thanks mate i apreciate it.