Obviously, you must specify the display options for your game, before starting the application. Here is a simple example: the default window title is jMonkey Engine 3.0
; let's change this display setting to the name of your game:
Make a copy of
Main.java
and name the classSettingsTest.java
. Remember to also refactor the first line of themain()
method toSettingsTest app = new SettingsTest();
.Go to the
main()
method ofSettingsTest
and add a newAppSettings
object:public static void main(String[] args) { AppSettings settings = new AppSettings(true); // create
Use setters to specify one or more options. In this example, we set the game's window title:
settings.setTitle("My Cool Game"); // modify
Activate the new
settings
object before callingapp.start()
:SettingsTest app = new SettingsTest(); app.setSettings(settings); // activate app.start(); }
When you run the code, your jMonkeyEngine window title is set to My Cool...