Why aren't all games designed to run in borderless windowed mode?

Most full screen PC games like first person shooters run in full screen mode - the graphics engine completely takes over the screen. If you alt tab, you can get in and out of the game, but this often takes a long time and can lead to games crashing.

Most if not all games can be run in a windowed mode that overcomes these problems, but because the windows typically have borders, it reduces the effective screen space and also can stretch/distort the game due to trying to fit the entire rendered scene into a smaller area.

Some games (WoW, L4D I know for sure) have a mode called borderless windowed mode. It overcomes the problem by letting the window take up the full screen without borders, so it looks just like if you had the game running in full screen mode. And it eliminates the time consuming and potential crashes of alt tabbing out of a full screen game. And it seems to come with no performance hit.

So why aren’t games designed to run in this mode by default?

What Direct3D uses for rendering graphics are actually low level graphic functions; it’s on a lower level than most window applications and is hardware accelerated. But in order for Direct3D to fit into the overall scheme of the Window OS, the Direct3D application is also assigned a window context (something like a canvas, where you draw all your interface).

All window applications have that ‘canvas’. Then they use the standard Windows API or MFC for the menu-bars, dialog boxes and so on. For Direct3D applications, they just get a bare minimal window context for Direct3D to plot pixel onto.

The border that you see when running certain (most?) Direct3D games in windowed mode is just part of that minimal window. It is also possible to disable it, leading to the borderless window mode. As for performance hit, as far as I know, it should be the same - when you run a game in windowed mode, you have to render two times - once for the game, and once for the OS.

The borderless window mode may be smoother because the game does not need to render any of the standard window widget (the border, the menu bar) and hence no higher level functions within the Win API or MFC is called.

As for why other games don’t do it? This I am not sure. Perhaps the developers think it is a bad idea - removing the border and menu bar means you cannot move the window (but who would?) or they don’t think it really does boost performance (as per my analysis above).

Full screen mode provides a performance benefit, and allows the game to run at a resolution different to the normal desktop.

The performance benefit is decreasing with more advanced hardware and better drivers (and the move to DirectX use from OpenGL), but the resolution switching is still important. The additional pixels displayed means considerably more processing, and since 2D desktop operations don’t use much graphics processing (unless you load Aero), you can run a desktop at a high resolution that you could not run a game at.

Borderless window mode only works if you can run the game at desktop resolution with sufficient performance. Windowed mode lets you run the game at a resolution where the performance is ok, but it does not cover the entire screen.

Si

Because it’s a pain in the ass to figure out how to do it and most users aren’t aware of the difference.

Not sure about the PITA part, but yeah… you can hide the taskbar, and push the top edge up above the edge of the screen(mostly) and have only a few pixels of wasted space. Slightly annoying, but you soon get over it.

I’ve tried to do non-standard windows in Windows and the reference on how to do it is quite lacking, is my point. Technically speaking it’s just choosing a few correct values to send into the same functions that you use to create a window, but in terms of programming time, you’d have to sit there for a week just trying different values to see which works unless you happen upon the magic Google result that actually says what to do.

I never found the magic Google result.

But you don’t actually have to render twice, right? As in calculate the actual scene? You just take the rendering output of the engine and then copy that frame buffer into a window.

It seems to me that running in borderless windowed mode is almost indistinguishable from full screen in terms of performance, the main difference is that you can switch windows without the lengthy process of unloading/reloading the full screen mode (and its potential for crashes).

I do notice attempting to run a full native res bordered window results in a signficiant performance hit. I assume this is because it has to shrink the rendered image to fit into the smaller usable space since the borders are changing the effective resolution the game has available to it.

The additional Blit (Block Image Transfer) operation per frame is CPU and time expensive, especially as you are rendering and copying a full resolution screen. Developers go to great lengths to avoid large memory copy operations (particularly for display/network/disk operations). Of course, some drivers/video cards can do these blits faster than others, based on hardware features.

As I noted in my post above, the full screen resolution switch is often to a lower resolution mode using less CPU/rendering capacity. Also, when switched into full screen mode, other running applications should not pop up modal dialogs and should not get repaint messages.

Nope - the game should just render to the available canvas. The performance hit is the cost of the additional blitting, and rendering at the higher native desktop resolution, plus supporting all the other running applications with proper mouse filtering, etc. Game developers use full screen mode because it really is faster at an architectural level, your experience with WoW notwithstanding. WoW appears to me (I don’t play it, but I have watched a bit) to have pretty but not sophisticated graphics, and is probably network comms limited. Also to appeal to a wide range of players, it may not be particularly demanding on the system, so there is no apparent performance hit when running in borderless windowed mode.

Si

Video card architecture and the PCI-E interface was designed around providing massive memory bandwidth so I’m not sure copying the frame buffer is all that big a deal.

I ran some tests (using Left 4 Dead, more graphically advanced than WoW and very recent)

1650x1080 borderless windowed mode:

2450 frames 27.147 seconds 90.25 fps (11.08 ms/f) 13.004 fps variability

1650x1080 full screen:

2450 frames 27.093 seconds 90.43 fps (11.06 ms/f) 15.038 fps variability

Those results are basically the same, which means at least in this game borderless windowed mode has no performance hit.
For comparison, I tried running it in 1650x1080 bordered window mode, and it went really slow (2450 frames 85.014 seconds 28.82 fps (34.70 ms/f) 1.160 fps variability) but I’m pretty sure that’s a quirk of my video drivers. I have 2 monitors and if I try to run a game across them (and I guess the bordered window mode extends a bit into the second monitor) then things slow down big time.

To confirm that, I ran a bordered window test at 1600x900 (contained on one monitor) and got 2450 frames 22.613 seconds 108.35 fps ( 9.23 ms/f) 22.376 fps variability.
I understand the benefits of full screen mode as far as running at a lower res than the native monitor res and I’m not suggesting it be removed or anything - but for people who want to run games at the full native res of their monitor it seems like borderless windowed mode has lots of upside and no downside.

Moving to The Game Room from GQ.

Colibri
General Questions Moderator

I can think of one, I play City of Heroes and have 3 accounts and a good enough computer to easily run all 3 at once. It is much easier to switch between the 3 in windowed mode. Mind you I usually only fight with one and have the other two leeching. The amount of graphic space I lose is trivial and I can run the games at highest performance levels.

I run everything in windowed mode (if I can) with the taskbar locked on, I can switch fast, much faster than in full screen mode. It is, I suppose, a matter of taste, but I’ve been know to run several applications at once (Firefox, MathCad and Open Office spreadsheet earlier today) and I am the King of fast switching.

It occurred to me that I think every game I own can be played in full screen mode and with the exception of Roller Coaster Tycoon 3, I never play them in that mode.

Don’t really see why, it’s more of a technical question, but your call.