Profiling: Is most time in V-Sync good?

Hello!

I am a making a game for mobile and after some optimization I have the following graph in the profiler:

This run was made on my iPhone 8 with targetFramerate set to 60.

As you can see most of the time my game is in VSync. Now I wonder if this is a good or bad thing?

Thanks for help!

If nothing is wrong with the hardware/configuration/profiling data, then yes, it’s actually really good. VSync simply means that the app is done rendering and waits for the next frame to be presented to the screen in order to start working on a new one.

Thanks for your reply! I was not sure since I set targetFramerate to 60 even though a lot of people said you should set it to 30 on mobile.
So I guess 60fps is ok in 2021

targetFramerate doesn’t do much when VSync is engaged. If you use VSync, then the app will try to target it as a refresh rate. That advice still holds water, but if you use VSync, then you should set the VSync count to 2 (so the app would target 30 fps on a 60 Hz display).

On iOS vsync is always engaged, setting vSync is pretty much useless: you have to set the targetFramerate.
You can run at 60fps, but your worst enemy on mobile is actually thermal constrains. Modern iPhone hardware is extremely capable and you can push some impressive graphics, but you can overheat the device quite easily and thermal throttling will kick in and hurt your frame rate badly.

Running at 30fps basically halves the thermal impact, so sometimes it’s better to run at a lower frame rate to avoid throttling and preserve battery life.

Thanks for your input.

Now I am confused. Initially I tried 30fps but the game did not look smooth at all. It feels much smoother on 60fps.

Now it feels like I can only lose. When I pick 30fps I avoid potential thermal throttling but the game ALWAYS feels a little bit sluggish. Setting it to 60fps it feels better while the phone is not hot, but when it becomes hot it probably feels even worse than 30fps?

I have read some posts about this but most of them are more than 5 years old. Whats the general advice for targetFPS on mobile in 2021?

Is your phone overheating when you play your game?

If not, don’t worry about it. 30fps mode can be left in as a battery saver option if you want to let people use it, but the fact most of your frame is already waiting on VSync is a good indication that overheating might not be a problem. That assumes the GPU is also mostly waiting on VSync though…

No, I played my game for like 10 minutes on my iPhone 8 and it never got hot.

Currently I am using this strategy to run on all devices:
When the game starts I check the RAM size of the device and if RAM < 1 GB I assume its slow hardware and I turn off shadows, a blur effect and set targetFrameRate to 30. If RAM > 1 GB I leave all effects on and set targetFPS to 60.
Do you think thats an reasonable approach?

I think for devices that run on 60 fps I will add an option to let the user lower the targetFPS to 30 fps (because I fear there might be a device with > 1 GB RAM but still crappy hardware)

shrug Sounds reasonable. The massive range in hardware out there makes it really hard to know exactly how to dynamically set the quality of your app. Big studios either have a massive collection of test hardware from a wide range of specs, and/or have enough auto data reporting built into their application that they can see what devices are having a hard time and update the app’s quality settings for those devices accordingly.