Forcing the GameSettings without using a properties.cfg file

How can I force the contents of the gamesettings. I want my game to run at a fixed window size etc and not have to use the properties.cfg. Anyone know how to do this?





I am running my app using webstart.


If you are extending StandardGame you need to implement/overload the "getNewSettings()" method.

Take a look at "getAttributes" in AbstractGame.java, and getNewSettings() in BaseGame.java

you can't extend StandradGame since its final, but you can set your settings with:

stdGame.getSettings().setWidth(1024);
stdGame.getSettings().setRenderer(LWJGLSystemProvider.LWJGL_SYSTEM_IDENTIFIER);
etc.

argh sorry… meant SimpleGame - too many things starting with S round here :slight_smile:

Core-Dump said:

you can't extend StandradGame since its final, but you can set your settings with:

stdGame.getSettings().setWidth(1024);
stdGame.getSettings().setRenderer(LWJGLSystemProvider.LWJGL_SYSTEM_IDENTIFIER);
etc.




Not sure what you're doing here... what is stdGame?

Thanks

CH

StandardGame stdGame = new StandardGame("…");



just noticed that StandardGame has a constructor that takes a GameSettings option tho, so thats the easiest of the lot !