Games, Resolutions, and Multiple Monitors

I spend way too much time dealing with resolution oddities in games. Nothing is quite as maddening as when a game decides to launch at a ridiculously low resolution, in full screen. The side effects vary, but usually include either shoves every window I had open to my secondary monitor (shrinking them in the process), or just shrinking them to fit the new tiny resolution on the main monitor. Granted the screen resizing issues only happen on the first launch of the game (assuming you immediately set the resolution properly in game), but that’s no excuse for not fixing it. Plenty of games start just fine at your native resolution, and don’t screw with your windows.

There’s a whole host of resolution related problems that crop up in gaming. My personal annoyances are: slow/impossible multitasking between other applications with cmd/alt+tab, screen edge scrolling issues with multiple monitors, and the blanking of secondary monitors. Most of the issues I encounter arise from the use of multiple monitors, and I’m honestly a little surprised. The types of people creating games are exactly the types of people who should have multiple monitors. How can they not be bothered to make a game run properly on their development machines?

This isn’t necessarily a platform specific set of problems, as I’ve seen each issue in both Windows and OSX. When a game is multiplatform, however, it’s almost a certainty that the Windows version handles multiple monitors better than the OSX version.

Honestly I’ve only seen one company, ever, get multiple monitor support right. And as a bonus, they do it right on both Windows and OSX, and they have a full screen windowed mode in one of their games that is just absolutely perfect. I’ll give you one guess which company that is.

Civilization V

I decided to kill a little time the other day, and I didn’t feel like booting to Windows to play Civ5 in all its glory. The OSX version usually suffices, and performance is ok as long as I keep the map size reasonable. While attempting to play, I quickly remembered why I hate playing Civ5 on OSX: resolution issues.

I have multiple monitors, and I want the second monitor usable at all times. That’s kind of the point of having multiple monitors. If I play Civ5 in fullscreen mode, it will blank my secondary monitor, so this is out. Fullscreen mode games also tend to be very slow to react to switching between the game and other applications, so I usually play in windowed mode. Native monitor resolution windowed mode has a slight performance hit over fullscreen mode, but its acceptable.

Problem

Before

Native screen resolution (2560×1440) in windowed mode takes up every inch of space possible (as it should), except for the OSX Menu Bar at the top of the screen. The difficulty here is that it actually renders the game at max monitor resolution, and clips off the top 20 pixels of the game by hiding them behind the OSX Menu Bar.

This wouldn’t necessarily be a problem in many games, but Civ5 has a TopPanel which is an in-game menu bar, offering access to critical gameplay information. Much of this information you just cannot access anywhere else.

No toggles for you!

In the launch edition of the OSX client, there was a hotkey (cmd+enter) which would allow you to switch between fullscreen and windowed modes on the fly. This did take a few seconds to happen, and was a real waste of time over the course of a game, but at least allowed access to the hidden information. In all patched versions of the client, this option has been greyed out and unusable.

So basically my options are:

  • Reboot to Windows and play fullscreen with proper multiple monitor support.
  • Play fullscreen in OSX with one monitor blanked out.
  • Play fullscreen windowed in OSX without access to critical game information.
  • Play windowed in OSX at the second highest resolution (1920×1200).

The latter option seemed to be my only real choice, and it would give me a small performance boost as a side benefit. I do dislike the loss of game immersion by playing in less than fullscreen. It also irks me to waste all that monitor space.

Solution

After

The ideal solution would be to chop 20 pixels off of the Y resolution of the game, and render it at 2560×1420 just below the menubar. Its usually not a difficult solution, and I’ve done similar things before in other games. I poked around online for an hour, and came up with nothing. There were plenty of people complaining about the issue, and lots of ideas that never panned out. Everybody seems fixated on the ~/Library/Application Support/Sid Meier's Civilization 5/GraphicsSettingsDX9.ini file. Changing the resolution here does nothing unless the numbers match the in-game resolution options.

Since the UI is moddable through Lua, I figured it might be possible to write my own mod to change the position of the TopPanel. I poked around a bit trying to do this, to no avail. I managed to add some custom content to the TopPanel (by editing the ~/Library/Application Support/Steam/SteamApps/common/sid meier's civilization v/assets/UI/InGame/TopPanel.lua file), but I couldn’t figure out how to change the bar’s position. Luckily, while fooling around with this, I stumbled upon a real solution.

In the file ~/Library/Application Support/Steam/SteamApps/common/sid meier's civilization v/Assets/UI/Options/OptionsMenu.lua there’s a little variable at the top of the file called m_WindowResList. Apparently it stores some default resolutions for the game. I found some code later in the file adds your current monitor resolution to the collection (mine wasn’t there by default) “just in case they’re running something weird”, as the developer’s comments informed me. I simply added a new resolution to this list, and removed 40 pixels from the Y resolution.

Select the new resolution

Why remove 40 pixels rather than 20? The game window is anchored to the center of the screen, and I couldn’t find a way to anchor it to the bottom instead. So for every 2 pixels you subtract from the Y resolution, it effectively moves the TopPanel down 1 pixel. The end result of this is that the TopPanel is fully visible just below the OSX Menu Bar, and you lose 20 pixels of the game window at the bottom of your screen.

 
Once this is done, you can simply launch the game and select the new resolution from the Options screen. While this solution isn’t perfect, I declare it close enough.

Update – 6/22/2012

It appears that the locations of the OptionsMenu.lua file referenced above has changed in a recent game update.

Civilization V:
~/Library/Application Support/Steam/SteamApps/common/sid meier's civilisation v/Civilization V.app/Contents/Home/assets/UI/Options/OptionsMenu.lua

Civilization V – Gods & Kings:
~/Library/Application Support/Steam/SteamApps/common/sid meier's civilization v/Civilization V.app/Contents/Home/assets/DLC/Expansion/UI/Options/OptionMenu.lua

One Response to “Games, Resolutions, and Multiple Monitors”

  1. I was wondering if you’ve upgraded to Mavericks and tried multiple monitors on Civ5. There’s so little information about multi monitor gaming in OSx. I can’t find information stating it’s possible or not. Thanks.

Leave a Reply

Comments from new authors must be approved before they will appear.
After your first comment is approved, you are free to comment at will.