Scoring and a high score.

I’m making an endless motor bike game and I need a score to be building up and I want a high score to be saved.

For my recently boss fight game, I added a local hiscore table to save the top 10 best scores. What I use is the preference save module created by Satheesh which can be found here http://developer.coronalabs.com/code/save-data-files-tablesnumbersstringsboolean

I use this to save my scores. Quite simple and does the job, though I’m not sure if its the best alternative out there.

With your scoring system itself, you could simply keep count and add to a variable as appropriate in your game, with something like: playerScore=playerScore+10 etc. At game over or game complete, you can then save this playerScore.

Cheers,

We just did a tutorial/blog on this today…

http://www.coronalabs.com/blog/2013/12/10/tutorial-displayingsavingloading-scores/

Rob

For my recently boss fight game, I added a local hiscore table to save the top 10 best scores. What I use is the preference save module created by Satheesh which can be found here http://developer.coronalabs.com/code/save-data-files-tablesnumbersstringsboolean

I use this to save my scores. Quite simple and does the job, though I’m not sure if its the best alternative out there.

With your scoring system itself, you could simply keep count and add to a variable as appropriate in your game, with something like: playerScore=playerScore+10 etc. At game over or game complete, you can then save this playerScore.

Cheers,

We just did a tutorial/blog on this today…

http://www.coronalabs.com/blog/2013/12/10/tutorial-displayingsavingloading-scores/

Rob