Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

casperes1996

macrumors 604
Original poster
Jan 26, 2014
7,593
5,764
Horsens, Denmark
Hey; Anyone have any ideas what activates Game Mode? I assume it's a lot of heuristics with some threshold, but what goes into it? I have SpriteKit games using the GameController framework that don't trigger it, a Metal toy program where I just render random ideas for fun to experiment, and none of that triggers it. The build in Chess app does. So it's not just about needing to be intensive enough. But also games made before the Sonoma SDK so it's not an explicit API and I also can't find documentation on such an API. Looking on developer.apple.com you just get the GamePlayKit GKModel. Only widely available fact I can find is that the game must be full screen for Game Mode to take effect
 

f54da

macrumors 6502a
Dec 22, 2021
503
185
I think the only way to find this out would be disassembling the relevant system framework. Maybe start with SystemUIServer to see if there's anything related to the game mode menubar item in there.
 

casperes1996

macrumors 604
Original poster
Jan 26, 2014
7,593
5,764
Horsens, Denmark
I think the only way to find this out would be disassembling the relevant system framework. Maybe start with SystemUIServer to see if there's anything related to the game mode menubar item in there.
Thanks for the suggestion but unfortunately I don’t think I have the time to embark on a project like that
 

f54da

macrumors 6502a
Dec 22, 2021
503
185
might be interested in

https://eclecticlight.co/2023/10/17/what-does-game-mode-do/ and https://eclecticlight.co/2023/10/18/how-game-mode-manages-cpu-and-gpu/

>Normally, Game Mode is engaged when a recognised game is set to Enter Full Screen, for example using the command in its View menu. This immediately triggers WindowManager to put the game’s window into full screen mode. Shortly afterwards, gamepolicyd is launched to manage Game Mode, and announces in the log
Game mode enabled. gamepolicyd works with RunningBoard to designate gameconsole and some other services as “Game Mode Critical Services”.

Based on that it seems to hint that there's a certain addition whitelist? If you want to reverse it looking at gamepolicyd is probably the place to start. Maybe something to do with LSApplicationCategoryType, not too sure.

Edit: from the horse's mouth: https://developer.apple.com/forums/thread/739387
 

casperes1996

macrumors 604
Original poster
Jan 26, 2014
7,593
5,764
Horsens, Denmark
might be interested in

https://eclecticlight.co/2023/10/17/what-does-game-mode-do/ and https://eclecticlight.co/2023/10/18/how-game-mode-manages-cpu-and-gpu/

>Normally, Game Mode is engaged when a recognised game is set to Enter Full Screen, for example using the command in its View menu. This immediately triggers WindowManager to put the game’s window into full screen mode. Shortly afterwards, gamepolicyd is launched to manage Game Mode, and announces in the log
Game mode enabled. gamepolicyd works with RunningBoard to designate gameconsole and some other services as “Game Mode Critical Services”.

Based on that it seems to hint that there's a certain addition whitelist? If you want to reverse it looking at gamepolicyd is probably the place to start. Maybe something to do with LSApplicationCategoryType, not too sure.

Edit: from the horse's mouth: https://developer.apple.com/forums/thread/739387
Interesting. Because I had the app category set to game in one of my own tests, and it did not trigger game mode in full screen. So there's clearly more to it. Likely a requirement on system utilisation or something as well, as my tests were all using very little CPU/GPU compared to regular games that'll make use of Game Mode.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.