A web-based version of the classic 2048 puzzle game built using HTML, CSS, and JavaScript. Combine tiles with the same numbers to reach the 2048 tile. Challenge yourself to reach the highest score!
You can try the game here
- Use the arrow keys to move the tiles.
- Tiles with the same number merge when they collide.
- The goal is to create the tile with the number 2048.
- The game ends when there are no more possible moves.
- HTML5 - Game structure
- CSS3 - Styling and tile animations
- JavaScript - Game logic and interaction
- Smooth tile animations and transitions
- Dynamic score tracking
- Restart button to reset the game anytime
- Sound effects for tile merging and game over (optional)
2048-game/
│
├── index.html # The main HTML file
├── styles.css # CSS styles for the game board and tiles
├── script.js # JavaScript logic for game mechanics
├── merge.mp4 # Sound effect for tile merge
└── game-over.mp4 # Sound effect for game over
-
Clone the repository:
git clone https://github.com/your-username/2048.git cd 2048
-
Open
index.html
in your web browser to start the game.
Watch a full walkthrough of how this game was built on my YouTube channel, Limitless Programmer.
- Add an undo button to reverse the last move.
- Implement a high score system.
- Add more advanced animations for tile merging.