There is such a variable: Preferences preferences; In the game class, when the game ends do this:
game.tempGameScore = game.dropsGatchered; game.dropsGatchered = 0; iter.remove(); game.preferences.putInteger("Save", game.tempGameScore); game.preferences.flush(); In the class with the result I deduce:
@Override public void render(float delta) { Gdx.gl.glClearColor(0f, 0f, 0f, 1); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); game.batch.begin(); game.batch.draw(bacgTexture, 0, 0, Drop.WIDTH, Drop.HEIGHT); if (game.tempGameScore != 0) { textFont.draw(game.batch, " " + game.preferences.getInteger("Save", game.tempGameScore), 800/2, 480/2); } else { game.tempGameScore = 0; textFont.draw(game.batch, " " + game.tempGameScore, 800/2, 480/2); } game.batch.end(); } The speed is saved and displayed, how to make the best result be saved between sessions?