A modern implementation of the classic 2048 puzzle game built with Pygame. Challenge yourself to create the 2048 tile while enjoying features like score tracking, game statistics, and local high scores!
- 🎮 Smooth, responsive gameplay
- 📊 Real-time score and moves tracking
- ⏱️ Game duration monitoring
- 🏆 Local high scores system
- 💾 SQLite database for game statistics
- Python 3.8 or higher
- Pygame
- SQLite3 (included in Python standard library)
- Clone this repository:
git clone https://github.com/ajitashwathr10/2048-py.git
cd 2048-py
- Install the required dependencies:
pip install pygame
- Run the game:
python main.py
- Use arrow keys to move tiles (⬆️ ⬇️ ⬅️ ➡️)
- When two tiles with the same number touch, they merge into one!
- Create a tile with the number 2048 to win
- Game over when no more moves are possible
The game automatically tracks and stores:
- Your score
- Maximum tile achieved
- Number of moves
- Game duration
The game uses SQLite to store two types of records:
- Complete game sessions
- Includes score, max tile, duration, and moves
Feel free to contribute to this project! You can:
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
- Original 2048 game by Gabriele Cirulli
- Pygame community for the excellent game development library
- Contributors and testers who helped improve this implementation