A fun and addictive 2048 sliding puzzle game built with JavaScript, OOP concepts, and SCSS. Enjoy smooth animations, sound effects, and a modern UI as you combine tiles to reach 2048!
- ✅ Fully playable 2048 game
- ✅ Smooth animations with SCSS
- ✅ Built with JavaScript using Object-Oriented Programming
- ✅ Sound effects for tile movement and merges
- ✅ Score tracking and high-score memory
- ✅ Mobile and desktop friendly
- ✅ Responsive and intuitive design
- JavaScript – Game logic and OOP architecture
- SCSS – Smooth animations and styling
- HTML5 – Structure and layout
- Use arrow keys (or swipe on mobile) to move tiles.
- Combine tiles of the same number to create higher-value tiles.
- Your goal: reach the 2048 tile!
- Try to get the highest score possible.
- Classes for
Game,Movement, andScore - Encapsulation of tile behavior and game logic
- Methods for movement, merging, and score updating
- Event handling for user input and sound effects
- Tile move sound
- Background music
- Win sound
- Game over sound
Sounds are triggered programmatically using JavaScript’s Audio API for an interactive experience.
Follow these steps to get the 2048 game running locally on your machine:
Open your terminal and run:
git clone https://github.com/aiiyuu/2048.gitThis will download the project to your local machine.
Change directory into the cloned repository:
cd 2048You can now start the game:
npm startOr simply open the
index.htmlin your browser.
The game should now be running in your browser. Use arrow keys (or swipe on mobile) to move tiles and try to reach 2048!
Made with 💖 by Nazariy Holovach
