Note
This project is intended for learning and experimentation.
A modern implementation of the classic 2048 puzzle game, built with HTML, CSS, and JavaScript.
- Use your arrow keys or WASD keys to move all tiles
- When two tiles with the same number touch, they merge into one with their sum
- After each move, a new tile with a value of 2 or 4 appears
- Create a tile with the number 2048 to win!
- 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
- 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
1οΈβ£ Clone the repository and navigate into it:
git clone https://github.com/mahmudnibir/2048.git
cd 2048
2οΈβ£ Open index.html
in your web browser
3οΈβ£ Start playing!
- HTML5 β The backbone of the project, ensuring a semantic and accessible structure.
- CSS3 β Styled with modern techniques like Grid Layout and smooth Animations that make it pop.
- JavaScript (ES6+) β Using modern Vanilla JS to keep things interactive and lit.
- Local Storage β 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.
Want to improve the script? Contributions are welcome!
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 |
π This project is licensed under the MIT License. See the LICENSE file for details.
Developed by Nibir Mahmud
Email: nibirbbkr@gmail.com
Github: @mahmudnibir