Make a JavaScript Game High Score List

Опубликовано: 06 Май 2026
на канале: Coding Commanders
10,035
98

Do you want to make a JavaScript game high score list? Use JavaScript, The Fetch API, JSON, and PHP to build a multiplayer high score list. Players all over the world can compete to see their name on your game's high score list, on the web.

~ Time Stamps ~
JSON: 0:53
HTML: 1:16
JavaScript: 2:04
Fetch API - read JSON data: 2:17
Use JavaScript to display JSON data in a list: 4:06
Reset Game Form JavaScript Function: 7:15
Fetch API - Submit Form: 8:05
Submit Button Event Listener: 8:06
FormData Object: 9:22
append a form data object
Example: formData.append("level",
last_level); Where "level" is the key and
the variable
. last_level holds the data that level will
point to
Fetch Post Method: 9:38
PHP: 10:34
POST data: 10:35
Read JSON file: 11:24
Logic to create new high score data: 11:44
Write to JSON file: 13:56


~ Related Links ~
JavaScript Game High Score List (web lesson): https://www.codingcommanders.com/dice...


Play the JavaScript Dice Game with High Score List:
https://www.codingcommanders.com/dice...


JavaScript Dice Game Playlist:
   • JavaScript Dice Games - Beginner JavaScrip...  

Build a Virtual LAMP Stack Server:
   • Set Up LAMP STACK Web Server in 10 mins!!!...  
(Because we use JSON for our high score data, you do not need MySQL for this project. You can hold off on installing and setting that up if you like. The rest of the software you will need.)

Transfer files from your local machine to the virtual server via Linux command line:
   • rsync -  Linux File Copying Tool  

Transfer files on Linux or Windows and most other common OS:
http://www.codingcommanders.com/websi...

More on the Fetch API:
https://developer.mozilla.org/en-US/d...

Multiple players competing for a spot on your JavaScript game's online high score list encourages more gameplay. Don't forget to like my video (if you liked it) and to subscribe for more LAMP Stack and JavaScript Game Dev videos!

~ Credits ~
Thank you to Darren Curtis for making so much of the awesome music used in the background of this video! Check out his website: https://www.darrencurtismusic.com/ins... and his SoundCloud:   / sci-fi-atmospheric-music-lost-world-royalt...  

Songs by Darren Curtis: Dark Factory, Lost World, They Live in the Mist, and Fall from Grace
Also, Fairy Dust by Kensun.