GitHunt
NE

A Modern Snake game implemented using HTML, JavaScript, and CSS.

Modern Snake Game

A classic Snake game implemented using HTML, CSS, and JavaScript. The game runs directly in your browser, offering a simple and nostalgic experience. Control the snake using the keyboard and grow it by eating food while avoiding collisions.

Features

Core Gameplay

  • Smooth snake movement with edge wrapping
  • Progressive difficulty (snake speeds up as you eat)
  • Score tracking and high score persistence
  • Bonus food system with special points

Controls

  • Movement: WASD keys or Arrow keys
  • Game Control: Space bar (Start/Pause/Resume)
  • Sound: M key (Mute/Unmute)

Visual Features

  • Modern gradient background
  • Realistic snake graphics with body segments
  • Particle effects when collecting food
  • Achievement notifications
  • Clean, modern UI with game info panel

Sound System

  • Food collection sound effects
  • Bonus food sounds
  • Game over sound
  • Mutable audio

Additional Features

  • High score system with local storage
  • Achievement system
  • Pause/Resume functionality
  • Responsive design
  • Game over detection
  • Bonus food mechanics

How to Play

  1. Press Space to start the game
  2. Use WASD or Arrow keys to control the snake
  3. Collect regular food (white) to grow and increase score
  4. Watch for bonus food (golden) for extra points
  5. Avoid colliding with yourself
  6. Press Space to pause/resume
  7. Press M to toggle sound

Technical Details

  • Built with vanilla JavaScript
  • Uses HTML5 Canvas for rendering
  • Local storage for high score persistence
  • Modern CSS with flexbox layout
  • Responsive design principles

Installation

  1. Clone the repository
  2. Open snake-game.html in a modern web browser
  3. No additional dependencies required

Browser Compatibility

  • Chrome (recommended)
  • Firefox
  • Safari
  • Edge

Future Improvements

  • Mobile touch controls
  • Multiple difficulty levels
  • Power-ups system
  • Multiplayer mode
  • Custom themes

Credits

License

This game is open source and free to use. Feel free to modify, enhance, or share it with others.
Enjoy the game!

Neaj-Morshad-101/SnakeGame | GitHunt