Open achubutkin opened 3 years ago
Interesting, are you able to give a quick test in beta 199 that was just released? PixiJS was upgraded in beta 118 and this may have a good effect on this.
@4ian Thank you for response. Unfortunately, in the 119th version it remains.
Probably, I`ll should to do open an issue for PixiJS. But then the following research results are unclear:
Next, we have two popular "bunny test"s for PixiJS:
Results for test number 1:
Results for test number 2:
At the moment, we are trying to understand what error the engine repeats from test number 2, which results in a drop in FPS in iPhone 6 devices.
As I said above, now we can fix it with setting cacheAsBitmap property as true, but it may be applying only for static tiles in a game.
Thank you @achubutkin, I used your function in my game and it helped a lot!
Hello, thank you very much for this workaround. I experienced the same issue for my game and now it works fine on iOS, like on macOs safari browser.
Sympthoms
Performance (frames-per-seconds) in iOS immediately drops if you add several sprites (from 5 and higher).
If we add 1-3 tiled sprites, then the performance in iOS and Android (Safari and Chrome) is approximately the same. However, if you add more sprites, from about 10 and more, then the performance in iOS immediately drops.
The Android remains at the same level.
Performance measured in frames-per-seconds:
A little workaround
But, if we apply the following code to all the sprites that we will have static (without animation, filters), then there will be no performance problems in iOS.
Performance measured in frames-per-seconds after the fix:
Environment
iOS 12.5.5 iPhone 6 Plus, full battery, reloaded, cleared memory & background processes Android 10 Mi A2 Lite, full battery, reloaded, cleared memory & background processes
GDevelop 5.0.0-beta117
Screenshots&Demo with sprites and fixes in the attachments.
P.S. This may not be a bug, please consider this as an invitation to discuss the issue. Perhaps I missed something. Thanks!
Demo game
ios-perf-issue.zip
Screenshots
After applied the fix