Jump to content

Recommended Posts

Update 25 included a number of invisible fixes and changes for how we handle fullscreen. In fact much of that work had nothing to do with fullscreen at all and was for something far more difficult, something that we weren’t ready to release, and something that has caused players problems for quite a while. We like to say “no good deed goes unpunished” to refer to problems uncovered while fixing or improving a feature of the game and this is a story of one such deed.

To understand this mess you need to have some background. In recent years computer displays have been getting better in a lot of ways: better color accuracy, faster response times, and most importantly: more pixels. There seems to have been some sort of arms race in laptop manufacturers in recent years where we’d see higher and higher resolution on tiny display panels -- it’s not unusual to see a 4K display on a 15-inch laptop with only an entry level mobile graphics chip to support it.

The first problem with high-resolution displays (also known as high-DPI) is that text can be too small to read at their native resolution. The solution for many years has been simple: you can tell Windows to scale apps up. Some apps are built with awareness of this scaling and instead of a simple “stretch” of the pixels they draw their text at your native resolution with a larger font; when apps do this it looks gorgeous -- I find reading on a 4K display much easier on my eyes.

The second problem with high-resolution displays is obviously games and here is where our story gets tricky. It turns out that Windows handles games in a very complicated way that tries very hard to do what’s best but ends up stuck between a rock and a hard-place. Let me first tell you about the rock. 

What’s the difference between 1080p (1920x1080 pixels) and 4K (3840x2160 pixels)? Apart from the fact that they changed from naming the mode after the screen height to width you can see here that they basically just doubled the resolution. So if you change your Desktop from 1080p to 4K and you want your apps to be the same size on your screen you just set your app scaling to 200% and everything looks great.

The problem is games need a lot of power from your graphics card: for many things you pay “by the pixel” -- more pixels take more time -- and if you double your resolution you actually quadruple the number of pixels you need to fill! Instead of 2 million pixels at 1080p you have over 8 million pixels to fill at 4K! You need a powerful graphics card to run at 4K resolution and this is why you probably don’t want to run Warframe on your 4K business laptop at native resolution!

Remember how I said that Windows will scale up your apps for you? It turns out that for games, this isn’t always true. Get ready: this is going to blow your mind!

If you only ever run a DPI-agnostic game in a Windowed or Borderless Fullscreen modes Windows will automatically scale it up. Your 720p game will be 1440p on your desktop and Windows will even do a nice sharpening filter on the up-scale so it looks nicer. This is the default and it’s making the best of a bad situation: it looks great, it doesn’t have to render 4 times the pixels, and it’s the ideal mode for a 4K laptop without a discrete graphics card.

Once you toggle to native fullscreen once -- just once -- everything changes. To go native fullscreen, Windows has to make the game aware of the true resolution of the monitor; if all you ever play is fullscreen this is fine -- you’ll never even notice -- but if you go back to Windowed you’re in trouble because now you’re playing at native resolution: your window will be much smaller than when you started. 

It turns out that once Windows notices that you went fullscreen once it remembers. It marks a flag in your registry to say “this app might go fullscreen so you’d better treat it as high-DPI aware from the start next time.” No more automatic scaling, no more nice sharpening filter, just a teeny-tiny window. Relaunching won’t fix it. Restarting Windows won’t fix it. Reinstalling Warframe won’t fix it. You’re stuck.

So what did players do? They just made their window bigger: two times bigger, four times the pixels, and then couldn’t understand why Warframe suddenly ran much slower. That’s what started this whole journey: players with 4K displays wondering why their game went from 60 FPS to 15. Since this was an increasingly frequent problem we had to do something, and remember: no good deed goes unpunished.

As we started to investigate what would be required to improve our handling of high-DPI the first thing we noticed was that the fullscreen handling code was full of violent abuse of the graphics driver. Since our handling of windowed and fullscreen resolutions involves a lot of the same code we decided to do some housekeeping first.

Before I tell you more let me pause for a moment to tell you how difficult it is to debug fullscreen games. Everyone hates it because you can’t just run the game in your debugger like you normally would because the display is fullscreen and locks you out of your debugger windows! You can’t look at variables, you can’t step into code, and it’s very frustrating. Once we had fullscreen code working years ago we left it alone: nobody wanted to touch it because if you had to fix it you were in for a world of hurt.

I spent a week with a wimpy 4K laptop tethered to my workstation for remote debugging so I could iron out the kinks in our fullscreen support and implement high-DPI features. Because it had to load all the data over the network it took about 5 minutes to run each test. It was a game of inches -- fixing one bug exposed another bug under it -- and at the end there was still optimization to be done (we made toggling fullscreen faster but with a bit more work it could be twice as fast as it currently is!).

As Update 25 loomed we had high-DPI support working but there hadn’t been enough testing so at the last minute it was shelved until after mainline dust had settled; we shipped all the polish but none of the high-DPI support. To help players stuck in native resolution we added a workaround in the launcher to make Windows forget that you had ever gone fullscreen. Everything should have run just like when you started Warframe using the nice Windows sharpening upscale filter -- fast and smooth -- but remember no good deed goes unpunished. 

We talked about the rock; now let me tell you about the hard place.

One critical mistake was that we assumed that when DirectX went fullscreen and forced the game to become DPI-aware that it would do be able to do this seamlessly. Remember that we wanted to be DPI-agnostic by default so that Windows would do the nice sharpening upscale filter. We only have a few 4K machines to test on and while this appeared to work for us it turns out that for many people this caused all kinds of problems.
 
If you look through the MSDN documentation for high-DPI support you’ll find time and again it advised against what we were doing: it said that becoming DPI-aware at runtime can lead to unexpected application behavior. We hoped that we could get away with it and have it run fast and look good in all cases but this didn’t go as planned: we started getting reports of the mouse being trapped in the upper left quadrant of the window, windows being scaled off the edge of the screen, and other strange issues.

The other problem is that some players weren’t aware of this scaling and had probably gone to native fullscreen once at some point in the past which had made Windows disable it. They had adjusted their settings for their native resolution and when we restored the default scaling their windows became bigger. Savvy players would ask why their borderless fullscreen wasn’t running at their native panel resolution (not noticing that their frame-rate had improved!)

Another problem we found was that if the game pretended to be unaware of DPI mode it might let you make scaled windows that wouldn’t fit on your desktop: again in some tests this was fine but we heard problems where players had entered their panel’s native resolution as a windowed mode not knowing that Windows was going to scale that up by 200% and they ended up with a window so big that it didn’t fit on their screen and they couldn’t see the UI to undo their change.

We worked late into the night after we deployed Update 25 trying to find a compromise. We experimented with high-DPI support we had worked on earlier to see if we could support both modes. Eventually we abandoned all hope of using the native Windows scaling -- you can’t “play dumb” if you ever need to change your mind later -- this seems to explain why Windows insists on marking your game as high-DPI aware forever if you ever go fullscreen. 

So there’s our rock and a hard-place: some people want high-DPI scaling because they have a fantastic monitor but a weak discrete or even integrated graphics processor, some people want native resolution because they have a graphics card that can handle it. Some people (like me) want the native OS scaling because it’s sharper but we can’t safely switch it off on the fly without inviting “unexpected application behavior.” 

Coming soon in hotfix 25.0.2 is the high-DPI support we had worked on before the update. We had hoped to integrate it with some other things (UI or HUD scaling etc) and possibly experiment with using our internal mixed-resolution rendering so that your UI would be crisp but the game would still run fast but there isn’t time -- we need to fix this ASAP.

In your Display Settings there is a new “Window Scaling Mode” option; if you have Windows App Scaling at 100% it won’t make any difference but if you have a high-DPI scale set you can choose between having it scale up the window (speed!) or render at native resolution (quality!). If you were running at 4K before and are confused by everything getting big just set it to Native and hopefully it’ll be just like it was before.

The display settings screen could be better -- it’s a bit confusing when you’ve enable scaled mode because it shows you the resolution before scaling not after (it’s been this way for so long that changing this now would likely cause an equal amount of confusion).

Other known-issues that we weren’t able to solve before shipping: 

  • If you change your Windows App Scale on the fly the game does not respond well to this (especially if you were fullscreen)
  • If you drag Warframe from to a monitor with a different DPI scale the game will not update the window size (I’m not sure if we need to fix this?)
  • In scaled mode you can make comically giant windows if you have multiple monitors

If there are other issues after hotfix 25.0.2 please let us know in the comments below -- we’re not done working on this and there are sure to be other fun idiosyncrasies to figure out. No good deed goes unpunished. 

Edited by [DE]Glen
  • Like 44
Link to post
Share on other sites

Wow. These are my favourite kind of devposts. There is a lot of info in here. I didn't realize any of this. I wonder how many of my other games could be potential offenders because of this issue. I appreciate the effort you've put into solving this, Glen. Thank you!

Edited by Skaleek
  • Like 2
Link to post
Share on other sites

I do hope that the next update can resolve this issue.

Spoiler

RymBOGY.png

 

as it is beyond JUST "Full Screen".

 

 

This "forced" (and false) resolution has a noticeable loss in quality compared to how things were before the Jovian updates.

Link to post
Share on other sites

For some reason my UI got absolutely massive after the update. Like, the chat covers more than a third of my screen, its pretty annoying tbh. There are some other things that are also broken, like the color pallets being extremely pixels tee making it near impossible to distinguish them without reading the name (which is also huge). Really hope these things get fixed because overall I'm loving this new update. 

Link to post
Share on other sites
Quote

... code working years ago we left it alone: nobody wanted to touch it because if you had to fix it you were in for a world of hurt.

Oh my. A rotten code, a classic. One could say "Refactor early, refactor often". But I know, this phrase looks good only in books and blog posts. Reality does not work like that, with all the deadlines, staff shortages and cost-cutting. This is one of the pains of a software company in a highly competitive field. You're expected to deliver "new features" all the time, but when was the last time you could do a cleanup-only week, take your time to fix all the nasty code smells ? Yeah, that's what I thought, there is never enough time for that. Kudos for putting together a fix, remote debugging must have been a major PITA :+1:

Thanks for this post Glen, it was an interesting read 👏

  • Like 8
Link to post
Share on other sites

So what I'm understanding from this is it basically affects users who use a monster at a higher resolution than what they game at? 

For myself I've always played Warframe full screen 1080p, as I only have one monitor and my native resolution is the same as the games. Does that mean I'll be unaffected by this issue? My understanding of computers goes as far as how to build them and that's it. You lose me with the code magic.

Edit: Also still on Windows 7 if that makes any difference.

Edited by Rhundis
Link to post
Share on other sites
2 minutes ago, Rhundis said:

So what I'm understanding from this is it basically affects users who use a monster at a higher resolution than what they game at? 

For myself I've always played Warframe full screen 1080p, as I only have one monitor and my native resolution is the same as the games. Does that mean I'll be unaffected by this issue? My understanding of computers goes as far as how to build them and that's it. You lose me with the code magic.

If Windows is set to 100% scale none of this should matter.

  • Like 1
Link to post
Share on other sites

i love you guys. you see a problem and you make it your absolute job to fix it, no matter how tedious. most devs from other studios would just say "nah requires too much work" of "nah this isn't impossible". keep it up! 

Link to post
Share on other sites
27 minutes ago, [DE]Glen said:

If Windows is set to 100% scale none of this should matter.

By scale do you mean the over scale function? I haven't played with that since I re installed my os but on my old build I had it upscaled due to black bars around the edge of my old monitor which gave it a letterbox feel. Thanks for the reply though.

Link to post
Share on other sites
5 minutes ago, Rhundis said:

By scale do you mean the over scale function? I haven't played with that since I re installed my os but on my old build I had it upscaled due to black bars around the edge of my old monitor which gave it a letterbox feel. Thanks for the reply though.

Windows 7:

twfVLWx.png

Windows 10:

othNAvd.png

Link to post
Share on other sites

A great insight, unfortunately I am unsure I can grasp it all. Anyways, I have a question: If we use options such as DSR or Downsampling, what should we expect to happen or how does it usually behave? (say, I have a 1920x1080 monitor, enable DSR on Nvidia CP because I got a good card, select 4K. Would I be affected?)

Also, does stuff like this:

5747632d_FPVgc5K.png

Lend a hand at all?

Thanks for your time Glen.

Link to post
Share on other sites

Thanks for writing all this up. As an outsider, it's hard to get an appreciation for just how thorny some software issues are, and why seemingly "simple" fixes are anything but. Also, thanks for the overtime that went into getting a version of this working.

Link to post
Share on other sites
Just now, NightmareT12 said:

A great insight, unfortunately I am unsure I can grasp it all. Anyways, I have a question: If we use options such as DSR or Downsampling, what should we expect to happen or how does it usually behave? (say, I have a 1920x1080 monitor, enable DSR on Nvidia CP because I got a good card, select 4K. Would I be affected?)

Also, does stuff like this:

Lend a hand at all?

Thanks for your time Glen.

Anything you make the driver do after we hand off the frame-buffer is out of my control -- I don't know what it'll do.

  • Like 1
Link to post
Share on other sites

So I have a VERY shitty workaround, but it is at least a workaround.

 

 

Few notes:

  • I use Windows 10 Pro, x64
  • Resolution on Display 1: 2560x1440
    • This monitor is the only one use for games
  • Resolution on Display 2: 1920x1080
  • I have Advanced Scaling Settings set to a custom scale of 135%
  • This workaround does not fix Borderless Windowed / Windowed and these will continue to try using incorrect resolutions

 

  1. If you only use one monitor, then the only thing that has to be done is find the Warframe executable
  2. Right-click on the .exe and open up properties
  3. Check the box to "Disable Fullscreen Optimizations"
  4. Now run Warframe in Fullscreen and you will be fine

 

Now for anyone who has multiple monitors, you may notice a "dead zone" on the lower section of the screen when in-game. If you see this, then you will have to adjust the placement of your other monitor. I have tried upscaling my second monitor to match my primary, but the issue still persists when not adjusting screen placement.

Here is just how much I have to adjust where the second monitor is so I can actually move the mouse in all areas of the screen when running Warframe:

Spoiler

nepOV0W.png

 

As obvious from that image, this is not practical for normal usage and will have to be changed repeatedly when entering and exiting the game (at least if you care about using your other display).

 

This is what a full desktop screenshot looks like when running Warframe after these changes (for me):

Spoiler

RdWnBwn.jpg

 

I really hope that all of this can be fixed soon, or, at the very least, these changes reverted as things actually worked before.

Edited by Sean
Link to post
Share on other sites

As a fellow tull-time programmer I feel your pain Glen. Screw the "drag a game to a monitor with a different DPI scale" bug, get some rest, you did a great job and deserve some.

Thanks for adding option to render borderless in native! I prefer to play most of my games as borderless since 2000's so this is very important to me. Thanks for your hard work!

  • Like 3
Link to post
Share on other sites

This is the reason why we're seeing a lot more games coming out with a "Display Resolution" and either a "Render Resolution" or "Resolution Scale" (i.e. % slider of display resolution).

While it may make your code more complicated, in the long run the best solution is probably to handle the upscaling yourself like you're trying. Keep up the hard work, it's greatly appreciated. Even though I don't play on the PC much anymore, the work you're doing is valuable and appreciated. 

  • Like 1
Link to post
Share on other sites

I love reading this kind of thing.

I can only imagine the iteration that the remote debugging took. I hope you guys can make it out of this pixel hell to your end vision - good luck. You don't often see developers posting this kind of thing up front. It takes time and effort and exposes you to questions and armchairing. I applaud it.

  • Like 3
Link to post
Share on other sites

(this is why i am pretty happy with my Multi-Monitor software letting me cheat and break my Cursor out of Exclusive Fullscreen Applications to interact with other Displays, without those Applications thinking they have lost Focus. i get the Input Latency and performance benefits of using Exclusive Fullscreen while still being able to access the background albeit with some restrictions. but for the most part it's kinda like it isn't even in Exclusive Fullscreen :D)

1 hour ago, NightmareT12 said:

Also, does stuff like this:

(on a side note, when using multiple Displays, generally it is recommended to set Display Scaling of all Displays to the GPU, rather than per Display)

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...