This project is a clone of famous game 2048 developed by Gabriele Cirulli in react native. I tried to copy everything including colors, fonts and animations. 2048 is a very fun game which always intrigued me. To play, just swipe around the board to move the tiles and combine them to reach 2048!
Check the video of game
To be frank, I wanted to test my skills with Animation and Gestures using react-native-reanimated
and react-native-gesture-handler
and I always liked this game. To my suprise the animations were quite easy to create and much of my time went into writing code for the Game logic (which I changed from the actual one).
The logic I wrote for game might not be the best one, or the fastest one, but I wrote it keeping in mind how to animate cells. The only other clone (Check this repo by @liuhong1happy) I found of 2048 in React native on github was over 7years old, so I thought why not.
react-native-reanimated
: Excellent library for animations in React Nativereact-native-gesture-handler
: You alreasdy know and use this library in your projectsexpo
- Expo is the way for React Native Projectsexpo-fonts
- To load custom fonts used by official website.Clear Sans
Font - Developed by Intel, this is the font used on official website.
The font is licensed under Apache 2.0 License, which afaik is similar to MIT license, if however you feel I've violated your copywrite, let me know and I will remove the font files from repository
Great news! If you found a bug, please open an issue. I would try to resolve it. If you want to contribute, yay! open a pull request and I would happily review and merge it.
-
Official 2048 links:
- Play on official website
- Official App on App Store and Google Play Store
-
Clear Sans is a font developed by Intel, you can check the official repository
-
For the official colors refer to constants.ts file