🔊 INTRODUCTION :
Remember when we used to play many games on our keypad phones back in the day? One of the games is Snake Game. I tried to make my version of that snake game with that retro-style theme.
https://www.loom.com/share/feb0e6c4e0544a82ab67961d39feefc3
https://jassisingh08.github.io/Snake-Game/
🖋 Customisations :
- Used HTMl, you open the project you will see a board seperated from the background, with score section tabs.
- Css is used to make the board interactive by giving color combinations and a grid section to make the path for the snake and even the Snake itself.
🗺 Working :
-
Javascript is used to give main function and logic to the game. Inserted Winning logic and lost logic.
-
Goal - The main thing in the snake game is that it should get big as he eats the food. Added that using properties of arrays and using loops.
-
Auto Food regeneration logic - food will randomly generate anywhere inside the board.
-
Music functionality - Snake moving sound, Food Eating sound, Game over sound and Background sound.
-
High Scores - Previously scored Highs will automatically save in the local machine. And if user breaks that scores it will update the Highs in the local storage as well.
Loosing Condition :
-
If snake Bumps into the wall.
-
If Bumps into Itself.
If Any of the Above Conditions met, An alert will popup showing "the Game Over. Your Score is xxx .Press any key to play again"
⬆ Updates :
-
Updated the game with features like: now player can adjust the speed of the snake on his own and can see the speed of snake as well, Difficulty level indicator for user experiencce
-
Added ON-Screen buttons for touch based devices, And responsiveness according to various screen sizes including tablets and mobile phones.
🖼 Images :
✔ Conclusion :
The game incorporated many logic buiding concepts that will help me in the future projects.
Any Feedbacks and Suggestions are appreciated.