software-mansion / react-native-reanimated

React Native's Animated library reimplemented
https://docs.swmansion.com/react-native-reanimated/
MIT License
8.88k stars 1.3k forks source link

Add 2048 example #6032

Closed tomekzaw closed 3 months ago

tomekzaw commented 4 months ago

Summary

This PR adds 2048 game example.

https://github.com/software-mansion/react-native-reanimated/assets/20516055/db10f66c-707d-4442-959f-ee455fe62bd6

Test plan

Just play the game.

tjzel commented 4 months ago

Are the values added on the UI thread? 🤯

tomekzaw commented 4 months ago

Are the values added on the UI thread? 🤯

Nope, they are added on the JS thread. Primarily, I wanted to use Layout Animations so I need React renders for that.

tomekzaw commented 4 months ago

TODO: fix bug that new tiles are added even though the rest of the board hasn't changed when swiping in the same direction multiple times

mrousavy commented 4 months ago

nice, I can play this on my flight to appjs

tjzel commented 3 months ago

Is the bug fixed? @bartlomiejbloniarz 🙏

bartlomiejbloniarz commented 3 months ago

@tjzel yes!

piaskowyk commented 3 months ago

So, can we merge it, or are we waiting for something?