-
Notifications
You must be signed in to change notification settings - Fork 7.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance Issue on low end mobile devices #6989
Comments
Doubt it's anything to do with the animations or tweens. Far more likely a hardware constraint. What resolution is your game running in? What resolution are the textures being animated? That is where you should look first with all performance issues. |
It is currently running on 720 resolution, I also tried to run in 480 resolution but it didn't help |
Let me try again - what's the exact size you have configured the canvas to be in your game config? It makes a massive difference. |
width of game is 720, and the height is 1240.16. Moreover this is the config of the game - |
Description
I'm using Phaser 3 to create a board game that runs on Android's Chrome Web View. On low-end mobile devices (I've been testing on a Samsung Galaxy M04, https://www.gsmarena.com/samsung_galaxy_m04-12022.php), I'm experiencing a specific performance problem with an animation. At times, the animations feel laggy/jerky. According to my observations, one of the instances is when one of my animations jerks is when several animations are playing simultaneously. Other animations playing simultaneously include change in textures of some images, some graphics running, and a tween chain.
I am using Phaser.Auto (which in turn uses WebGL) as it seemed more smooth to me as compared to CANVAS.
Tried many config changes, optimisations like (autoRound, altialias) but nothing seems to work for me. (there were some improvements with reducing asset sizes and setting fps target to 30 fps but still I can feel jerk in some cases)
The animation which particularly feel jerky is -
scene.tweens.add({ targets: target, props: { x: { value: positions[positions.length - 1].x, duration: animationTime * positions.length, }, y: { value: target.y - gridBlockWidth / 8, yoyo: true, duration: animationTime / 2, repeat: positions.length - 1, ease: "Cubic.easeInOut", }, }, onComplete: () => { callback(); animation.stop(); animation.destroy(); }, });
where positions is an array containing x and y position of target.
I also tried using tween chain instead of yoyo for y animation but it feels more laggy than this one.
Any help would be deeply appreciated.
The text was updated successfully, but these errors were encountered: