Issue
Hey guys i have a question Why a game like fortnite on mobile and pubg on mobile with a realistic graphic run 60fps But my game in react native who just use picture to show some card run 30fps Why?!!!😂 I dont know why
I just use react native navigation for my scenes and a flatlist to show a list with 4 to 200 cards and every card have unique picture who load localy
Next time I will add a Lottie animation, it will drop a lot
I use flash list but not working well beacuse my game need to choose cards and when scroll down and up flash list dont remember who card selected and crash all of game
Solution
Well, below I wrote down some reasons why this is happening:
- Fortnite and PUBG were created for mobile platforms, which gives them direct access to hardware;
- React native was created for creating a native user interface rather than for making games;
- the mentioned games (I'm convinced) were created in low-level programming languages that are significantly faster than JS;
- graphics in these games often use advanced rendering techniques, such as GPU acceleration;
- the bridge between JavaScript and native modules in React Native can introduce latency, impacting performance, especially in scenarios where real-time responsiveness is crucial, as in games.
To create games, I would suggest using at least an existing engine created for this task, e.g. Unity or Godot.
Regards!
Answered By - Mateusz Szostek
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.