Creating a high score leaderboard
Finishing Touches
As mentioned, I'm only tracking three spots, but you could certainly track more or all of the scores. As long as you record the scores using the logic in my scripts, the values will always be listed from highest to lowest inside the list, and you will not have to do any additional sorting.
As pictured in Figure 1, you'll see additional sprites for Game Over and the Score labels. The code for these sprites is not shown because you simply need to show, hide, and position them.
Happy Scratchin'!
Infos
- Scratch code for this article: ftp://ftp.linux-magazine.com/pub/listings/raspberry-pi-geek.com/18
- "Scratch – Stamping Numbers" by Michael Badger, Raspberry Pi Geek, issue 17, 2016, pg. 86, http://www.raspberry-pi-geek.com/Archive/2016/17/Custom-stamping-game-scores-with-costume-numbers
« Previous 1 2 Next »