My game ShapeShifter is coming along great, will be out on Android and PC sometime 2021.
I've been struggling quiet a lot with the performance on Android for it.
Here's some information about my struggle:
At first performance was horrible on Android, I optimized as following:
* Enabling and disabling groups of events at run time
* Tried reducing alpha channels in favor of more transparent color. Made no performance difference so I reverted back to alpha channels as they look nicer (and, all my graphic assets are originally created with alpha channels).
* Nested events are used as often as possible
* Fusion movement is used whenever possible, instead of x & y code repositioning.
* Disabling movement, animation and collision testing wherever possible, via the Fusion options and sometimes by code. Every moving enemy on each level is tested for near-screen presence, and marked "Active" or "Non-Active". Complete code parts are ignored if the moving enemy is not on screen.
* All sounds were degraded from mp3's to 96kbps ogg's. All level's background music was reduced in track time from 3:30 full melodies to 1-2 minutes cut melodies.
* Every other way to optimize that is written somewhere on the internet, blogs and forum posts - you name it, I tried it.
This *TRIPPLED* the performance on Android, but it's not enough.
Current status:
* It runs silky smooth on top notch flag ships and some mid-range devices that are 2-3 years old.
* It stutters and suffer fps drops on mid-range devices that are older then 3 years old.
* It slows down and suffer fps drops on almost every low-spec device, even current ones that was released lately.
Here's a test I made, and a very weird result
I've made a 60 > 30 fps option on the menu of the game, to allow mid-range devices to play at lower frame rate, with no slow downs. This resulted in a very very very weird outcome - a device that runs it 40-60 fps on the 60fps version of the game, runs it 20-30 fps on the 30fps version. The expected thing to happen is that a device that suffers frame drops that are higher then 30 on the 60fps version, will run the 30fps version on stable 30. If someone can explain this phenomena, I would greatly appriciate it.
Second test that is very interesting
I installed "Jungle Advantures 2" and "Jungle Advantures 3" on my oneplus 3t, a game that is VERY SIMILAR by nature and complexity to my game, it runs silky smooth. There's no fps counter but I can sense the phone breezes through it at ease on 60fps.
*The same device* runs my game on 40-60fps on the 60fps version, and 20-30fps on the 30fps version.
This test raises the questions:
Is it my fault? Is there anything else I can do to match the performance of other games on Android to my game?
Third test - no sounds = smooth performance
I tested the game with no sounds at all, just deleted all actions with sounds playing, and it's now nearly completely smooth on 60fps on the oneplus 3t. I left one sound effect by mistake - a "boom" sound when you hit an enemy - and there's a minor stutter and fps drop whenever this sound is playing. Can this be fixed?! :-O
This 2 minutes video summarizing and demonstrating everything I said, I'd like to hear what you think, thanks in advance!
https://www.youtube.com/watch?v=nP-nyZqP3aA