In the wiki, it says that certain types of AbstractGame dont support gamestates. Does FixedLogicRateGame support them? (And by init method, does it mean initGame() or initSystem())
EDIT: after looking around in the source of gamestate and standardgame, i think I know the answer: NO. I suppose i can add the setLogicTickPerSecond and that stuff in my standard game subclass? I have some basic code, but it gives me and error. Can anyone clarify why?
Code (a copy from the wiki):
public TiltBallMain(){
super("TiltBallMain");
}
public static void main(String[] args) {
System.out.println("In main( String[] args )");
//set the dialog behavior
tb.setDialogBehaviour(ALWAYS_SHOW_PROPS_DIALOG);
//start the application
tb.start();
DebugGameState gameState = new DebugGameState(); // Create our game state
GameStateManager.getInstance().attachChild(gameState); // Attach it to the GameStateManager
gameState.setActive(true); // Activate it
Box box = new Box("TestBox", new Vector3f(), 1.0f, 1.0f, 1.0f); // Create a Box
box.setRandomColors(); // Set random colors on it
box.updateRenderState(); // Update the render state so the colors appear (the game is already running, so this must always be done)
gameState.getRootNode().attachChild(box);
}
Error:
In main( String[] args )
Oct 2, 2006 11:36:39 AM com.jme.scene.Node <init>
INFO: Node created.
Oct 2, 2006 11:36:39 AM com.jme.scene.Node <init>
INFO: Node created.
Oct 2, 2006 11:36:39 AM com.jme.system.lwjgl.LWJGLDisplaySystem <init>
INFO: LWJGL Display System created.
Exception in thread "Thread-1" java.lang.UnsatisfiedLinkError: getJNIVersion
at org.lwjgl.DefaultSysImplementation.getJNIVersion(Native Method)
at org.lwjgl.Sys.<clinit>(Sys.java:103)
at org.lwjgl.opengl.Display.<clinit>(Display.java:103)
at com.jme.system.lwjgl.LWJGLDisplaySystem.initDisplay(LWJGLDisplaySystem.java:405)
at com.jme.system.lwjgl.LWJGLDisplaySystem.createWindow(LWJGLDisplaySystem.java:135)
at com.jmex.game.StandardGame.initSystem(StandardGame.java:200)
at com.jmex.game.StandardGame.run(StandardGame.java:127)
at java.lang.Thread.run(Unknown Source)
-Gibi }:-@