Skip to content

Kinza98/Snake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐍 Snake World – JavaScript Canvas Game

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.

🎮 Demo

Live Demo: https://kinza98.github.io/Snake/

📌 Features

  • 🎯 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

🚀 How to Run Locally

  1. Clone this repository:
    git clone https://github.com/Kinza98/snake-game.git
    cd snake-game
  2. Open index.html in your browser: You can double-click the file OR Run a local server (recommended):

🕹️ How to Play

-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.

📦 Tech Stack

-HTML5

-CSS3

-JavaScript (ES6+)

-Canvas API

-localStorage API

Screenshots

image image image

🛡️ License

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.

Author

Made with ❤️ by Kinza

About

Fun Snake Game with easy and hard levels, wall obstacles, and score tracking.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published