How do I use GameStateManager in BaseGame?

Hi,



I am new to Java Monkey Engine and have spent some time reading up the docs. I understand that StandardGame is the recommended way of doing games, with its use of game states. However, as I am just trying do something simple first, so I am thinking of using BaseGame with GameStateManager.



Are there any tutorials on this? Have anyone tried it; if so, what are the pitfalls and stuff that I have to be aware of?



Thanks in advance!

Maybe StandardGame should be renamed to MultithreadedGame, since it has quite a few pitfalls :slight_smile:



If you implement your own BaseGame you just need to make sure to create a GameStateManager instance and update/render it in your BaseGames update/render Methods.

To initialize the display and Input etc. you can just look into SimpleGame and copy what you need.

u really cant get anything wrong if u r using base game + game states.



each game state basically maintains its own scene graph, so there isnt any difference from a plain base game implementation.



however, using standard game may cause problems since alot of the gl calls dont allow multithreading.