Gamestates and my FixedFramerateGame

Hi, I've this problem:

I have a FixedFramerateGame and now I would to use it as a GameState 'cause I need to build different GameState (like Menu or for the "pause" ecc…)  How can I do?..thanks!

create ur own classes that extends BasicGameState and attach them to GameStateManager.



u also need to put the update and render methods of the GameStateManager into ur game loop.



so under ur game update method, put in GameStateManager.getInstance().update(interpolation);



and under ur game render method, put in GameStateManager.getInstance().render(interpolation);

Well, you shouldn't probably have a GameState that modifies the framerate since it would then impose that framerate on all other GameStates as well.  However, StandardGame already supports specifying a fixed framerate in the GameSettings, so if you're using StandardGame you simply need to turn it on.  It also supports vertical sync, which is generally preferred to fixed framerate.

thanks, I'm trying  :wink: