let me know how to save an integer for game stage level? I am trying to make a game which there are many stages. For example, If users are done stage 3 of the game, and then turn off the game, they can play the game at stage 3 anytimes. simply, I tried to make this logic, so when you press space bar, the level goes up. However, after turning off and on, lev will start at 0. I guess when program are ruining every single times, the lev is initialized 0. I tried to use preference. please let me know solutions.. AppPreferences.java public class AppPreferences private static final String PREFS NAME "Adventure" private static final String PREF LEVEL "Level" private Preferences preferences protected Preferences getPrefs() if (preferences null) preferences Gdx.app.getPreferences(PREFS NAME) return preferences public void setPrefLevel(int level) getPrefs().putInteger(PREF LEVEL,level) getPrefs().flush() public int getPrefLevel() return getPrefs().getInteger(PREF LEVEL) PlayScreen.java public class PlayScreen implements Screen int lev 0 public void render(float delta) if(Gdx.input.isKeyJustPressed(Input.Keys.SPACE)) advanture.getPreferences().setPrefLevel(i) System.out.println(advanture.getPreferences().getPrefLevel() "!!!!!!!!!") i