Friday Facts #244 - Localised plurals & Modernisation progress

Regular reports on Factorio development.
peet1993
Inserter
Inserter
Posts: 25
Joined: Fri Sep 01, 2017 8:46 pm
Contact:

Re: Friday Facts #244 - Localised plurals & Modernisation progress

Post by peet1993 »

Read the title and immediately thought about the Computerphile/Tom Scott video. Nice to see it linked in the FFF :)
Nice writeup, very interesting as always! The one thing I don't understand is what the Debug Info pictures mean. Is it OpenGL vs DirectX or 0.17 Main vs Rewrite? If the latter, a 30% Framerate increase is damn impressive.
HammerPiano
Fast Inserter
Fast Inserter
Posts: 232
Joined: Thu Dec 31, 2015 7:36 am
Contact:

Re: Friday Facts #244 - Localised plurals & Modernisation progress

Post by HammerPiano »

with minor fixes to line rendering
Does it mean that the bug where you can't see the wires of power poles is fixed / going to be fixed?
User avatar
ledow
Fast Inserter
Fast Inserter
Posts: 102
Joined: Sat Sep 24, 2016 3:00 pm
Contact:

Re: Friday Facts #244 - Localised plurals & Modernisation progress

Post by ledow »

"minutes=__1__ __plural_for_parameter_1__[1]__minut__[ends in 01-19]__minute__[rest]__de minute__"

Urgh.

Never thought about proper GNU gettext, which is basically designed with this kind of thing in mind and then people can just use a compatible translation program and send you a translated .po?
User avatar
mikiqex
Burner Inserter
Burner Inserter
Posts: 17
Joined: Fri Mar 04, 2016 2:08 pm
Contact:

Re: Friday Facts #244 - Localised plurals & Modernisation progress

Post by mikiqex »

Plurals are often categorized as "zero, one, few, many, other". Unicode have a whole webpage dedicated just to plural rules in different languages: http://www.unicode.org/cldr/charts/33/s ... es.html#cs
ske
Filter Inserter
Filter Inserter
Posts: 412
Joined: Sat Oct 17, 2015 8:00 am
Contact:

Re: Friday Facts #244 - Localised plurals & Modernisation progress

Post by ske »

"...and then he realised that the only way to delay the inevitable for some more time was to make the grammar rules of their language NP-complete."
OvermindDL1
Fast Inserter
Fast Inserter
Posts: 193
Joined: Sun Oct 05, 2014 6:12 am
Contact:

Re: Friday Facts #244 - Localised plurals & Modernisation progress

Post by OvermindDL1 »

This made it clear, that having different translation key for every possible form for every language would be too crazy, so we invented something more generic.
Every project that doesn't use gettext for localization invariably winds up improperly remaking gettext incompletely... >.>

(Not my phrase, but one I hear often and often see being true...)
(we are seeing about 30% more time spent in calls to OGL as opposed to D3D).
And yeah, that is because crappy drivers primarily for equivalently aged OGL/D3D versions, it's amazing just how *bad* some drivers are... >.<

I especially love the occasional user idiots that like to compare OGL2 vs D3D11 or so performance's, like wtf... one is from the mid-late 1990's and the other is a few years old, why wouldn't there be performance differences...

(Yes I know OGL2 extensions let it be *much* faster than originally designed, but still not up to par)
and in future we would like to create Vulkan and Metal backends
Oh there is no point in making a metal backend anymore, the authors of Vulkan (Khronos) made a metal/vulkan conversion library that let's vulkan run on metal (interestingly benchmarks show it to be faster than the equivalently written metal code due to optimizations the interface performs)
By using OpenGL 3.3 Core and DirectX 11 feature level 10.0
Yeah these are not equivalently aged... >.>

Although high marks on using the Core profile!
aklesey1
Smart Inserter
Smart Inserter
Posts: 1862
Joined: Sun May 18, 2014 3:45 pm
Contact:

Re: Friday Facts #244 - Localised plurals & Modernisation progress

Post by aklesey1 »

Waiting for 0.17 version with new graphics engine with more FPS and fewer lags in multiplayer 8-)
Good luck with your fantastic game in new update :)
Nickname on ModPortal - Naron79
melind
Inserter
Inserter
Posts: 27
Joined: Fri Apr 27, 2018 8:11 pm
Contact:

Re: Friday Facts #244 - Localised plurals & Modernisation progress

Post by melind »

And here I thought localization of this sort of thing would have been standardized and wrapped into packages like timezones have been.

If you need, I'm fine with continuing to believe everyone speaks Czech or English. It's a fair assumption.
posila
Factorio Staff
Factorio Staff
Posts: 5343
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Friday Facts #244 - Localised plurals & Modernisation progress

Post by posila »

peet1993 wrote:The one thing I don't understand is what the Debug Info pictures mean. Is it OpenGL vs DirectX or 0.17 Main vs Rewrite? If the latter, a 30% Framerate increase is damn impressive.
Ah, the image was last minute addition (I didn't want to dwell on actual numbers in this post), so I forgot description. It is 0.17 old vs new, DirectX, the game is set to speed 7 and paused so it is rendering the exact same frame. It was about 25k sprites, which is quite common for the game to render, but it is not hard to go to 50k sprites when zooming out in some busy areas or even more (the largest number of sprites rendered I've seen in Factorio was around 300 000 when we tried to generete 1 million tiles long belt loop (it was snaking in square not giant loop) filled with items).
OvermindDL1 wrote:...
By using OpenGL 3.3 Core and DirectX 11 feature level 10.0
Yeah these are not equivalently aged... >.>
I agree, DX11 was released with Windows 7 in October 2009 and OpenGL 3.3 was release alongside of OGL 4.0 in March 2010 (as a kind of OGL4 feature level DX10), DX11FL10 and OGL3.3 both target the same hardware so it is unfair to DX to be compared with the newer API :)
OvermindDL1 wrote: Oh there is no point in making a metal backend anymore, the authors of Vulkan (Khronos) made a metal/vulkan conversion library that let's vulkan run on metal (interestingly benchmarks show it to be faster than the equivalently written metal code due to optimizations the interface performs)
Our macOS guys said Metal would be faster, but if that is not the case, there might really be no reason to have it. We want to do Vulkan first anyway, so if it performs well we might just stick with it on macOS too.
User avatar
Gergely
Filter Inserter
Filter Inserter
Posts: 616
Joined: Sun Apr 10, 2016 8:31 pm
Contact:

Re: Friday Facts #244 - Localised plurals & Modernisation progress

Post by Gergely »

My language uses the same singular word regardless of the quantity. Plural is only ever used if there is no Numeral.

Code: Select all

minutes=__1__perc
OvermindDL1
Fast Inserter
Fast Inserter
Posts: 193
Joined: Sun Oct 05, 2014 6:12 am
Contact:

Re: Friday Facts #244 - Localised plurals & Modernisation progress

Post by OvermindDL1 »

melind wrote:And here I thought localization of this sort of thing would have been standardized and wrapped into packages like timezones have been.

If you need, I'm fine with continuing to believe everyone speaks Czech or English. It's a fair assumption.
There are, the gettext style took over (there is a program gettext that this style came from but it is GPL, however it's been remade a hundred times at this point with better licenses, to various amounts of compliance).
OvermindDL1
Fast Inserter
Fast Inserter
Posts: 193
Joined: Sun Oct 05, 2014 6:12 am
Contact:

Re: Friday Facts #244 - Localised plurals & Modernisation progress

Post by OvermindDL1 »

posila wrote:
OvermindDL1 wrote:...
By using OpenGL 3.3 Core and DirectX 11 feature level 10.0
Yeah these are not equivalently aged... >.>
I agree, DX11 was released with Windows 7 in October 2009 and OpenGL 3.3 was release alongside of OGL 4.0 in March 2010 (as a kind of OGL4 feature level DX10), DX11FL10 and OGL3.3 both target the same hardware so it is unfair to DX to be compared with the newer API :)
Although DX11FL10 came out a little bit after OGL3.3, the original DX11 came out before. The FL10 change was fairly substantial in that it unlocked newer hardware capabilities (honestly it should have just been a DX12 bump).

And OGL3 in general was a definite hack to just try to get GL versioning updated after Khronos took over, GL4 was a better overall design, but still not great, which is why they came out with Vulkan a bit after (Vulkan is essentially just GL-done-right, and yes though a touch more verbose and have to manage your own GPU memory and the Command Queues and so forth, I still find it far superior to work in).

But yes, OGL3.3 <-> DX10 in rough feature set (ignoring non-generic extensions), OGL4 <-> DX11 (assuming using the proper methods on both then they should perform near identically on well made drivers for both). And of course Vulkan <-> DX12.
posila wrote:
OvermindDL1 wrote: Oh there is no point in making a metal backend anymore, the authors of Vulkan (Khronos) made a metal/vulkan conversion library that let's vulkan run on metal (interestingly benchmarks show it to be faster than the equivalently written metal code due to optimizations the interface performs)
Our macOS guys said Metal would be faster, but if that is not the case, there might really be no reason to have it. We want to do Vulkan first anyway, so if it performs well we might just stick with it on macOS too.
Metal was *substantially* faster than OGL on the Mac's, though OGL is at an even more of a disadvantage there as the drivers are on the order of 'bloody ancient' because Apple doesn't like following standards... >.<

Let me see if I can find what that is called again (I program for linux, not mac's...), to the google...
Here it is, the press release about MoltenVK/LunarG: https://www.khronos.org/news/press/vulk ... -platforms
And an initial tech news article that has a lot of useful links at the bottom of the article (github link, Mac SDK page for it, etc... etc.. all free): https://www.anandtech.com/show/12465/kh ... opensource
User avatar
Lubricus
Filter Inserter
Filter Inserter
Posts: 298
Joined: Sun Jun 04, 2017 12:13 pm
Contact:

Re: Friday Facts #244 - Localised plurals & Modernisation progress

Post by Lubricus »

I think there is more non Steam players than Steam players that runs the game on ancient hardware. So the real numbers that can't play 0.17 is probably a little bit higher.
Reading about plural the Czech version sounds reasonable and then get astound of all the ridiculous variants in other languages.
TPReal
Burner Inserter
Burner Inserter
Posts: 15
Joined: Sat Dec 16, 2017 7:43 pm
Contact:

Re: Friday Facts #244 - Localised plurals & Modernisation progress

Post by TPReal »

It's really worrying that you want to do i18n by some custom code. It's impossible to get right, just like time zones. The only correct way to do this is to use the standard approach that somebody mentioned here already.

What would be the i18n for Polish, where there is one form for 1, another form for all numbers ending in 2-4 apart from numbers ending in 12-14, and third form for the rest? Can you express that? How ugly will the string get?

Remember that also there are different forms for zero, e.g. French uses singular there, if I recall correctly, while English uses plural. Do you really want to learn all of that, instead of using industry standard?
posila
Factorio Staff
Factorio Staff
Posts: 5343
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Friday Facts #244 - Localised plurals & Modernisation progress

Post by posila »

OvermindDL1 wrote:Although DX11FL10 came out a little bit after OGL3.3, the original DX11 came out before. The FL10 change was fairly substantial in that it unlocked newer hardware capabilities (honestly it should have just been a DX12 bump).
Ah, I think we are not talking about the same thing. DirectX 11 feature level 10 means subset of DX11 API that can be used with DirectX 10 class hardware. (It is a initialization flag, so the API shouldn't let me use something that can't be used with downlevel HW, we have to use DX 10 shaders etc.) while it seems to me you mean DX 11.1 - 11.4 which are available only on newer versions of Windows (11.1 is somewhat available on Windows 7 but with limited feature set compared to Windows 8)
OvermindDL1
Fast Inserter
Fast Inserter
Posts: 193
Joined: Sun Oct 05, 2014 6:12 am
Contact:

Re: Friday Facts #244 - Localised plurals & Modernisation progress

Post by OvermindDL1 »

posila wrote:
OvermindDL1 wrote:Although DX11FL10 came out a little bit after OGL3.3, the original DX11 came out before. The FL10 change was fairly substantial in that it unlocked newer hardware capabilities (honestly it should have just been a DX12 bump).
Ah, I think we are not talking about the same thing. DirectX 11 feature level 10 means subset of DX11 API that can be used with DirectX 10 class hardware. (It is a initialization flag, so the API shouldn't let me use something that can't be used with downlevel HW, we have to use DX 10 shaders etc.) while it seems to me you mean DX 11.1 - 11.4 which are available only on newer versions of Windows (11.1 is somewhat available on Windows 7 but with limited feature set compared to Windows 8)
Indeed I am! Thanks for the clarification, I'm not up on the various Windows lingo oddities (linux-dev again). ^.^;
kse
Manual Inserter
Manual Inserter
Posts: 3
Joined: Mon Apr 24, 2017 5:08 pm
Contact:

Re: Friday Facts #244 - Localised plurals & Modernisation progress

Post by kse »

That was a bombshell to start the weekend off.

Dropping Linux support, man, I thought you guys were cool :(
OvermindDL1
Fast Inserter
Fast Inserter
Posts: 193
Joined: Sun Oct 05, 2014 6:12 am
Contact:

Re: Friday Facts #244 - Localised plurals & Modernisation progress

Post by OvermindDL1 »

kse wrote:That was a bombshell to start the weekend off.

Dropping Linux support, man, I thought you guys were cool :(
Wait what? Where'd you get that?!
Post Reply

Return to “News”