A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
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
- Test in Debug mode first.
- Switch to Release configuration in Visual Studio.
- Build and install the app directly on the devices without attaching the debugger.
- Android: Use
dotnet build -c Releaseor sideload the.apk. - iOS: Archive and install via Xcode or TestFlight.
- Android: Use
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-traceFull 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.