Skip to content

adgpt/HTML_Snake_Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Snake Game

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.

Features

  • 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

Demo

You can play the game by opening index.html in your web browser.

Installation

  1. Clone this repository:
    git clone https://github.com/YOUR_USERNAME/snake-game.git
  2. Navigate to the project directory:
    cd snake-game
  3. Open index.html in your web browser

How to Play

  • 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!

Technologies Used

  • HTML5 Canvas
  • JavaScript (ES6+)
  • CSS3

License

This project is open source and available under the MIT License.

Development

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.

Contributing

Contributions are welcome! Feel free to submit a Pull Request.

About

A modern implementation of the classic Snake game using HTML5 Canvas and JavaScript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors