-
-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable "Allow Hidpi" by default to fix window management issues across platforms on hiDPI monitors #3681
Comments
I don't quite understand why it's an option at all. It should just be always on, because if it's not on, then the window of a Godot project is incorrectly scaled, looks blurry and blown out. Keeping it off only makes the experience worse for a part of users, and I doubt anyone is looking to purposefully provide worse experience. |
Allow Hidpi was left as an option because disabling it does provide the fastest scaling (it's faster than using a scaled Viewport). Nonetheless, I don't think the added complications are worth it, especially when playing in fullscreen. If you are strapped for performance, I think implementing exclusive fullscreen + resolution changes would be a better route – but this is also unreliable if the game crashes. Alternatively, people on low-end systems could use a third-party program that performs the required resolution change when a specific game is detected to be running (and then switches back to native resolution when alt-tabbing out or quitting the game). |
The reason I don't enable EDIT: For my project I'm now enabling |
In my experience, if you don't enable it, it does the exact opposite of looking the same. It just looks scaled up, because it doesn't account for system-wide scaling, which is normally set on higher density/higher resolution screens. Enabling hiDPI actually makes it look like it physically has the same size on every display.
That is controlled with system scale factor, and by enabling hiDPI you make Godot aware of it. It doesn't look tiny, it has the proportions a user expects from every app. And you can still provide accessibility options with theming, if you want to help people with poor eyesight. |
Windows already allows you to force DPI awareness on and off for specific executables. macOS also allows disabling DPI awareness on a per-application basis (but not enabling it if it's disabled). We don't need to provide our own layer of customization over that – "use the platform" as they say 🙂 (We currently have a |
As a macOS/iOS user and developer and (very) part-time Godot hobbyist, I've been a bit confused by this option and wondered why it wasn't enabled by default. On iOS nearly everything has been high-DPI (retina branding) for a decade (seriously - the retina display was first introduced in 2010). The vast majority of macOS machines are laptops which have been retina for years (2012 or so) and iMacs started getting retina screens in 2014, I think. I'm not very familiar with the PC world, but I get the impression this sort of thing isn't quite as common there? As an Apple user, though, it is unbelievably jarring when something doesn't support this properly out of the box - and currently, by default, Godot projects do not. |
Describe the project you are working on
The Godot editor 🙂
Describe the problem or limitation you are having in your project
Godot projects1 suffer from various issues when run on hiDPI monitors (such as Windows scaling set above 100%). This is most noticeable on Windows, but some problems can also pop up on macOS as a result of relying on a lowDPI fallback provided by the OS. (Linux has no concept of DPI-awareness for applications, at least on X11.)
The lowDPI fallback, as its name implies, is designed to be a fallback. While it provides better performance on integrated graphics, it is not meant to be used as a daily driver. We're effectively at the mercy of whatever the lowDPI fallback wants to do (including a lack of control over how the scaling is performed, which can result in poor scaling quality). Microsoft and Apple both encourage application developers to fix their applications to be resolution-independent, then mark their applications as DPI-aware.
This is not exclusive to modern applications/games. Some old games have received additional patches to be marked as DPI-aware by default. For games that are no longer maintained, one of the most common resolutions on PC Gaming Wiki is to disable OS-provided display scaling (aka. enabling DPI awareness). This shows that this issue is not exclusive to Godot, and that we should not try to fight the operating system's lowDPI fallback.
See godotengine/godot#29553 where this change was previously proposed. Since the original issues haven't been fixed on the OS level, I feel this is worth discussing again in 2021.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Enable the Allow Hidpi project setting by default.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
One concern about enabling Allow Hidpi by default is that performance will suffer on integrated graphics, especially in 3D games. This can be alleviated in the
master
branch by detecting the use of integrated graphics then defaulting to lower 3D resolution scaling (probably 50%).If performance still proves to be an issue in 2D games, 2D resolution scaling could be implemented.
Changing a project setting's default value is a compatibility-breaking change, so a decision needs to be taken before 4.0 is released.
If this enhancement will not be used often, can it be worked around with a few lines of script?
Yes, since the Allow Hidpi project setting already exists. However, the current default provides a bad experience not only for game developers, but also for their players who just want to play fullscreen games in peace 🙂
Is there a reason why this should be core and not an add-on in the asset library?
This proposal is about changing a default project setting.
Footnotes
The Godot editor is always marked as DPI-aware, and is therefore not affected by this. Any project run from the editor will however be affected by this until Allow Hidpi is enabled in the Project Settings. ↩
The text was updated successfully, but these errors were encountered: