This is my first time creating a game via a tutorial which I've coded along with so I am a completely new at this but I am eager to learn.
I've this game "Bunny Defender" and want to create a simple High Score which I can store in some kind of localstorage with XML and display the high score result out on the screen when the game is over.
I don't know how to do this and where to start. Would be very thankful if someone could point me at the right direction and how to manage this?
// All the game files on github https://github.com/eiffelqiu/bunny-defender
//////////////////////////////////////Under the create put
/////////////////////////////////////////////////////////////// //then this in update function
//////////////////////////////////////////
//Then this part where ever you want to be counting so more than likely you want to put it in the kill bunny function or the where ever you count the points when they are surviving.
///////////////////////////and BOOOOOOOOM working high-score
Why would you need XML? Stuff is stored inside localStorage as key-value pairs, so in the general case this would be enough to set it:
... and this - to retrieve it:
Then, whenever you want to display it, do