Page 1 of 1
High-DPI enhancements
Posted: Sat Nov 27, 2021 1:08 am
by duskwuff
I've been using Factorio for a while on a high-DPI system, and I've noticed a few weird quirks. Some of these are a matter of opinion; some are borderline bugs. Without further ado:
- UI scale is not relative to the DPI scale. If the UI scale is not set to "automatic", then the game UI will be unusually small or large if the display DPI is changed (e.g. when a high-DPI laptop is plugged into a normal-DPI external display). Setting the UI scale to "automatic" partially fixes this, but prevents customization.
- Zoom values are not relative to display DPI. In particular, the zoom is always set to 1.0 when starting or loading a game, meaning that game content starts zoomed out on a high-DPI display.
- player.display_scale reflects the current value of the UI scale, not the DPI scale. As a result, it cannot be reliably used by mods to correct for DPI.
A minimal solution would be to initialize the player zoom and map zoom to the DPI scale when loading a game, rather than always setting them to 1.0.
A more complete solution would be to multiply all values used for UI scale and map zoom (including in Lua APIs) by the DPI scale.
Re: High-DPI enhancements
Posted: Sat Nov 27, 2021 11:39 am
by ssilk
Hm. I think I don’t have such a big screen, so I have problems to imagine that: wouldn’t that be kind of cheating in multiplayer?
Re: High-DPI enhancements
Posted: Sat Nov 27, 2021 4:03 pm
by FuryoftheStars
ssilk wrote: Sat Nov 27, 2021 11:39 am
Hm. I think I don’t have such a big screen, so I have problems to imagine that: wouldn’t that be kind of cheating in multiplayer?
Maybe something for a fog of war on the edges?
It would be nice, though, if the devs could account for higher DPI and wide screens. It's an issue either way... either you get a wider viewing area in one direction, or a narrower viewing area in the other. So, right now, ultra-wide and/or high dpi would actually be at a disadvantage in multiplayer.
Re: High-DPI enhancements
Posted: Sun Nov 28, 2021 2:36 am
by duskwuff
ssilk wrote: Sat Nov 27, 2021 11:39 am
Hm. I think I don’t have such a big screen, so I have problems to imagine that: wouldn’t that be kind of cheating in multiplayer?
This isn't about large screens. It's about high-resolution screens, like the 2880x1800 (1440x900 x2) display on some MacBook Pro laptops. The general goal of these changes is to fix certain quirks which currently make them behave differently from normal-DPI displays, especially when first joining a game. It shouldn't affect game balance.
FuryoftheStars wrote: Sat Nov 27, 2021 4:03 pm
Maybe something for a fog of war on the edges?
The game already limits how far you can zoom out independently of display DPI.
Re: High-DPI enhancements
Posted: Sun Nov 28, 2021 5:58 am
by ssilk
duskwuff wrote: Sun Nov 28, 2021 2:36 am
This isn't about large screens. It's about high-resolution screens, like the 2880x1800 (1440x900 x2) display on some MacBook Pro laptops.
Now when you mention that I can see it. I set the UI-scale to automatic, eventually because of that.
Re: High-DPI enhancements
Posted: Sun Nov 28, 2021 6:27 am
by FuryoftheStars
duskwuff wrote: Sun Nov 28, 2021 2:36 am
FuryoftheStars wrote: Sat Nov 27, 2021 4:03 pm
Maybe something for a fog of war on the edges?
The game already limits how far you can zoom out independently of display DPI.
Yes, however, that leads to the issues I mentioned in my second paragraph.
That said, as you mentioned, this thread is not about wide screen, so I won't discuss it further.
Re: High-DPI enhancements
Posted: Thu Nov 07, 2024 11:09 pm
by duskwuff
For what it's worth, this has been resolved in 2.0 by exposing separate options for "Manual (pixels)" and "Manual (points)" scaling. Mac users should use "Manual (points)".
Re: High-DPI enhancements
Posted: Fri Nov 08, 2024 12:15 pm
by Koub
duskwuff wrote: Thu Nov 07, 2024 11:09 pm
For what it's worth, this has been resolved in 2.0 by exposing separate options for "Manual (pixels)" and "Manual (points)" scaling. Mac users should use "Manual (points)".
Thanks for the tip, I'll take your word for it.
[Koub] Moved to Implemented.