FormularSumo / Star-Wars-Galaxy-Collection-Web

Website version of the game hosted on GitHub Pages
https://formularsumo.github.io/Star-Wars-Galaxy-Collection-Web/
GNU Affero General Public License v3.0
2 stars 0 forks source link

Graphics performance is sometimes considerably worse than native apps #9

Open FormularSumo opened 1 week ago

FormularSumo commented 1 week ago

Graphics performance on non-iOS platforms seems to be between 1/4 and 4/5 of the native app. For most users this shouldn't matter too much, as the game is very easy to run, but those on lower-end hardware might notice an improvement in the native app. CPU usage, memory usage and load times are a little higher as well but not by as much. The game is pretty light on CPU and memory anyway so shouldn't make much difference (much more likely to be GPU bottlenecked). I don't think there's really anything I can do about this, it's just dependent on Love.js and your browser/OS.

Graphics performance on iOS specifically (unsure about Safari desktop, but Gnome Web on Linux is same as other browsers there) is awful - about 41x worse than Firefox/Chrome on Android, or ~164x worse than running natively. It's only about playable on high-end devices unfortunately.

I don't think either of these are issues I can do that much about. I could definitely do some more testing/proper writing up of the figures, and check if there's anything in particular slowing does iOS Safari (reminds me of https://github.com/FormularSumo/Star-Wars-Galaxy-Collection/issues/35 - maybe turning back on for web could help??), but unless I can find anything I think I just have to put it down to things outside of my control. Could be worth reporting the issue with iOS Safari to Love.js, but officially the project is only tested to work on Chrome and Firefox I believe.

Note: minor label is for non-iOS platforms, major is for iOS.

FormularSumo commented 5 days ago

I've done some initial work on reducing draw calls, which has yielded around 2x the FPS running on iOS. Still a ways to go before it becomes playable but progress nonetheless.

FormularSumo commented 3 days ago

image image image love.graphics.getRendererInfo() on native vs web.

image image image love.graphics.getSupported()

Possibly related with either performance or #12

FormularSumo commented 2 days ago

Final performance improvements from batching draw calls on iOS Web: Maxed vs auto: 14/11 -->31/31 (+121/182%) Deckeditor: 14 -- > 26 (+50%)

So gone from just about playable, to playable, but still not good. More testing needed, including messing around with push.lua, testing only drawing certain parts of the game etc. Planning on making a test repo/site so I can do this and other projects without disrupting the functioning of the main one.