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