Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

IOS AppPreview 60FPS

Discussion in '2D' started by JosephMGS, Nov 5, 2019.

  1. JosephMGS

    JosephMGS

    Joined:
    Nov 5, 2019
    Posts:
    20
    Hi,

    I’m trying to upload a video preview to ios appstore but my video is 60fps it is is not accepted (it says 30 fps is max limit)

    So far I’ve been okay with running my game at 60 fps with no problem but when I force to run it at 30 fps, my game simply stutters. As I look through other app videos (e.g. Ketchapp games) I dont see any stuttering or jittery movement which makes me to think that all those games run smooth on 30FPS.

    Is my assumption correct? So I guess I need to optimize my game if I want to run smooth at 30FPS.

    Thanks
     
  2. Patu

    Patu

    Joined:
    Nov 2, 2019
    Posts:
    9
    If your game is designed to run at 60fps and always achieves 60fps on all possible target hardware setups (which is usually unlikely tbh), then I would not worry about it too much. But it does indicate a problem somewhere in your game (though it is impossible to tell you where, since we don't know your game at all).

    Some pointers:
    How did you limit the fps?
    Have you touched the time steps? (Edit > Settings > Time > Fixed Timestep)
    Are you making proper use of Time.deltaTime?
    Do you do your physics calculations in FixedUpdate() or Update()?

    As a quick workaround: Why don't you just run the game normally at 60fps but record gameplay at 30fps (dropping every 2nd frame)?
     
  3. JosephMGS

    JosephMGS

    Joined:
    Nov 5, 2019
    Posts:
    20
    Hi Patu,

    Thanks for your reply. To keep it simple here is a sample scene with moving sprite upwards. There are 3 sceneraios;

    1. Fix the frame rate to 30FPS by Application.targetFrameRate and set VSync Count to Don't sync = Stutter
    2. Set VSync Count to Every V Blank to ignore Application.targetFrameRate and run at 60FPS = Smooth
    3. Run the game at 60FPS as in scenario 2 and record at 30FPS = Stutter (It is normal because I eliminate every 1 of 2 frames now in recording)

    So why Apple restricts me to upload a video preview having maximum 30FPS? What I understand from this limitation is that every mobile game should be able to run smooth at 30FPS. Is it correct or do I miss something very basic? Or do I really need to use some interpolation, lerping etc?

    Thanks

    Below is the script of the scene;
    Code (CSharp):
    1.     private void Awake()
    2.     {
    3.         Application.targetFrameRate = 30;
    4.     }
    5.  
    6.     void Update ()
    7.     {
    8.         transform.position = Vector3.MoveTowards(transform.position, new Vector3(0, 7, 0), 5 * Time.deltaTime);
    9.     }
     

    Attached Files:

  4. Patu

    Patu

    Joined:
    Nov 2, 2019
    Posts:
    9
    Thank you for the additional information.

    1. I can not answer any question regarding Apple (and this is really not the correct place for that anyways)
    2. 30 FPS will always look a bit choppy to most people. Movies get away with low fps because if you look at single frames of a movie you will notice how blurry that singular frame is, which will make everything look smoother. In a game you will usually have crisp frames, which make lower fps more apparent.
    [I personally hate 30fps in games, because even when perfectly vsynced it will feel stuttery to me]
    3. Try setting VSync to "Every Second V Blank", which will VSync to half refresh rate (so if your device is 60hz it will sync to 30hz)
    4. Is your game running at the same resolution as your gif (360 × 640)? Low resolution, low framerate and fairly quick movement will quickly look choppy, because there are only so many pixels you can work with and blending subpixels will become difficult.
     
  5. JosephMGS

    JosephMGS

    Joined:
    Nov 5, 2019
    Posts:
    20
    Hi Patu,


    Thanks for your reply. I don’t want to take your time more but I want this topic to help anyone having the same question in mind. I appreciate your feedbacks. So my answers;


    1. I don’t think we should consider this as Apple’s way, Apple’s problem. So if Apple has such a requirement then I think why my Unity game does not run smooth at 30FPS and this is where I begin to dig more. The more I investigate the more I learn Unity. It should not be ignored just by running the game at 60FPS.

    2. As you said movies already run smooth at 24FPS. Could Unity Motion Blur techniques be what I’m looking for? Because as the speed decreases the stuttering goes away.

    3. Every Second V Blank: Still stuttering

    4. I’ve just quickly prepared the GIF to illustrate the scene. However the situation is just how I explained on my 750x1334 pixel Iphone 7.


    Please check the below topic also having same issue. The game runs smooth when I install on my phone but the app preview stutters. However if you check some Ketchapp games (Flippy, PenRun etc.) having fast moving objects their app previews do not have such stuttering. Could this problem be irrelevant with the game itself but related to some special techniques of rendering while the game is recorded at 30 FPS? Thanks.


    https://www.reddit.com/r/iOSProgram...nyone_tell_me_why_the_appstore_preview_video/
     
  6. Patu

    Patu

    Joined:
    Nov 2, 2019
    Posts:
    9
    1. I'm not talking about this topic in general, but question like "So why Apple restricts me to upload a video preview having maximum 30FPS?" still don't belong here, because this is no Apple forum and nobody here will be able to answer you.
    2. Sure, that could definitely work. I would look for (or write) an appropriate shader.
    3. Was to be expected, but at least it properly Vsyncs to 30 now.
    4. Okay
    5. I'm no video editing expert, but there has to be a way to "merge" 60 fps into 30 fps. Instead of simply dropping every other frame you could merge it into the other frame, which you didn't drop, to add some form of blending (essentially a blur) between two frames.

    Hope you find a way to fix the problem (or work around it :D)
     
  7. JosephMGS

    JosephMGS

    Joined:
    Nov 5, 2019
    Posts:
    20
    Hi Patu,

    Thanks for you feedbacks. I believe I need to study on shaders much more :)