I’m making an iOS game at the moment, the first time in ten years I’ve worked on mobile. I came across an unusual performance issue recently, which in hindsight would’ve been obvious if I was more familiar with mobile, but since the majority of my experience is in desktop and console it took me by surprise – and I imagine it might be a surprise to other devs too!

As mobiles become more powerful they’re increasingly prone to generating heat (relevant wikipedia article), and their only way of dealing with it is to throttle the CPU. When this happens, rendering the same frame is now going to take, say, 20% longer – so your game might be very well-behaved and staying within its frame budget, but depending on how hard you’re driving the individual components (say, the CPU and GPU) you might trigger throttling and find yourself exceeding your frame budget anyway.

What this means in practical terms is the behaviour of your game might cause your frame budget to essentially be a lot lower than you think, so as well as watching your frame budget you also need to monitor the device temperature. Unreal provides the ApplicationLifecycleComponent to pass the temperature change signals from the device up to your game, so that can be used as an early warning that you might need to optimise or rethink particular sections of your game.

Side note: this problem presented itself in my game as a sudden drop in frame rate after leaving the game running for a little while, but more significantly the problems ‘mysteriously’ disappeared if I switched to a different app for five seconds before switching back. So if you see that behaviour, check your temperature!

By crussel

One thought on “Staying Within Your Frame Budget Isn’t Enough on Mobile”

Leave a Reply

Your email address will not be published. Required fields are marked *