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

https://github.com/mahmudnibir/2048

🧩 2048 Web Game – A modern and responsive web-based version of the classic 2048 puzzle. Built with HTML, CSS, and JavaScript, featuring smooth animations, intuitive controls, and a clean UI. Merge tiles, reach 2048, and set new high scores!
https://github.com/mahmudnibir/2048

2048 css html5 javascript web-game

Last synced: 6 months ago
JSON representation

🧩 2048 Web Game – A modern and responsive web-based version of the classic 2048 puzzle. Built with HTML, CSS, and JavaScript, featuring smooth animations, intuitive controls, and a clean UI. Merge tiles, reach 2048, and set new high scores!

Awesome Lists containing this project

README

          

![GitHub status](https://img.shields.io/badge/status-completed-brightgreen.svg)
![GitHub Repo stars](https://img.shields.io/github/stars/mahmudnibir/2048?style=social)
![GitHub contributors](https://img.shields.io/github/contributors/mahmudnibir/2048)
![GitHub issues](https://img.shields.io/github/issues/mahmudnibir/2048)
![GitHub forks](https://img.shields.io/github/forks/mahmudnibir/2048?style=social)
![GitHub last commit](https://img.shields.io/github/last-commit/mahmudnibir/2048)
![GitHub license](https://img.shields.io/github/license/mahmudnibir/2048)
![GitHub Pull Requests](https://img.shields.io/github/issues-pr/mahmudnibir/2048)
![GitHub Code Size](https://img.shields.io/github/languages/code-size/mahmudnibir/2048)
![Platform](https://img.shields.io/badge/platform-linux%20%7C%20macOS%20%7C%20windows-blue)

---
# 2048 Game

> [!NOTE]
This project is intended for learning and experimentation.
---

A modern implementation of the classic 2048 puzzle game, built with HTML, CSS, and JavaScript.

## How to Play

1. Use your **arrow keys** or **WASD** keys to move all tiles
2. When two tiles with the same number touch, they **merge into one** with their sum
3. After each move, a new tile with a value of 2 or 4 appears
4. Create a tile with the number **2048** to win!

## Features

- Smooth animations and transitions
- Mobile-friendly with touch/swipe support
- Score tracking with best score saved locally
- Undo last move functionality
- Responsive design that works on all devices
- Game state preservation
- Clean, modern UI

2048

## Controls

- **Arrow Keys** or **WASD**: Move tiles
- **New Game** button: Start a new game
- **Undo** button: Revert last move
- On mobile: **Swipe** in any direction to move tiles

## Installation

1️⃣ Clone the repository and navigate into it:

```bash
git clone https://github.com/mahmudnibir/2048.git
cd 2048
```
2️⃣ Open `index.html` in your web browser

3️⃣ Start playing!

---

### Technologies Used

- **[HTML5](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5)** – The backbone of the project, ensuring a semantic and accessible structure.
- **[CSS3](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS3)** – Styled with modern techniques like Grid Layout and smooth Animations that make it pop.
- **[JavaScript (ES6+)](https://developer.mozilla.org/en-US/docs/Web/JavaScript)** – Using modern Vanilla JS to keep things interactive and lit.
- **[Local Storage](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage)** – Keeping your scores on lock for that persistent gaming vibe.

---

> [!TIP]
If you find this project helpful, **please consider giving it a star ⭐ on GitHub!** It helps others discover the project.

## Contribution Guidelines

**Want to improve the script?** Contributions are welcome!

### **📌 How to Contribute**
| Step | Action |
|------|--------|
| 🏗 **Fork** | Clone the repo & create a new branch |
| 🔧 **Develop** | Make your changes, write clear commit messages |
| 📌 **Push** | Push to your fork & create a PR |
| 🚀 **Review** | Wait for approval & merge |

## License

📝 This project is licensed under the **MIT License**. See the [LICENSE](LICENSE) file for details.

## Contact
*Developed by [Nibir Mahmud](https://github.com/mahmudnibir)*

**Email**: [nibirbbkr@gmail.com](mailto:nibirbbkr@gmail.com)
**Github**: [@mahmudnibir](https://github.com/mahmudnibir)

---