🔥 [GAME] Play this Awesome Sliders Game!! 🔥
rjlevy (265)

Hey everyone! This Sliders brain-teaser game took me a week to code from scratch using only vanilla JS and CSS. It's really simple and fun to play - just read the instructions below. I challenge you to beat the highest score from the Leader Board! 😄

👉 Sliders 👈

Features 💡

  • Mobile friendly
  • Includes Help section
  • Initializing sequence to randomize game
  • Made purely with Vanilla JavaScript and CSS; no front-end frameworks or libraries like React, Vue etc...
  • Leader board scores saved on the back-end with Google Firebase
  • Many thanks to @yevbar (Yev Barkalov) for this Firebase tutorial and to @Jp2323 (Jorge P) for this Firebase repl

Instructions 🛠

  • Choose the game size: 3x3, 4x4 etc...
  • Slide pieces into the empty space from above, below or the side
  • Position numbers in the correct order in the fewest possible moves
  • Each move reduces the total score by 1
  • Pieces turn green when in the correct position
  • When all the pieces are correct you can add your score to the Leader Board

Links 🔗

Demo 🏁

You are viewing a single comment. View All
rjlevy (265)

Hi @generationXcode, I really wanted to and tried to implement a .env file but this doesn't seem possible with a front-end project like this. Unless you know of a way? I think it would need to be a node project with a server running and then install the dotenv node package.

How do you suggest I refer to variables in local scope? The score variable needs to be shared by src/Block.js and script.js. Any suggestions are much appreciated.

By the way, the firebase JS files have been obfuscated to help with security