Hypercritical


Dear Mac game developers

Must…restrain…fist of death…

Do you create or port Mac OS X game software? Does your application have a full-screen mode? If you answered yes to these questions, you may be driving me insane with your failure to correctly capture the screen before going into full-screen mode and then (here comes the important part) correctly restore the previous display mode before releasing the display!

It seems like every new game I download and launch these days immediately reduces my screen resolution and then goes full-screen. This is fine, even expected on a 23-inch monitor. But when I quit the game, I expect my screen to look just like it did before the launch. Nearly all games are good about restoring the previous resolution and color depth. But what they fail to do all too often is capture and restore the screen in such a way that other applications do not receive any notification that the display configuration has changed.

Why is this important? Well, any decent Mac application is supposed to respond to configuration changes like a new display resolution by resizing and repositioning its windows as necessary to ensure that they remain visible. Nearly all of the applications I run every day do this with aplomb. That's great.

What's not so great is when I launch HappyMisterFunTime 2000 and all of my windows resize themselves to fit on a 640x480 screen. Now you might say that, ideally, a well-behaved Mac application should remember its previous window sizes and positions and then restore them when the screen resolution is changed back to normal (excluding windows that have been explicitly resized or moved since the previous resolution change, of course), and I'd agree with you. That would be ideal. Unfortunately, few application do that. It's just too much additional per-window saved state for developers to want to deal with, I guess.

Or maybe, like me, they simply expect game developers to correctly capture, reconfigure, and restore the display. Honestly, is that too much to ask? Back in the days of classic Mac OS, it seems to me that Mac game developers were much better about this. If I found a game that failed to handle the display correctly, it'd stick out in my mind and I'd be sure not to run it if I had a bunch of windows that I didn't want to be mangled. But these days, in Mac OS X, it's become an epidemic.

I'm struggling to stay calm here, because this bugs me more than you can imagine. Some days, it's all I can do to keep from looking up each offending developer's home address and then sneaking into their homes at night and surreptitiously RESIZING EVERY SINGLE WINDOW ON THEIR 30-INCH CINEMA DISPLAYS TO THE SIZE OF AN INDEX CARD AND THEN JAMMING THEM ALL INTO THE UPPER-LEFT CORNER OF THE SCREEN! DIE! DIE! DIE!

Ahem. Seriously, folks. It's not that hard to correctly handle the display. In fact, it's one of the first things covered in any game-related WWDC session. Make yourself a skeleton game application that does this stuff correctly, and then start each new game or port by using it.

(Speaking of ports, it really kills me when those don't behave. You're a freaking Mac game porting house. Porting games to the Mac is all you do! If anyone would know about the nuances of running games on the Mac platform, you'd think that it'd be a company that does nothing but port games to the Mac! Arrghh…must…remain…calm…)

Oh, and before you send me angry email telling me that sometimes it's necessary either to forego capturing the display in the CGDisplayCapture style, or to release the display momentarily while it is still in the new mode to bring up some piece of Aqua UI (thus notifying other running applications of the change, and thus causing them to frantically resize and reposition their windows), yes, I know all about it. It's a bummer, and there's not much you can do except ask Apple for new or better APIs to deal with your situation.

But I'm not talking about your apps. I'm talking about apps that could deal with the screen properly, but don't. (Say, a port that uses OpenGL everywhere and does not display a lick of Aqua.) It is to the developers of these applications that I make my plea. Please, I'm begging you, do the right thing.


This article originally appeared at Ars Technica. It is reproduced here with permission.