Thanks for checking out this bachelor's degree project.
(More screenshots down below)
The 2048 Game, is a single-player sliding tile puzzle video game written by Italian web developer Gabriele Cirulli and published The objective of the game is to slide numbered tiles on a grid to combine them to create a tile with the number 2048, however, one can continue to play the game after reaching the goal, creating tiles with larger numbers.
- The source code is publicly visible for evaluation purposes only and may not be reused without explicit prior permission.
To run the 2048 Game
npm install
npm run startThis will start the development server.
You can run the application in two different ways:
1. Using iOS Simulator or Android Studio Open iOS simulator from Xcode or an Android emulator from Android Studio and run the project. The app will automatically connect to the local development server.
2. Using your physical phone If you want to run the application on your own phone, you just need to scan the QR code after the npm start.
Current functionalities :
- Game board initialization with a 4×4 grid
- Generation of two random tiles (2 or 4) generated at the beginning of the game and after each move
- Tile movement in four directions: left, right, up, and down
- Sliding mechanism that moves the tiles until they reach an obstacle
- Merging system for adjacent tiles with the same value
- Merged tiles double in value and merge only once per move
- Scoring system that accumulates points based on the merged tiles, a better score is also present.
- Detection of a won or lost game
- Several alerts have been set up: upon victory, upon defeat, and when one wants to restart a game.
- Action buttons: "Menu" which displays the menu modal with navigation options, "Undo" which allows undoing the last move made, and "Restart" which allows starting a new game.
- Data persistence: current grid, previous grid, current score, previous score, and best score
- Optimization of rendering performance and reduction of visual issues on mobile
Futures functionalities :
- Project splitted in screens with HomeScreen, GameScreen, ProfileScreen
- Add some animations for the tiles movements
- Using SQLite to persist data
- Dark/Light theme
- Ranking implementation thanks to a REST API
Stacks used :
- React Native (Zustand, Expo)




