7
Reply

Simple highscore

Rick van Leeuwen

Rick van Leeuwen

Oct 26 2011 5:03 PM
4.4k
Hello,
i have a simple pong game.
i inserted a counting which does +1 when the ball hits the paddle. and i show this on screen. this works
i also already have code that exits the game when the ball misses the paddle

But now i want to save highscore.
This is precisely what i want:
- when game is over, save highscore
- only overwrite it when it's higher than the previous
- load it when game starts

just very simple, only a number. No table or best 10 or something, just 1 number that only overwrites when its higher the the previous.

thanks in advance

Rick

Answers (7)