Translations

Know another language? Translate this tutorial!

Arcade Style High Score

Favourite 41 favourites
Tutorial written by ArcadEdOriginally published on 25th, January 2013 - 2 revisions

Using Webstorage to locally store a high score and replace it if the score is broken.

You can also do this with Session instead of Local to keep the high score only for that session, not forever.

Watch on YouTube

Unlock your full gamedev potential

Upgrade to the Personal Edition of Construct 2, it has way more features and won't holding back from making money and using your full creativity like the free edition does. It's a one off payment and all Construct 2 editor updates are free for life!

View deals

Plus, it's got a lot of additional features that will help you save time and make more impressive games!

Congratulations on finishing this tutorial!

Did you learn a lot from it? Share it now with your friends!

Comments

1
rob 3,444 rep

@ArcadEd

Hi I have try to same on my game for high score but didn't get any positive result so can you provide me web storage .capx example file.
That is easy to understand me how to web storage is working and one more question web storage working on mobile device ?

Thursday, July 04, 2013 at 3:44:44 PM
0
Lomaod 2,859 rep

Thank You!

Sunday, July 07, 2013 at 7:35:09 PM
0
Trunks252 1,626 rep

Good Tutorial, Thanks

Thursday, July 11, 2013 at 9:45:50 PM
0
puntodamar 7,430 rep

the result in my game is "Nan"..
what's wrong with this?

Monday, February 10, 2014 at 8:38:31 AM
1
smsanthosh 2,455 rep

great one... Now my game is loaded with highscore... Thanks for your video...

Monday, February 17, 2014 at 5:36:04 PM
0
Falkons 439 rep

I see NaN too in the HighScore: ....

Sunday, February 23, 2014 at 6:22:57 PM
1
thsadmin 555 rep

Thank you & I appreciate the effort, easy to follow & pretty simple to implement. Worked a treat!

Tuesday, February 25, 2014 at 5:14:01 AM
4
acott 476 rep

I also had NAN for the highscore, to fix it you need to wrap it in an int() like so int(WebStorage.LocalValue("HighScore")) that fixed it for me

Tuesday, February 25, 2014 at 10:30:23 PM
3
bremen 2,645 rep

@acott thanks using int(WebStorage.LocalValue("HighScore")) worked for my NaN error

Sunday, March 02, 2014 at 11:23:31 PM
0
PhoenixNightly 2,392 rep

Thanks!! This was straight forward and easy!

Tuesday, March 04, 2014 at 7:58:17 AM
0
MrYoungMan 327 rep

After 3 seconds with smaller score ad is high it sets it to that smaller

Saturday, April 19, 2014 at 9:23:44 PM

Leave a comment

Everyone is welcome to leave their thoughts! Register a new account or login.