Snake World is a modern version of the classic Snake game, built using HTML5 Canvas and vanilla JavaScript. The game features two difficulty levels, responsive controls (keyboard + mobile-friendly buttons), walls in Hard mode, and local high score tracking.
Live Demo: https://kinza98.github.io/Snake/
- 🎯 Two Difficulty Levels: Easy and Hard
- 🍎 Random Food Placement: Avoids snake and wall collisions
- 🧱 Wall Obstacles: Appear in Hard mode for an extra challenge
- 📱 Responsive Controls: Playable via arrow keys or touch buttons
- 💾 High Score Tracking: Saved locally using
localStorage - ⏸️ Pause & Resume: Easily pause and resume gameplay
- 📐 Responsive Canvas: Dynamically adjusts to screen size
- Clone this repository:
git clone https://github.com/Kinza98/snake-game.git cd snake-game - Open index.html in your browser: You can double-click the file OR Run a local server (recommended):
-Use arrow keys to control the snake’s direction.
-Avoid hitting the walls (in Hard mode) or yourself.
-Eat the orange squares (food) to grow longer and score points.
-Press Pause/Play to pause or resume the game.
-If the snake crosses a boundary, it wraps around to the other side.
-HTML5
-CSS3
-JavaScript (ES6+)
-Canvas API
-localStorage API
This project is publicly viewable for learning and demonstration purposes only.
You are not allowed to reuse, or redistribute any part of this code as your own work.
Please respect the author's original work.
Made with ❤️ by Kinza