Skip to content

ryzrr/SNAKE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐍 Snake Game - HTML, CSS & JavaScript

A classic Snake Game built using pure HTML, CSS, and JavaScript. It’s responsive, keyboard- and touch-friendly, and includes simple sound effects for a more interactive experience.


🚀 Features

  • Grid-based movement
  • Snake grows as it eats
  • Score tracking
  • Game over detection
  • Increasing difficulty
  • Sound effects using Web Audio API
  • Touch controls for mobile
  • Responsive design

📂 Project Structure

snake-game/ ├── index.html # Main game layout ├── style.css # Styling for game and layout ├── script.js # All game logic and interactivity └── README.md # Project documentation


🎮 How to Play

  • Use Arrow keys or on-screen buttons to control the snake.
  • Eat the food to grow and score points.
  • Avoid colliding with the walls or yourself.
  • The speed increases as your score rises.

📱 Controls

Keyboard:

  • ↑ Arrow: Move Up
  • ↓ Arrow: Move Down
  • ← Arrow: Move Left
  • → Arrow: Move Right

On-Screen Buttons (for mobile):

  • Tap the directional buttons to control the snake.

🔊 Sound Effects

  • Sound when food is eaten
  • Game over sound
  • Implemented using the lightweight Web Audio API
  • No external files required

🛠️ Tech Stack

  • HTML5
  • CSS3
  • JavaScript (ES6)

About

play

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors