Block Breaker Building to different Android Devices Stuttering Issue

Hello,

I was testing the performance of the Block Breaker game on different Android devices. It runs buttery smooth on my laptop and my OnePlus 3T android device, but it has terrible stuttering in my Galaxy Tab A and Galaxy J7. Please help me understand how I can fix the issue. I have tried the following fixes:

  1. Turning on Interpolate on Rigidbody 2D of the Ball gameobject.

  2. Setting the ball velocity inside FixedUpdate()

    private void FixedUpdate()
    {
    myRigidBody2D.velocity = myRigidBody2D.velocity.normalized * ballSpeed;
    }

  3. Using Time.deltaTime for motion of both Paddle and Ball.

  4. Changing fixedDeltaTime to 0.005.

Please note that I had initially designed the game in (1920x1080) 16:9 aspect ratio and using the following function to Scale the Camera on different devices:
public void ScreenAdjust()
{
Camera.main.aspect = 1920f / 1080f;
}
Could this be the reason for stuttering? If yes, what could be the possible solution?

Hi Tanya,

Unfortunately, developing games for mobile platforms is not part of this course, and neither is performance optimisation.

Your OnePlus 3T has got much more RAM (6 GB) and is faster (2.35 GHz) than your Galaxy Tab A (2 GB, 1.6 GHz).

The first thing I would do is to set the fixedDeltaTime back to the initial value. Then I would open the Profiler in Unity and look for potential problems. You could start with setting the Quality Settings to the lowest possible option, test the build on your slowest device.

Instead of instantiating new AudioSources with AudioSource.PlayClipAtPoint, you could attach an AudioSource to your camera and play them whenever a block is supposed to make a sound.


See also:

Hi Nina,

I’m thinking about similar issues as Tanya. Could you recommend some course or other resources where building for mobile platforms is discussed in more detail.

Thanks!

Hi,

Have you already looked for tutorial videos on Youtube? You can also find lots of blog articles on that topic and discussions. If you need a course, look for one on Udemy and read a few of the positive and the negative reviews. Unfortunately, I cannot recommend you any because I do not know much about game development on mobile platforms.

Please feel free to ask our helpful community of students for advice in our official Discord chat.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms