- Home /
Problem with Android Framerate Dropping
HI I am developing a game called Luminous for Android. From the second I released the game to the play store the game has been suffering some major framerate issues. I can't seem to find he source of the lag. I have tried disabling most of my code to see if it was some code optimization problem, I disabled audio, I got rid of the dynamic backgrounds and I have also tried to compress and preload all of my assets. Nothing!
The weird thing is, the game will run fine at about 20-30 frames a second until the app runs for longer than 2 minutes. Then all of the sudden, 5-10 frames a second. The device will even lag a little after the app closes. I have done some control tests to see if this was just a hardware issue but this happens on ALL devices it seems. Please help, this issue is causing so many to uninstall my game.
I am willing to offer samples of my assets and settings if you want to try to help, thanks in advance.
Answer by liortal · Jul 16, 2016 at 11:07 AM
There are tools available to help you diagnose these issues. I would start with the Unity Profiler. You can profile your game running on the target device. This should give you a basic idea of what's going on and what is causing the slowdown.
In other cases, where the profiler does not find the cause for performance issues, you can use vendor specific or native Android profiling tools to better understand performance problems with your game / app.
@liortal I have a similar problem. I've tried the profiler and still can't find the solution to my problem. Where can I find such tools for native Android profiling?
Are you sure the issue can't be found using Unity's profiler ?
You can have a look at this page which summarizes some of the available profiling tools for Android: https://developer.android.com/studio/profile/index.html
Also, to quote a reply by Yury Habets, a developer from Unity:
Every vendor has its own tools for CPU/GPU profiling. Intel vTune is good. Can do basic profiling of all devices. In-depth Intel GPU profiling. (the whole suite can have different name at the moment) nVidia has nice tools, work with latest nVidia only: https://developer.nvidia.com/gameworks-tools-overview I’ve used perfHUD ES. PVRTune is another option. We embed their library (PVRScope) in Unity dev build to enable integration. Other tools: Qualcomm tools. For system-wide trace, you can use systrace: https://developer.android.com/studio/profile/systrace-commandline.html Is not very detailed, but shows some interesting info about thread scheduling. Some very basic performance tools are available in Android monitor.bat.
Answer by LastSipahi · Aug 19, 2016 at 06:54 AM
What you are describing is overheating. Most of the modern Snapdragon devices lowers CPU or GPU clock after reaching a certain value. Are you doing too much physics in your game? Do you have lot of light calculations? All of these and more will force CPU and GPU to generate excessive heat.
Your answer
Follow this Question
Related Questions
Unity Android lag when close to terrain 0 Answers
Frame Rate Issue 2 Answers
Android lag on Nexus 7 (2012) 0 Answers
iPhone and Android difference? 0 Answers
Odd frame buffer swap timing in Android with VSYNC ON 0 Answers