Friday Facts #216 - Paving a path for the GUI update

Regular reports on Factorio development.
User avatar
impetus maximus
Smart Inserter
Smart Inserter
Posts: 1299
Joined: Sat Aug 20, 2016 10:07 pm
Contact:

Re: Friday Facts #216 - Paving a path for the GUI update

Post by impetus maximus »

the coder suggested a rewrite and failed to do so.
all the jobs i've had, if i can't do my job, i lose said job. :roll:
CobraA1
Inserter
Inserter
Posts: 30
Joined: Sun May 04, 2014 4:31 am
Contact:

Re: Friday Facts #216 - Paving a path for the GUI update

Post by CobraA1 »

I kinda wanted to write this for 212, but never really got around to it. That said, this blog post is similar, so I'd like to say it.

I'd like to encourage the developers not to turn the UI into something akin to "everything is a button." This is one of the things that made early versions of Blender difficult to work with - whether something was a radio button, a checkbox, or something else, everything looked like a button. In my opinion, that was one of the things that made early versions of Blender difficult to work with. Current versions of Blender are much better, in part to having more varied controls.
DaemosDaen
Long Handed Inserter
Long Handed Inserter
Posts: 70
Joined: Sat May 16, 2015 4:39 am
Contact:

Re: Friday Facts #216 - Paving a path for the GUI update

Post by DaemosDaen »

CobraA1 wrote:I kinda wanted to write this for 212, but never really got around to it. That said, this blog post is similar, so I'd like to say it.

I'd like to encourage the developers not to turn the UI into something akin to "everything is a button." This is one of the things that made early versions of Blender difficult to work with - whether something was a radio button, a checkbox, or something else, everything looked like a button. In my opinion, that was one of the things that made early versions of Blender difficult to work with. Current versions of Blender are much better, in part to having more varied controls.
Don't think they are changing the GUI style so much as they are changing the underlying code of the GUI.
Zavian
Smart Inserter
Smart Inserter
Posts: 1648
Joined: Thu Mar 02, 2017 2:57 am
Contact:

Re: Friday Facts #216 - Paving a path for the GUI update

Post by Zavian »

Tomik wrote: Maybe it will finally force the lazybones who haven't fixed bugs in their mods since 0.14 (and basically only made their mods compatible for 0.15 and nothing else) to get up their arse and start working on their mods again. ;)
People lose interest in things and move on. If they aren't interested in their mod atm, then more likely they will not make the changes that this will require, and their mod will be effectively orphaned. Most we can realistically ask unpaid volunteers to do at that point is make sure the mod's licence allows distribution of changed versions and hence lets other people maintain the mod.
User avatar
jockeril
Filter Inserter
Filter Inserter
Posts: 372
Joined: Sun Feb 08, 2015 11:04 am
Contact:

Re: Friday Facts #216 - Paving a path for the GUI update

Post by jockeril »

I'll just put it here then:

Maybe it's a good time to add R-T-L support to the game. A lot of players in the middle East enjoy the game already, but many more who don't speak or read English could join as well.

It's not helpful to three game industry to ignore that crowd and Wobe can make this another first and pave the way for others to have a much larger following and market share by considering us, especially since you offer the ability to add translation to the game by the players and modders (one is already fully on board with rtl support of his mods - the great Narc)

Think about it - the foundation is there, just add the R-T-L support before 1.0
My mods

Formerly Hebrew translator for FARL & EvoGUI - two mods I highly recommend for anyone to check-out

join me on
- Twitter[@jockeril],
- Twitch.tv/jockeril,
- Youtube/jocker-il (or JoCKeR-iL)
- and steam !
Image
golfmiketango
Filter Inserter
Filter Inserter
Posts: 549
Joined: Fri Jan 29, 2016 2:48 am
Contact:

Re: Friday Facts #216 - Paving a path for the GUI update

Post by golfmiketango »

One recipe for GUI framework design success is to steal as many ideas as possible from Borland Delphi. That's what Java and .NET did (although Java managed to make a hash of it). In particular, Borland's object hierarchy specifying types of alignment, stretchiness and containment is easy to grasp intuitively, logically consistent, sufficient for most things, and not too expensive computationally. It's for this reason that, to this day, people keep going back to the fairly shitty Object Pascal language -- the GUI design experience it offered is, to this day, unparallelled, in my opinion.

If you don't feel like paying for Embarcadero products (they're not outrageously expensive if you stick to the entry-level versions, and come with full non-free source code for the relevant GUI bits), most of the important parts have been reimplemented in the open source Lazarus project, on top of the also open-source Free Pascal Object-Pascal-language-clone.

I realize nobody knows Object Pascal, but one will pretty quickly discover that it's sufficiently brain-dead that you don't really need to know the language just to read it. Check out the "Alignment," "Anchors," and "Constraints" properties in particular -- this is where the magic happens. I'm pretty sure none of the fundamentals have changed over the past ten years, so I wouldn't worry about utilizing ancient youtube videos and the like, they will likely remain almost completely applicable today.
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Friday Facts #216 - Paving a path for the GUI update

Post by kovarex »

menschmaschine wrote:Kovarex wrote :
At that time, one of the new programmers wanted to fix some of the hacks. The result was, that he wanted to fix everything, and after 9 months of repeated inability to show anything, he was fired.
That makes me sad too and a little bit angry.
Why would a guy be fired after failing at fixing something that by your own admission is a total chaos and only an be resolved by a total rewrite? Not to mention, as you wrote,
he went onto that task out of his own will, not because he was given that task. Also: Letting him try for 9 (nine) months and -then- kicking him out seems to be a little bit weird.
I would have waited 1 month maximum and then i would not have him fired, but taken that task away from him to free him up for other things.

(I do not know the poor guy and it is not my goal to start any drama here, i just express my opinion (which is solely based on this FF#216) about this specific company-behaviour)

I hope the Devs handle such situations better in the future, who knows what talent got lost that time just because he could not fix something that was unfixable?
Well, all this time, he was persuading us that he is going to have a demo to show in a week or two. And in nine months he wasn't able to show anything. I had my first demo to show after 2 days of working on it ...
Ormek
Inserter
Inserter
Posts: 47
Joined: Mon Oct 03, 2016 8:44 am
Contact:

Re: Friday Facts #216 - Paving a path for the GUI update

Post by Ormek »

Well done. What you are doing now is perfectly right!

UI libraries are very very often used incorrectly and then are blamed for not working correctly. As no one ever really dived into you UI api, but everyone just used it, until his use case was working, error chaos and surprises were to be expected. For a single use case writing either an object specific paint, repaint, update or refresh method will work, but in the long run only one of these methods is the right one for the task at hand.

Creating regression tests and fixing things not only until they work, but until you also understand why, is the right approach.
User avatar
ChurchOrganist
Filter Inserter
Filter Inserter
Posts: 256
Joined: Sun Apr 17, 2016 12:45 pm
Contact:

Re: Friday Facts #216 - Paving a path for the GUI update

Post by ChurchOrganist »

I've always thought that what would really make the Factorio GUI truly awesome would be to have things like Map View, Technology, Power and Logistics stats appear in their own window, thus enabling those with multiple monitors to display them permanently.

Perhaps a thought for the future??
Want to know where the biters chewing your power plant have come from??
Wondering where your next iron is going to come from??
You need Long Range Radar
User avatar
Alice3173
Fast Inserter
Fast Inserter
Posts: 124
Joined: Sun Apr 24, 2016 11:35 pm
Contact:

Re: Friday Facts #216 - Paving a path for the GUI update

Post by Alice3173 »

ssilk wrote:PS: What remains is just to replace lua with javascript ... <duck> ;)
It'd be nice if they could replace lua with literally anything with better syntax. I don't see how

Code: Select all

IF x THEN
    --whatever
ELSE
    --whatever else
END
is possible easier to parse than

Code: Select all

if (x) {
    //whatever
} else {
    //whatever else
}
The second way is far easier to parse and locate the beginning and end of chunks of code.

Lua being so crappy is the only reason I haven't looked into modding more myself.
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Friday Facts #216 - Paving a path for the GUI update

Post by kovarex »

Alice3173 wrote:
ssilk wrote:PS: What remains is just to replace lua with javascript ... <duck> ;)
It'd be nice if they could replace lua with literally anything with better syntax. I don't see how

Code: Select all

IF x THEN
    --whatever
ELSE
    --whatever else
END
is possible easier to parse than

Code: Select all

if (x) {
    //whatever
} else {
    //whatever else
}
The second way is far easier to parse and locate the beginning and end of chunks of code.

Lua being so crappy is the only reason I haven't looked into modding more myself.
I agree with you (not in the egyptian brackets style, but in the rest).
Next time I'm about to choose a script language it isn't going to be lua, there are more reasons than this one.
User avatar
Alice3173
Fast Inserter
Fast Inserter
Posts: 124
Joined: Sun Apr 24, 2016 11:35 pm
Contact:

Re: Friday Facts #216 - Paving a path for the GUI update

Post by Alice3173 »

kovarex wrote:(not in the egyptian brackets style, but in the rest).
Ah yeah, I forgot most programmers tend to put curly braces on separate lines from their corresponding statements. I've gotten in the habit of placing them on the same line as their corresponding statements simply to save space. Both methods are perfectly fine in my opinion though.
Next time I'm about to choose a script language it isn't going to be lua, there are more reasons than this one.
From what I've seen Lua's primary advantage is actually for non-programmers. It's easier for a lot of people to learn it than a more typical language. But it causes all sorts of issues when people try to move on to learning other languages. There's the syntax differences which are pretty major and arrays starting at 1 instead of 0 and so on. C# seems to be a pretty popular choice for scripting in games lately and it's probably an overall superior choice on nearly everything.
Jap2.0
Smart Inserter
Smart Inserter
Posts: 2370
Joined: Tue Jun 20, 2017 12:02 am
Contact:

Re: Friday Facts #216 - Paving a path for the GUI update

Post by Jap2.0 »

Alice3173 wrote:
kovarex wrote:(not in the egyptian brackets style, but in the rest).
Ah yeah, I forgot most programmers tend to put curly braces on separate lines from their corresponding statements. I've gotten in the habit of placing them on the same line as their corresponding statements simply to save space. Both methods are perfectly fine in my opinion though.
Next time I'm about to choose a script language it isn't going to be lua, there are more reasons than this one.
From what I've seen Lua's primary advantage is actually for non-programmers. It's easier for a lot of people to learn it than a more typical language. But it causes all sorts of issues when people try to move on to learning other languages. There's the syntax differences which are pretty major and arrays starting at 1 instead of 0 and so on. C# seems to be a pretty popular choice for scripting in games lately and it's probably an overall superior choice on nearly everything.
How about we use Visual Basic? I know that and it's not hard to learn, but isn't overly simple in syntax and stuff.
True story actually, it was the only programming language I had easily available at the time.
Please don't kill me it, was a joke, I didn't really mean it.
There are 10 types of people: those who get this joke and those who don't.
pleegwat
Filter Inserter
Filter Inserter
Posts: 278
Joined: Fri May 19, 2017 7:31 pm
Contact:

Re: Friday Facts #216 - Paving a path for the GUI update

Post by pleegwat »

Well, if you're offering bindings for C#, wouldn't that mean any other .net language would also work?
ohmusama
Inserter
Inserter
Posts: 29
Joined: Sat Jan 14, 2017 2:05 am
Contact:

Re: Friday Facts #216 - Paving a path for the GUI update

Post by ohmusama »

pleegwat wrote:Well, if you're offering bindings for C#, wouldn't that mean any other .net language would also work?
even f# :)
PunkSkeleton
Long Handed Inserter
Long Handed Inserter
Posts: 83
Joined: Sun Oct 09, 2016 2:10 pm
Contact:

Re: Friday Facts #216 - Paving a path for the GUI update

Post by PunkSkeleton »

kovarex wrote: Well, all this time, he was persuading us that he is going to have a demo to show in a week or two. And in nine months he wasn't able to show anything. I had my first demo to show after 2 days of working on it ...
I know your pain. But in my case it was a remote team that kept saying that tests will be finished tomorrow for 3 weeks. Then I went there, saw what they are doing and I estimated 2 more weeks which was correct. Somehow we don't work with remote team anymore even though my company's strategic goal is to do so. Overoptimism is a mistake but when you don't communicate problems it's a BIG mistake.
Tergiver
Inserter
Inserter
Posts: 26
Joined: Tue Jul 05, 2016 2:27 am

Re: Friday Facts #216 - Paving a path for the GUI update

Post by Tergiver »

Olreich wrote:... While you're playing with the GUI, can you give mod authors a way to create additional views when you click on an object? The biggest thing here is inserters. Customizing inserter positions in Bob's mods is quite ungainly right now (requiring a special key bind). It could be just an additional circuit connection/logistics network connection pop-out view with support.
This is a great suggestion. I would love to be able to left-click on an inserter and see Bob's inserter options instead of having to invoke a separate key.. twice (once to open and again to close the dialog). But if it's an additional circuit connection pop-out, that would require two left-clicks. No!
User avatar
Dev-iL
Filter Inserter
Filter Inserter
Posts: 304
Joined: Thu Jul 02, 2015 2:48 pm
Contact:

Re: Friday Facts #216 - Paving a path for the GUI update

Post by Dev-iL »

To join jockeril's comment - what are the prospects for true RTL support in Factorio? Should we give up hope, or is there a chance that this issue gets some attention?

The last time someone worked on this was when Kuba integrated the inversion script for Hebrew strings - but this never solved (possibly worsened?) line wrapping issues. It seems that the GUI system would chop strings at newline chars and display text objects vertically according to line order... The result is that multi-line Hebrew (and I bet Arabic) text has to be read bottom to top.... This is perhaps the most obvious problem. The other big issue is the relative placement of elements on the screen which is a different issue that deserves its own post - though Microsoft and Android historically solved it by simply mirroring the entire UI.

As you can see, the problems are not complicated to describe, but of course coding is a whole different story.

I'd love your comment on this @kovarex!
Leading Hebrew translator of Factorio.
User avatar
hitzu
Filter Inserter
Filter Inserter
Posts: 539
Joined: Tue Sep 09, 2014 5:55 pm
Contact:

Re: Friday Facts #216 - Paving a path for the GUI update

Post by hitzu »

As far as I know, making an R2L support basically means doubling the work to be done. You basically have to duplicate every GUI element. Taking into account very small Hebrew audience and good knowledge of English among Israeli people relative to the amount of work to be done, there is a high probability that devs won't do that. I could be wrong though. But I feel your pain, there are tons of MMOs and coop games where is no support for basic Unicode so I and my friends couldn't speak in that games our native Russian. They basically push the conversations out of the game forcing us to use a third-party software. And every time when we raised the question we got only a cold ignoring.
vanatteveldt
Filter Inserter
Filter Inserter
Posts: 947
Joined: Wed Nov 25, 2015 11:44 am
Contact:

Re: Friday Facts #216 - Paving a path for the GUI update

Post by vanatteveldt »

hitzu wrote:As far as I know, making an R2L support basically means doubling the work to be done. You basically have to duplicate every GUI element. Taking into account very small Hebrew audience and good knowledge of English among Israeli people relative to the amount of work to be done, there is a high probability that devs won't do that. I could be wrong though. But I feel your pain, there are tons of MMOs and coop games where is no support for basic Unicode so I and my friends couldn't speak in that games our native Russian. They basically push the conversations out of the game forcing us to use a third-party software. And every time when we raised the question we got only a cold ignoring.
Note that hebrew is a tiny language, even if many Israeli are relatively affluent. However, Arabic is also written r2l and has 300M native speakers, and the script is also used for Persian, Urdu, and Pashtu with something like 50M speakers each. So, the market for r2l is a lot bigger than the 5M Israeli Hebrew speakers (but I wouldn't place any bets on the English proficiency of the average Israeli - you've probably mostly met University educated ones, the "man in the street" speaks barely any English (depending on the street, of course...)

https://en.wikipedia.org/wiki/List_of_l ... e_speakers
https://en.wikipedia.org/wiki/Arabic_script
https://en.wikipedia.org/wiki/Right-to- ... nt_scripts
Post Reply

Return to “News”