An open API service indexing awesome lists of open source software.

https://github.com/nidhiupman568/snake-game

๐ŸŽ‰Welcome to my Snake game! ๐ŸŽ‰ This project recreates the classic Snake game using HTML ๐Ÿ“, CSS ๐ŸŽจ, and JavaScript ๐Ÿ’ป with the HTML5 canvas element ๐Ÿ–ผ๏ธ.
https://github.com/nidhiupman568/snake-game

css front-end-development html interactive-web-design javascript snake-game web-animation web-development

Last synced: about 1 month ago
JSON representation

๐ŸŽ‰Welcome to my Snake game! ๐ŸŽ‰ This project recreates the classic Snake game using HTML ๐Ÿ“, CSS ๐ŸŽจ, and JavaScript ๐Ÿ’ป with the HTML5 canvas element ๐Ÿ–ผ๏ธ.

Awesome Lists containing this project

README

        

# Snake Game ๐Ÿ๐ŸŽฎ

Welcome to my Snake game! ๐ŸŽ‰ This project recreates the classic Snake game using HTML ๐Ÿ“, CSS ๐ŸŽจ, and JavaScript ๐Ÿ’ป with the HTML5 canvas element ๐Ÿ–ผ๏ธ.

Project Demo: https://nidhiupman568.github.io/SNAKE-GAME/

## Features โœจ

- **Canvas Display**: Utilizes HTML5 canvas for rendering the game graphics ๐ŸŽจ๐Ÿ–ผ๏ธ.
- **Game Loop**: Implements a smooth game loop for continuous gameplay ๐Ÿ”„๐ŸŽฎ.
- **Keyboard Controls**: Listens for arrow key presses to control the snake's movement โŒจ๏ธโฌ†๏ธโฌ‡๏ธโฌ…๏ธโžก๏ธ.
- **Segment Management**: Uses an array to manage and grow the snake's body segments ๐Ÿโž•.
- **Collision Detection**: Checks for collisions with itself and boundaries to trigger game over ๐Ÿšง๐Ÿ’ฅ.
- **Score Tracking**: Keeps track of the player's score as they collect food items ๐Ÿ“ˆ๐ŸŽ.

## How to Play ๐ŸŽฎ

1. **Start the Game**: Open `index.html` in your browser ๐ŸŒ.
2. **Move**: Use arrow keys to navigate the snake โฌ…๏ธโฌ†๏ธโฌ‡๏ธโžก๏ธ.
3. **Collect Food**: Eat food items to grow the snake and increase your score ๐Ÿ๐Ÿ๐Ÿ“ˆ.
4. **Avoid Collisions**: Don't run into walls or your own tail to avoid game over ๐ŸšงโŒ.

## Getting Started ๐Ÿš€

1. Clone the repository: `'https://github.com/nidhiupman568/SNAKE-GAME.git'` ๐Ÿ“๐Ÿ’ป
2. Open the `index.html` file in your browser ๐ŸŒ.

## Technologies Used ๐Ÿ› ๏ธ

- **HTML5** ๐Ÿ“
- **CSS3** ๐ŸŽจ
- **JavaScript** ๐Ÿ’ป

#### Screenshots (Output) ๐Ÿ“ธ

![SNAKE GAME](https://github.com/nidhiupman568/SNAKE-GAME/assets/130860182/f3aae81c-5b31-42d4-a6c2-3c398ae940ae)