Share via

How can I find out if my game is running at constant 60 frames per second without stuttering?

Kim Strasser 2,416 Reputation points
2026-04-12T20:31:28.47+00:00

Sometimes my game randomly stutters in debug mode on my iOS/Andoid devices. I don´t know if it stutters more frequently on my iPad Air or on my Android phone and I don´t know if it stutters in release mode.

How can I find out if my game is running at constant 60 frames per second without stuttering? How can I find out why my game is sometimes stuttering?

Developer technologies | .NET | .NET MAUI
0 comments No comments

3 answers

Sort by: Most helpful
  1. Nancy Vo (WICLOUD CORPORATION) 2,655 Reputation points Microsoft External Staff Moderator
    2026-04-13T09:32:03.57+00:00

    Hello @Kim Strasser ,

    Thanks for your question.

    Debug mode adds extra checking tools, so stuttering is more common. Release mode is the clean final version your users will play -> usually much smoother.

    First, I suggest measuring first, then fix.

    Step 1: Add a live FPS counter.

    Add this small label in your game page code-behind. It will show the real-time frame rate while you play. This is code example:

    private int frameCount = 0;
    private DateTime lastFpsTime = DateTime.Now;
    private Label fpsLabel;
    
    public YourGamePage()  // Constructor - sets up the page
    {
        fpsLabel = new Label
        {
            Text = "FPS: --",
            FontSize = 20,
            TextColor = Colors.White,
            BackgroundColor = Colors.Black.WithAlpha(0.6f),
            HorizontalOptions = LayoutOptions.Start,
            VerticalOptions = LayoutOptions.Start,
            Margin = new Thickness(20),
            ZIndex = 999
        };
    
    }
    
    private void UpdateFps()
    {
        frameCount++;
        var now = DateTime.Now;
    
        if ((now - lastFpsTime).TotalSeconds >= 1.0)
        {
            int currentFps = frameCount;
            fpsLabel.Text = $"FPS: {currentFps}";
    
            if (currentFps < 55)
                System.Diagnostics.Debug.WriteLine($" FPS dropped to {currentFps} — possible stutter detected");
    
            frameCount = 0;
            lastFpsTime = now;
        }
    }
    
    • Call UpdateFps() every time your game redraws (For ex: after Invalidate() on GraphicsView, after PaintSurface in SkiaSharp, or at the end of your game loop).
    • Run the game on your iPad Air and Android phone in both Debug and Release mode.
    • Watch the number: If it stays steadily around 60 with almost no drops, you're good. Random drops below 55 usually mean visible stuttering.

    Step 2: Test Debug vs Release mode

    1. Test in Debug mode first.
    2. Switch to Release configuration in Visual Studio.
    3. Build and install the app directly on the devices without attaching the debugger.
      • Android: Use dotnet build -c Release or sideload the .apk.
      • iOS: Archive and install via Xcode or TestFlight.

    Compare the FPS counter and stuttering on both devices.

    Step 3: Find out what exactly why it stutters.

    A simple stopwatch often misses the real cause because MAUI and the OS do hidden work.

    Suitable tools:

    • For Android: Use the ready-made example from Microsoft expert Jonathan Peppers: Download it, open in Visual Studio, run in Release mode on your Android phone, and it will report average frame time and number of "slow" frames. It uses Android's official FrameMetricsAggregator.

    While this is a non-Microsoft link, it’s official Github documentation and is safe to visit.

    • For iOS specifically, use Xcode Instruments on your Mac.
    • For both Android and iOS: Use dotnet-trace — Microsoft's official profiling tool. Install once: dotnet tool install -g dotnet-trace Full guide: https://learn.microsoft.com/en-us/dotnet/maui/fundamentals/profiling. It records what your game is doing and lets you see exactly which code is slow.

    I hope this addresses your question. If this response was helpful, please consider following the guidance to provide feedback.

    0 comments No comments

  2. Bruce (SqlWork.com) 83,741 Reputation points
    2026-04-12T23:43:32.4666667+00:00

    For iOS normally you would use Xcode to get the frame rate but as long as you are using metal, there are 3rd party tools (just google) . If you are using OpenGL, be aware it’s depreciated on iOS and is not the most performant.

    if you are dropping frames, then you need to speed up your code.

    0 comments No comments

  3. Q&A Assist
    2026-04-12T20:31:39.89+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    Use a frame-rate profiler on the target device and watch for consistency over time, not just the average FPS.

    For mixed reality and Unity-based scenarios, a common approach is:

    1. Enable an in-app FPS display
      • Use a lightweight visual profiler or FPS counter that renders every frame on the device screen.
      • For Mixed Reality Toolkit (MRTK) in Unity, enable the Visual Profiler via the Diagnostics System so it shows current FPS and memory usage in the app view.
      • Run the game on each physical device (iOS and Android) and observe the FPS while playing normally.
    2. Test in the correct build configuration
      • Debug builds often run slower and can introduce stutters that do not appear in Release.
      • Build and deploy Release (or MASTER for Windows Mixed Reality) configurations to get realistic performance numbers.
      • Always measure on the actual device, not just in the editor or emulator, because device performance characteristics differ.
    3. Look for frame-rate consistency, not just peak FPS
      • A game that fluctuates between 60 FPS and 30 FPS will feel more unstable than one that stays at a constant 30 FPS.
      • Watch the FPS graph or numeric display: if it regularly drops or oscillates, that correlates with perceived stutters.
    4. Compare devices and modes
      • Run the same scene on the iPad and Android phone in Release builds with the FPS display enabled.
      • Note where FPS drops occur (specific scenes, effects, or input actions) to narrow down causes.
    5. Use deeper profiling tools when needed
      • For mixed reality or 3D apps, use tools such as GPU profilers, engine profilers (for example, Unity’s built-in profiler), or platform-specific tools to see whether CPU, GPU, or memory pressure is causing frame drops.

    By continuously tracking FPS on-device with a visual profiler and testing in Release builds, it becomes clear whether the game maintains a constant 60 FPS and where stutters originate.


    References:

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.