A modern implementation of the classic Snake game with enhanced features and realistic graphics using HTML5 Canvas and JavaScript.
- 🐍 Realistic snake movement with smooth body following behavior
- 👀 Animated snake eyes that follow movement direction
- 🎯 Dynamic obstacles that appear and fade over time
- 🌈 Gradient effect on snake body segments
- 🍎 Random food spawning
- 📊 Score tracking
- 🎮 Responsive controls
- Open
index.html
in a modern web browser - Use arrow keys to control the snake's direction
- Eat food to grow longer
- Avoid:
- Hitting walls
- Colliding with yourself
- Running into obstacles
- ⬆️ Up Arrow: Move up
- ⬇️ Down Arrow: Move down
- ⬅️ Left Arrow: Move left
- ➡️ Right Arrow: Move right
The game is built using:
- HTML5 Canvas for rendering
- JavaScript ES6+ features
- Object-oriented programming principles
snake_game/
├── index.html
├── css/
│ └── style.css
├── js/
│ ├── game.js
│ ├── snake.js
│ └── obstacles.js
└── README.md
- Clone the repository:
git clone https://github.com/abhishek_maurya576/snake_game.git
- Open
index.html
in your browser
- Chrome (recommended)
- Firefox
- Safari
- Edge
- Multiple difficulty levels
- Power-ups
- Sound effects
- High score system
- Mobile touch controls
Feel free to fork the project and submit pull requests for any improvements!
This project is open source and available under the MIT License.