Convert game from BaseGame to SimpleGame

Hi everyone,



I've had a look at the forum for a solution to this, but can't find any!



Basically, I have a game that was written extending 'BaseGame', but now I find that I need some of the functionality of 'SimpleGame'.



I've changed the class to extend SimpleGame, and have changed the 'initGame' and 'update' methods to 'simpleInitGame' and 'simpleUpdate' respectively.  This seems to compile fine.



However, when I run the thing, I get this error (using eclipse btw):



SEVERE: Exception in game loop

java.lang.NullPointerException

at com.jme.app.BaseSimpleGame.initGame(BaseSimpleGame.java:505)

at com.jme.app.BaseGame.start(BaseGame.java:69)

at assignment.MainGame.main(MainGame.java:161)

03-Feb-2008 13:21:57 com.jme.app.BaseGame start

INFO: Application ending.



I can't work out what is causing it to fail like this.  All the methods are there, and I can run all the test demo's fine.



Anyone know of anything in particular that I have to do to make this conversion work?



Cheers

well line 505 in BaseSimpleGame is


initGame() {
...
505:        timer.reset();
}



if you get a NPE there, it means you didnt initialize the Timer yet.
In BaseSimpleGame the timer is created in the initSystem() Method.

Do you overwrite this Method in your implementation?
If so, make sure you aso initialize the timer in your initSystem() method like:

timer = Timer.getTimer();



or call super.initSystem()