Search Unity

2D game not going below 60fps on iOS, but is still stuttering. Why?

Discussion in '2D' started by jakekosmom, Sep 9, 2017.

  1. jakekosmom

    jakekosmom

    Joined:
    Mar 17, 2016
    Posts:
    4
    Hi,
    I have been working on a 2D game with moving obstacles (similar in style to flappy bird), however every now and then the obstacles stutter back and forward (jerking back and forward). I can notice this both on PC and iOS builds and cannot for the life of me figure out the cause.

    I have moved the obstacles in multiple different ways (i.e. with transform.Translate, rigidbody.velocity in Update, FixedUpdate and LateUpdate, multiplying my speed by Time.deltaTime, Time.fixedDeltaTime and even Time.smoothDeltaTime), but the stuttering is still noticeable every 2-3 seconds or so. My best results have been achieved with:

    transform.Translate(Vector3.left * moveSpeed * Time.smoothDeltaTime);

    I have noticed that the stuttering seems to correlate with adding force to my Player with AddForce and moving TextMeshProUGUI objects, but it can also happen when not doing this.

    Worst of all is that I can't seem to spot anything in the profiler (used on a iPhone SE) that would cause this, as the frame rate hovers around 250fps.

    Can anyone see anything in these profiler screenshots that would indicate why this could be happening or have any ideas that may help? I am open to anything at this point and need to fix this in order to release my game.. finally haha.

    Thanks,
    Jake

    Here are the screenshots:

    Screen Shot 2017-08-20 at 6.53.43 pm.png Screen Shot 2017-09-09 at 3.58.51 pm.png Screen Shot 2017-09-09 at 3.58.12 pm.png Screen Shot 2017-09-09 at 3.55.07 pm.png Screen Shot 2017-09-09 at 3.54.53 pm.png