A modern implementation of the classic Snake game using HTML5 Canvas and JavaScript. This game features responsive design, touch controls, and exciting power-ups to enhance the gameplay experience.
- Smooth snake movement with keyboard and touch controls
- Power-up system with multiple effects:
- Speed boost
- 2x score multiplier
- 3x score multiplier
- Responsive design that works on both desktop and mobile devices
- High score tracking using local storage
- Sound effects for eating and game over
- Pause functionality
- Modern, clean UI
You can play the game by opening index.html in your web browser.
- Clone this repository:
git clone https://github.com/YOUR_USERNAME/snake-game.git
- Navigate to the project directory:
cd snake-game - Open
index.htmlin your web browser
- Use arrow keys (↑, ↓, ←, →) to control the snake's direction
- On mobile devices, tap the edges of the screen to change direction
- Collect red food to grow and earn points
- Yellow food items are power-ups that provide special effects
- Press spacebar to pause/resume the game
- Avoid colliding with yourself
- Try to achieve the highest score possible!
- HTML5 Canvas
- JavaScript (ES6+)
- CSS3
This project is open source and available under the MIT License.
This Snake Game was developed with assistance from AI tools, specifically using an AI coding assistant for pair programming. The AI helped with:
- Code implementation and optimization
- Documentation writing
- Best practices suggestions
While AI was a development tool, all design decisions, feature selections, and final implementation choices were made with human oversight to ensure quality and reliability.
Contributions are welcome! Feel free to submit a Pull Request.