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!
- Host: GitHub
- URL: https://github.com/mahmudnibir/2048
- Owner: mahmudnibir
- License: mit
- Created: 2025-03-14T16:57:09.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-04-02T08:36:42.000Z (7 months ago)
- Last Synced: 2025-04-02T09:29:20.358Z (7 months ago)
- Topics: 2048, css, html5, javascript, web-game
- Language: JavaScript
- Homepage: https://mahmudnibir.github.io/2048/
- Size: 546 KB
- Stars: 11
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README









---
# 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
## 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 browser3️⃣ 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)---