- Home /
Low fps in simple 3D android game
Hello everyone!
I have a common problem but unfortunately after a long time in google i could not find the right answer for me. There is simple 3D scene (check screenshot1 below):
Shadows completely disabled
No PP effects
Occlusion oculing enabled
Quality setting set to the minimum (check screenshot2 below)
No scripts in scene
Multhreading rendering, dynamic and static batching enabled(all static game objects marked as static too)
No shaders or "heavy" materials
Using IL2CPP
Camare rendering path : forward
Full scene imported form 3ds Max in FBX format.
(screenshot1): https://ibb.co/gmLZJw5
(screenshot2): https://ibb.co/WH6BM9b
Camera view: https://ibb.co/WcXnJQm
And profiler screenshot:
As result i have ~50fps. My phone: Snapdragon 636, 4gb ram.
I know that I'm doing something wrong because Ii know a lot of games from market with a much bigger scene and I have stable 60 fps all the time (games created with Unity).
Please, someone, help me :). Thanks
you need to share the profiler screenshots of the android build check the android section https://docs.unity3d.com/540/Documentation/$$anonymous$$anual/Profiler.html if its just a test project feel free too upload it somewhere like github so we can check it
It is possible to check directly the performance of the gpu from the profiler.
If you go in the profiler window, at the top left, click on "add profiler" and then select "GPU" from the dropdown. This allows to see what takes what amount of performance on the gpu to process. (note that you first have to go to the player settings, "other settings", then in the "rendering" section disable "Graphics job (Experimental)" or GPU profiling does not work)
Other thing that might be useful, is the "frame debugger" window that lets you see all the steps the gpu goes through to draw what is displayed on the screen. To open it go to "Window" (at the top of the unity editor) and near the bottom of the dropdown menu (at least in unity 2018.1) search frame debugger and open it.
Passes (operations) are displayed from top to bottom and the game is paused while using it (the images are displayed on the screen phone, not in the editor). Unity manual page for the frame debugger [here][1] (requires "$$anonymous$$ultithreaded Rendering" to be enabled in Player settings>other settings> rendering)
[https://docs.unity3d.com/$$anonymous$$anual/FrameDebugger.html][1]
Thought markdown would work for comments too... Link:
https://docs.unity3d.com/$$anonymous$$anual/FrameDebugger.html
i doubt he has a fps issue, his profiler looks completly fine and its showing no performance issues at all, most likely he is having other issues that gives like a low fps look or he got the fps wrong
Answer by hameed-ullah-jan · Sep 11, 2019 at 09:57 AM
check your scripts, i think you wrote a lot of code in update or fixed update function, avoid complex calculations inside update and fixed update, try to minimize the use of these such functions. from the screenshot of profiler you can see the use of update and fixedupdate.
Thanks for your answer. Actually i don't have any scripts in my scene. That was wrong screenshot sorry. Please check updated link to new screenshot
did you read my comment? you need to share the profiler of the android version since you are sharing a version with almost no bad performance at all, almost all due to the editor
Sorry about that. I've changed the link. Please check it out
Answer by JonPQ · Sep 12, 2019 at 03:52 PM
check your overdraw... most mobile games are easily throttled performance by overdraw (that means drawing the same part of the screen over and over again).. e.g. clear the whole screen, then draw a floor (over the whole screen again) then draw a large building...over a large portion of the screen again.... If you are drawing a floor, turn off the clear from the camera, set it to clear depth buffer only. If your floor is a flat color... turn it off and just use camera clear. if you have to draw the floor... try to not draw under the buildings... just draw the streets. You can visualize overdraw in scene view, from the drop down in top left corner.
Draw calls... aim for <100 on mobile. (click that "stats" button and check what you have)
Also drawing transparency mode (textures with alpha) is also slow.... make sure you are using diffuse(opaque) shaders wherever possible.
Also lighting makes a huge difference... avoid spot lights and point lights... try to stick to one directional with ambients if you can. If you are using low poly look.... you can turn off per pixel lighting, and just use vertex lighting.
If you don't need fog... make sure its disabled. another small increment... 16 bit z buffer instead of 32, might help a tiny bit.
It doesn;t look like you have textures.. but if you do... keep them smallish/appropriate sized for how big the appear on screen.... basically keep reducing their size until you start to see quality degredation, and stop there.
also when building to your device, make sure you are not in Developer mode. and make sure you have your debug logging turned off.... logs are sllllloooow !
Answer by LilGames · Sep 13, 2019 at 11:13 PM
Check sounds settings too. People overlook this but some sound configurations can interrupt performance if continuously decompressing on play and being called often.
good point. try changing them all to "decompressed in memory" to see if the frame-rate drops go away.
Your answer
Follow this Question
Related Questions
Android & IOS Performance Difference 1 Answer
Does rendering the game at lower resolution consumes less power on Android? 1 Answer
Why is there a performance discrepancy between LG G4 and iPhone 6s 0 Answers
Advice needed for making a pre defined course runner game 0 Answers
Lot of resource files 1 Answer