JS Asteroids Game Part 6 (Scoring and Saving Data Locally)
Mt. Ford Studios
In the sixth part of this JavaScript Asteroids Game tutorial series, we keep track of the game score. Large asteroids are worth 20 points, medium ones 50 points, and the hard-to-hit small asteroids are worth 100 points! We also use HTML5 web storage to store our high score locally to the browser. This is achieved by using the localStorage.setItem() and getItem() functions.
If you liked the original 1979 Atari game, Asteroids, go ahead and download the code below and create your own cool web-browser game!
CODE Previous tutorial (Asteroids Part 5 – Levels, Lives, and Game Over): https://drive.google.com/open?id=1Wbq90vAfeH1E5HJdQwZjqD-QVZ2EdsA9 This tutorial (Asteroids Part 6 – Scoring and Saving Data Locally): https://drive.google.com/open?id=1tcdbbODVojY-Uhzdb_kG51H1NWibyRSP
USEFUL LINKS w3schools HTML5 Web Storage: https://www.w3schools.com/html/html5_webstorage.asp Visual Studio Code: https://code.visualstudio.com/
FIND US ON FACEBOOK https://www.facebook.com/MountfordStudios/ ... https://www.youtube.com/watch?v=D7zRS1LFi3k
32091009 Bytes