Friday Facts #243 - New GUI tileset

Regular reports on Factorio development.
User avatar
MrGrim
Fast Inserter
Fast Inserter
Posts: 231
Joined: Sat Apr 09, 2016 7:58 pm
Contact:

Re: Please, no device dependent coordinates

Post by MrGrim »

bobingabout wrote:
Omnifarious wrote:Please, please stop measuring things, anything, in device dependent coordinates. Please stop using pixels. IMHO, nothing should ever surface pixels as a coordinate system, ever!

The use of pixels has caused enormous amounts of pain as people switch to 4k displays. They will cause enormous amounts of pain in the future when display technologies change again. Please stop using them. If you must, surface a 'DPI' configuration or something and have it operate at a very low level so coordinates used in almost all parts of the code do not depend on any details of the display like pixels.

We've known not to use pixels for literally decades, and yet people keep using them. Please stop.

Other than that, I like the new UI. :-)
The units on the screen are measured in pixels. if we're not allowed to use pixels, what are we supposed to use?

if you have 200% screen scaling turned on, that's not our problem, and the OS itself SHOULD account for that (even the scaling in the game accounts for that)
DPI? okay, say you have a 24 inch 4K screen, or a 52 inch 4k screen. How many inches should a button take up? (also, seriously, inches? I know DPI is a common term and I'm not sure what the metric equivalent should be, but nobody uses inches anymore.) Honestly, that statement is like saying "I want this icon to be as big as a fish." How big is a fish? is it one of those teeny tiny ones a few millimetres long, or the giant 4 footers you find out in the deep ocean? The computer has no way of knowing (nor should it care) the physical size of your screen, but it does know something, How many pixels across, by how many pixels down. Why shouldn't it use pixels to measure things?

And don't blame software engineers for screens having a higher pixel count. This is one reason why my latest screen has a resolution of 2560x1440, and not 3840x2160, especially with my ageing eyes, I wouldn't have been able to see the detail that fine. If you can't even see the increased pixel density, don't get it!
The reason why the transition to higher density displays has been such a cluster is because devs have outright refused to use a device independent coordinate systems. UI systems should have converted to real world units a long time ago. I honestly couldn't care less what system people use, measure in millimeters or thous, whatever makes you happy. For now DPI/PPI is the industry standard, and you'll have as much luck holding back that ocean as convincing people to start saying "mebibytes."

Displays have been capable of reporting their physical dimensions for a long time now. UI systems should have adopted a decade ago. "This button should be 1.2cm wide" not "this button should be 50 pixels wide". If this had been made standard, the only thing that'd change with a 4k display is fidelity and not UI element size.

Of course, we're still dealing with displays with rectangular pixel layouts on PC monitors, but phones have already moved on to things like PenTile layouts where the concept of a pixel is nebulous. Using a real world metric for UI element measurements is the most sure way to future proof an application. Who knows what direction displays may take, or what a pixel means in something like, e.g., VR.

However, that said, Factorio isn't really in a position to start this trend. It really needs to start at the OS and work its way into standard widget libraries and things like DirectX first. Funnily enough, CSS is ahead of the curve on this probably due to how many different kinds of systems it has to work with. Omnifarious is 100% correct. UI design should have abandoned pixels a long time ago. How many pixels are in a mm of space is something only the rasterizer needs to deal with, assuming your display device even uses a rasterizer.

All that aside, I'm loving the new UI design, and the new office. :)

RobertTerwilliger
Fast Inserter
Fast Inserter
Posts: 196
Joined: Wed Nov 18, 2015 10:12 am
Contact:

Re: Friday Facts #243 - New GUI tileset

Post by RobertTerwilliger »

Hovered switch looks just like enabled one? If so, it will not work good to have jumping switches as you simply hover them bypassing - would be very confusing and distracting. Or is it just a hovered enabled switch?
Holding formation further and further,
Millions of lamb stay in embrace of Judas.
They just need some bread and faith in themselves,
BUT
THE TSAR IS GIVEN TO THEM IN EXCHANGE!
Original: 5diez - "Ищу, теряя" (rus, 2013)

User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7351
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Friday Facts #243 - New GUI tileset

Post by bobingabout »

Deadly-Bagel wrote:Though it doesn't make sense that you use a pickaxe to cut down trees...

I wouldn't say your mining axes add a whole lot to your mods Bob. Within a few hours of starting a game the only thing you use it for is cutting down trees and picking up machines, belts, rails etc and the absurd speeds your axes reach can actually be difficult to work with sometimes, especially when entities overlap as with gates on rails. Maybe if you had some sort of mechanic where you need some Platinum to make a Mining Drill that can mine Platinum, then it might have some importance, as it is I don't think anyone would notice any practical difference if all the bonuses were automatically and permanently applied once the research completes.
I honestly don't have a problem with the change, just as long as people (Especially the developers) don't forget there's a difference between mining speed (just makes whatever you already have faster, it's a multiplier) and mining power (allows you to mine harder ores, and makes mining softer ores easier, it's an addition). Axes right now boost mining power, therefore this is what the tech should boost too.

I think the formula is something like actual speed = (power - hardness) * speed, This is why when mining oil, the resource's hardness is 1, and pumpjack's power is 2, and speed is 1. the result is (2-1)*1 = 1, so it takes 1 second to mine a unit of oil. Also, for some strange reason, mining drills(or pumpjacks) have a mining speed in seconds, where the player entity has a mining speed in ticks, which is why the mining speed on the player entity is defined as something like 0.01 rather than 0.6.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.

JimBarracus
Filter Inserter
Filter Inserter
Posts: 365
Joined: Mon Jul 03, 2017 9:14 am
Contact:

Re: Friday Facts #243 - New GUI tileset

Post by JimBarracus »

I like the new casting couch.
You should setup a camera tripod in front of it.
for the lolz and to scare new people.

User avatar
thereaverofdarkness
Filter Inserter
Filter Inserter
Posts: 558
Joined: Wed Jun 01, 2016 5:07 am
Contact:

Re: Friday Facts #243 - New GUI tileset

Post by thereaverofdarkness »

bobingabout wrote:don't forget there's a difference between mining speed and mining power.
I've been curious about that for a long time. They are essentially useless attributes in-game because vanilla ores within a category generally have the same hardness. I wish the base game would make more use of the hardness attribute.

After reading your explanation, I was able to verify it seems that your equation is correct. I am guessing that without a tool your mining power is 1, which would explain why stone (hardness 0.4) mines many times faster than standard ore (hardness 0.9).

mrvn
Smart Inserter
Smart Inserter
Posts: 5681
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Please, no device dependent coordinates

Post by mrvn »

Omnifarious wrote:
kovarex wrote:1) DPI uses the inch. The imperial measure system should have been eridicated long time ago. It is so bad, it is known for decades, and yet still people use it. Please stop!
2) Well, as long as all the gui elements are scalable, it is not a problem. Currently, one pixel in the toolset is one pixel in 200% ui scale. Why would we specify some other unit like 1/63360 of mile to measure anything, if it doesn't rely in any way to the way it works. Pixels do.
Touché! :lol: I didn't know a better scale to put on your slider. Pixels per mm? Points might work, but after reading the Wikipedia page on them, there isn't really an international consensus on that unit either. I guess scalable pixels are good, but I still advocate for a device independent coordinate system.
As someone that works with both full-hd and 4k displays I have to side with DPIs. Having stuff configured in pixels is annoying when switching displays. A 16 pixel button is fine on a full-hd but way to small on 4k for example. What you really want is to say that the button should be e.g. 10mm wide. The DPI setting lets you convert between mm (or pt) and pixel and means the GUI elements will be the same size on every display.

But please, when you to use DPI and mm (or pt) use it for everything. The biggest problem I have at the moment is that GUIs use pt for fonts so on my 4k display all the fonts are visually the same size as on full-hd. But the window dimensions (and layouts) use pixel, so comparatively the window is much smaller and the fonts don't fit. It's like NASA mixing mm and inch and being surprised things don't work.

Note: Factorio has a scalable GUI. But the scale is device dependent. So on full-hd I have to set the scale to 100% while on 4k I need 200%. If you take the scale set in the config and use the DPI into consideration to generate an internal scale factor then the GUI would look&feel the same on every display without the player changing the scale.

seePyou
Long Handed Inserter
Long Handed Inserter
Posts: 98
Joined: Mon Apr 03, 2017 3:17 pm
Contact:

Re: Friday Facts #243 - New GUI tileset

Post by seePyou »

One thought: The use of any font that has the same character for small L and capital I should be avoided. The Tittilium font fits this description. I would encourage you to change this, if you can, or choose another.

User avatar
mward
Long Handed Inserter
Long Handed Inserter
Posts: 86
Joined: Wed Dec 24, 2014 9:38 am
Contact:

Re: Please, no device dependent coordinates

Post by mward »

mrvn wrote:Note: Factorio has a scalable GUI. But the scale is device dependent. So on full-hd I have to set the scale to 100% while on 4k I need 200%. If you take the scale set in the config and use the DPI into consideration to generate an internal scale factor then the GUI would look&feel the same on every display without the player changing the scale.
With dpi scaling a particular icon will be 10mm wide on a Macbook with "Retina" display, and also 10mm wide on a home cinema TV that you view from your couch across the room. OK, but I don't think that it would "look & feel the same" and I wouldn't call the result "device independent"!

Perhaps "device independent" coordinates should be a percentage of the screen? But some users have good eyesight and play Factorio on a huge screen that they sit right in front of: they want the UI to take up a small amount of screen real estate. The same user playing on a laptop will want the UI to take up more of the screen.

There really is no such thing as "device independent coordinates": scalability is essential, and any coordinate system (including pixels) is just as good as any other. (But it should be consistent: if the fonts are scaled with dpi, then so should the GUI, while if the GUI is pixels then the fonts should be also.)

I would suggest allowing the users to configure a different scaling factor for each different screen that they play on: so that the scale switches to their preferred value each time they switch devices.

meganothing
Fast Inserter
Fast Inserter
Posts: 238
Joined: Thu Sep 15, 2016 3:04 pm
Contact:

Re: Please, no device dependent coordinates

Post by meganothing »

MrGrim wrote: The reason why the transition to higher density displays has been such a cluster is because devs have outright refused to use a device independent coordinate systems. UI systems should have converted to real world units a long time ago.
Not sure if I'm correct with this, but isn't one factor in the reluctance to switch the reliance on fixed fonts? A resterizer can't produce the same excellent results as a handcrafted fixed font, especially at low resolutions. I'm not sure this is still the case with 2k or 4k though.

mrvn
Smart Inserter
Smart Inserter
Posts: 5681
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Please, no device dependent coordinates

Post by mrvn »

meganothing wrote:
MrGrim wrote: The reason why the transition to higher density displays has been such a cluster is because devs have outright refused to use a device independent coordinate systems. UI systems should have converted to real world units a long time ago.
Not sure if I'm correct with this, but isn't one factor in the reluctance to switch the reliance on fixed fonts? A resterizer can't produce the same excellent results as a handcrafted fixed font, especially at low resolutions. I'm not sure this is still the case with 2k or 4k though.
Font sizes are specified in pt, which is device independent. Setting 8pt as font size will calculate that that needs 18 pixel on your 4k display and then load the 18 pixel rasterized fixed font. Fonts are the only thing where the transition has already happened long ago.

mrvn
Smart Inserter
Smart Inserter
Posts: 5681
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Please, no device dependent coordinates

Post by mrvn »

mward wrote:
mrvn wrote:Note: Factorio has a scalable GUI. But the scale is device dependent. So on full-hd I have to set the scale to 100% while on 4k I need 200%. If you take the scale set in the config and use the DPI into consideration to generate an internal scale factor then the GUI would look&feel the same on every display without the player changing the scale.
With dpi scaling a particular icon will be 10mm wide on a Macbook with "Retina" display, and also 10mm wide on a home cinema TV that you view from your couch across the room. OK, but I don't think that it would "look & feel the same" and I wouldn't call the result "device independent"!

Perhaps "device independent" coordinates should be a percentage of the screen? But some users have good eyesight and play Factorio on a huge screen that they sit right in front of: they want the UI to take up a small amount of screen real estate. The same user playing on a laptop will want the UI to take up more of the screen.

There really is no such thing as "device independent coordinates": scalability is essential, and any coordinate system (including pixels) is just as good as any other. (But it should be consistent: if the fonts are scaled with dpi, then so should the GUI, while if the GUI is pixels then the fonts should be also.)

I would suggest allowing the users to configure a different scaling factor for each different screen that they play on: so that the scale switches to their preferred value each time they switch devices.
True. What you really want is for the button to have the same angular size.

The dpi infos give a bunch of information though. Namely you have the size in pixels and in mm. A home cinema TV will be far larger in mm than a laptop display. From that you could deduce that people will size further away from it. Assume the display will be seen with a fixed angular size. On a home cinema TV you sit further back making it appear the same angular size as your laptop.

seePyou
Long Handed Inserter
Long Handed Inserter
Posts: 98
Joined: Mon Apr 03, 2017 3:17 pm
Contact:

Re: Friday Facts #243 - New GUI tileset

Post by seePyou »

Why not just let the UI scale be user defined? Just go there and change it. Not everyone wants specific UI size! I do NOT want my big monitor to be filled with the icons like I was in still in 1080. Others might want huge icons. A slider to control the size of the UI according to personal preference is fine! We need nothing else, and it can serve everyone!

kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Friday Facts #243 - New GUI tileset

Post by kovarex »

seePyou wrote:Why not just let the UI scale be user defined? Just go there and change it. Not everyone wants specific UI size! I do NOT want my big monitor to be filled with the icons like I was in still in 1080. Others might want huge icons. A slider to control the size of the UI according to personal preference is fine! We need nothing else, and it can serve everyone!
You can do it for quite some time. (Options -> interface)

seePyou
Long Handed Inserter
Long Handed Inserter
Posts: 98
Joined: Mon Apr 03, 2017 3:17 pm
Contact:

Re: Friday Facts #243 - New GUI tileset

Post by seePyou »

Which is exactly the point. I don't get the discussion here, since we can set the scale. Whether internally it is pixels, or dpi, or light point per kilometer, who cares? We have a scale setting tool, set it to what you like and move on?

aka13
Filter Inserter
Filter Inserter
Posts: 671
Joined: Sun Sep 29, 2013 1:18 pm
Contact:

Re: Friday Facts #243 - New GUI tileset

Post by aka13 »

The new gui tileset is propably the best gui I ever saw ingame, ever.
Pony/Furfag avatar? Opinion discarded.

TheBoJaN
Manual Inserter
Manual Inserter
Posts: 1
Joined: Tue May 22, 2018 4:08 pm
Contact:

Re: Friday Facts #243 - New GUI tileset

Post by TheBoJaN »

The glow and bevel could be more subtle, the excessive effects make it look like a mid 2000s flash game.

User avatar
thereaverofdarkness
Filter Inserter
Filter Inserter
Posts: 558
Joined: Wed Jun 01, 2016 5:07 am
Contact:

Re: Friday Facts #243 - New GUI tileset

Post by thereaverofdarkness »

seePyou wrote:One thought: The use of any font that has the same character for small L and capital I should be avoided. The Tittilium font fits this description. I would encourage you to change this, if you can, or choose another.
No font should ever do this. Titillium has a difference between I and l: the l is slightly taller. But the difference is small enough to suggest it isn't a very good font. Titillium seems generally very readable overall, but it has a few quirks with some letters. Mostly these are either minor annoyances or subjective views, but it has a few instances in which small details are almost invisible. Case in point: the little nips on u and n.

User avatar
5thHorseman
Smart Inserter
Smart Inserter
Posts: 1193
Joined: Fri Jun 10, 2016 11:21 pm
Contact:

Re: Friday Facts #243 - New GUI tileset

Post by 5thHorseman »

The font should be Verdana.

Everywhere.

On Earth.

User avatar
Sigma1
Fast Inserter
Fast Inserter
Posts: 231
Joined: Mon Nov 21, 2016 5:25 pm
Contact:

Re: Friday Facts #243 - New GUI tileset

Post by Sigma1 »

How about an option for the player to use their own font through mods or something if they want?
With some default one of course, like TItillium or Roboto. Or Verdana.


*monospace intensifies*
she/they

User avatar
Omnifarious
Filter Inserter
Filter Inserter
Posts: 267
Joined: Wed Jul 26, 2017 3:24 pm
Contact:

Re: Friday Facts #243 - New GUI tileset

Post by Omnifarious »

seePyou wrote:Which is exactly the point. I don't get the discussion here, since we can set the scale. Whether internally it is pixels, or dpi, or light point per kilometer, who cares? We have a scale setting tool, set it to what you like and move on?
Mostly it's because I saw things being measured both in points (device independent) and pixels (not device independent). Also, I tend to react very badly to seeing pixels as a unit of measure no matter where it is.

I will say that currently Factorio deals better with 4k screens than almost any other game I have because of the scale option and how it operates. Additionally, the fact that everything is smoothly zoomable also really helps.

Post Reply

Return to “News”