High scores screen that takes names and saves them

4

Attached Files

The following files have been attached to this tutorial:

.capx

scores-run.capx

Download now 185.92 KB

Stats

2,030 visits, 2,816 views

Tools

License

This tutorial is licensed under CC BY-NC 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 3 Apr, 2020. Last updated 27 Jul, 2022

In this tutorial, I'll be covering how to make your own top 10 high scores board using Construct 2 (release 277). You'll learn how to:

- Sort your scores (aka sort arrays)

- Capture player names

- Save your high scores (locally) so they won't reset each time you play

Please note this does not show how to make an online/global scoreboard. This uses local storage so every device you play on will have its own scoreboard.

.CAPX

scores-run.capx

Download now 185.92 KB
  • 6 Comments

  • Order by
Want to leave a comment? Login or Register an account!
  • Perfect! Thank you my friend.👍

    • Happy you found it useful!

      • is there any way to make the same saved high scores viewable to all?

        Like a classic arcade where you try to beat the last players score.

        This version only shows me my scores but my other players online only see the default scores.

        I'm hosted on Netlify for ease of use. not sure how to setup online viewable score from each player who enters a score.

        • Unfortunately, I do not know how to make high scores for online/global use. Local storage stores data locally; only on the current device. I'll update the description to make sure that's clear.

          When looking at other tutorials, they mention having to use extra APIs or plugins (example: construct.net/en/tutorials/integrating-leaderboards-204). Hopefully, Netlify has some documentation you can refer to.

          • no confusion, it was loud and clear. I was just hoping you knew a way since so many of my users like this one. I just kept getting request for online scores and wanted to see if can be done. Thanks again buddy. Still a very helpful tutorial.

  • Made minor changes in CAPX not shown in the video so a score of 0 is displayed at the bottom of the high scores screen:

    - On scores sheet, display current score if greater than or equal to 0.

    - On scores sheet, display nothing if your score is less than 0.

    - On the title sheet, on start of layout, set current score to -1.

    - On game sheet, on start of layout, set current score to 0.