https://github.com/deryaxacar/snakegame-2d
This project is a 2D Snake Game built with HTML, CSS, and JavaScript, where the snake grows by eating food and ends on collision.
https://github.com/deryaxacar/snakegame-2d
2d-game 2d-graphics 2d-snake-game 2dgame game game-2d html-css-javascript javascript javascript-game javascript-library javascript-project js js-game snake-game snake-game-js web website
Last synced: about 2 months ago
JSON representation
This project is a 2D Snake Game built with HTML, CSS, and JavaScript, where the snake grows by eating food and ends on collision.
- Host: GitHub
- URL: https://github.com/deryaxacar/snakegame-2d
- Owner: deryaxacar
- Created: 2024-08-17T19:20:40.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-06-15T10:55:54.000Z (about 1 year ago)
- Last Synced: 2025-12-30T18:01:23.017Z (6 months ago)
- Topics: 2d-game, 2d-graphics, 2d-snake-game, 2dgame, game, game-2d, html-css-javascript, javascript, javascript-game, javascript-library, javascript-project, js, js-game, snake-game, snake-game-js, web, website
- Language: JavaScript
- Homepage: https://github.com/deryaxacar/SnakeGame-2D
- Size: 262 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This project is a classic 2D Snake Game developed using HTML, CSS, and JavaScript. The player controls the snake using the arrow keys and collects food on the screen to grow the snake. The game ends if the snake hits the walls or itself. This project provides a great example for practicing your fundamental web development skills.
---

---
## Features
- **Direction Control:** Control the snake using the arrow keys. 🎮
- **Pause Game:** Press the "E" key to pause or resume the game. 🛑
- **Score Tracking:** Increase your score by collecting food. 🏆
- **Difficulty Level:** The game becomes more challenging as the snake grows. 📈
- **Game Over:** The game ends if the snake hits the walls or itself. 💀
---
## Usage
1. Clone this repository to your local machine:
```bash
git clone https://github.com/kullaniciadi/2d-snake-game.git
```
2. Navigate to the project directory:
```bash
cd 2d-snake-game
```
3. Open the `index.html` file in your browser.
---
2024 | Created by Derya ACAR
