TUXDB - LINUX GAMING AGGREGATE
by NuSuey
NEWSFEED
▪️ GAMES
▪️ STEAM DECK ▪️ DEALS ▪️ CROWDFUNDING ▪️ COMMUNITY
tuxdb.com logo
Support tuxDB on Patreon
Currently supported by 9 awesome people!

🌟 Special thanks to our amazing supporters:


✨ $10 Tier: [Geeks Love Detail]
🌈 $5 Tier: [Arch Toasty][Benedikt][David Martínez Martí]

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

Hello, I wanted to write about the things I'm improving in our GUI library, but I realized, that the important part is to explain what is the motivation to do so. So let me present the history of Factorio GUI.

Version 0.X


Back in the day when Factorio started, I was quite clueless. I needed some GUI library for allegro, and agui was the only one I could find, so I started using it. As in most of the story, I didn't really pay much attention to GUI, it was just the pesky part of the code which I needed to work in order for the game to function. There weren't much GUIs back then, and most of them were done by manually placing bunch of elements so it is possible to interact with it. The look and positioning was quite random.
The previous strategy stopped being possible quite soon, and we realized that we can't just manually place widgets in a window, so we started to use the layout functionality to build the GUI, so it doesn't break immediately once it contains just a little bit of different data. At that time, it was good.

Version 0.5


It is hard to believe now, but at that time, I was insisting, that the GUI is OK, and we don't need to improve it, but luckily, I was persuaded by Albert and Tomas that we need to give the GUI a better look. That was how was the look similar to the current one created. We needed to add hierarchical graphical style system to be able to control the looks and positioning of individual elements, so we did it. We also needed to add several additional functions to the layout mechanism as the need to make these two windows have the same height automatically and similar things. So we made specialised features for that by bending some of the original GUI library code. It usually worked, and when it didn't we made little hacks here and there to make it work. It also created new problems, like the random margins of elements that were supposed to be aligned with something. As all of this was made by unique specific numbers of widths/heights of elements, it could never work right, as all the style values were scaled depending on the resolution.
Here for example, the progress bar style was specified to have a somewhat correct width, and we didn't even care or understand how bad it is.

Version 0.6


It was identified at this time, that we need some mechanism to solve these kind of problems, so I created the stretchable functionality. As I was clueless about the library internals, I was afraid to break anything, the usage of it was quite awkward, it had to be used together with the functionality of mechanism from 0.5 to stretch windows to have the same width/height. You needed to set correctly some of the style values and some of the C++ object values to make it work properly. You had to set the stretchable not only the element but all of the parent elements etc. But it worked ...

Current day


Small hacks here and there accumulated. When you use stretch layout and set align to right doesn't work? Well just set the layout to go from right to left and put things in opposite order. Isn't the layout doing what you need? Just calculate the needed dimensions manually and force them in the style. And much more ... New people started joining our team and they didn't know the subtle things you needed to push to make it work and lot of new code was created with even more hacks. The GUI started to be a crazy complex beast. 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. After that time, GUI was considered even more scary. Things like this started to appear all over the place in the desparate hopes of making it work:
Some people have even shown their disgust by naming their variables:

GUI refactoring


Now we are facing the need to make the GUI update (first part was presented in one of the recent fffs). At this point, you have some idea of how painful would it be to just glue the needed additions to our current GUI. It would be painful complexity squared. This is why I decided to roll up my sleeves and just dive into it. I started rewriting and clean-up the core parts of how the layout works. At this is point, I have a branch that has 52k lines of changes compared to master, and the internal workings of the GUI have been revised a lot. A lot of the mechanisms that had to be hacked painfully work automatically and there is much less code and knowledge needed to write the GUI in the new branch. But this also means, that we have to go through every single GUI and remove the previous hacks by the new functionality, which is a lot of work. To aid in the GUI simplification work, we created a simple GUI debug view, to let us quickly see how are the layouts stacked. I will leave it in the game, as it could be also useful for modders when they need to debug their GUI structures.

On top of that, I started to write GUI tests, as GUI layout is the great example of piece of software, where fixing one thing breaks some other without you knowing. These changes will also change the way modders specify GUI structures (mainly related to the align and stretching), but it wouldn't be us if we didn't break mod compatibility in a new release. As always, let us know what you think on our forums.


[ 2017-11-10 18:36:06 CET ] [ Original post ]

Factorio
Wube Software LTD. Developer
Wube Software LTD. Publisher
2020-08-14 Release
Game News Posts: 506
🎹🖱️Keyboard + Mouse
Overwhelmingly Positive (164072 reviews)
The Game includes VR Support
Public Linux Depots:
  • Factorio Linux64 [306.86 M]
  • Factorio Linux32 [300.1 M]
Available DLCs:
  • Factorio: Space Age
Factorio is a game in which you build and maintain factories. You will be mining resources, researching technologies, building infrastructure, automating production and fighting enemies. In the beginning you will find yourself chopping trees, mining ores and crafting mechanical arms and transport belts by hand, but in short time you can become an industrial powerhouse, with huge solar fields, oil refining and cracking, manufacture and deployment of construction and logistic robots, all for your resource needs. However this heavy exploitation of the planet's resources does not sit nicely with the locals, so you will have to be prepared to defend yourself and your machine empire.

Join forces with other players in cooperative Multiplayer, create huge factories, collaborate and delegate tasks between you and your friends. Add mods to increase your enjoyment, from small tweak and helper mods to complete game overhauls, Factorio's ground-up Modding support has allowed content creators from around the world to design interesting and innovative features. While the core gameplay is in the form of the freeplay scenario, there are a range of interesting challenges in the form of the Scenario pack, available as free DLC. If you don't find any maps or scenarios you enjoy, you can create your own with the in-game Map Editor, place down entities, enemies, and terrain in any way you like, and even add your own custom script to make for interesting gameplay.

Discount Disclaimer: We don't have any plans to take part in a sale or to reduce the price for the foreseeable future.

What people say about Factorio


  • No other game in the history of gaming handles the logistics side of management simulator so perfectly. - Reddit
  • I see conveyor belts when I close my eyes. I may have been binging Factorio lately. - Notch, Mojang
  • Factorio is a super duper awesome game where we use conveyor belts to shoot aliens. - Zisteau, Youtube

MINIMAL SETUP
  • OS: Linux (tarball installation)
  • Processor: Dual core 3Ghz+Memory: 4 GB RAM
  • Memory: 4 GB RAM
  • Graphics: OpenGL 3.3 core. DirectX 10.1 capable GPU with 512 MB VRAM - GeForce GTX 260. Radeon HD 4850 or Intel HD Graphics 5500
  • Storage: 3 GB available space
RECOMMENDED SETUP
  • OS: Linux (tarball installation)
  • Processor: Quad core 3GHz+Memory: 8 GB RAM
  • Memory: 8 GB RAM
  • Graphics: OpenGL 4.3 core. DirectX 11 capable GPU with 2 GB VRAM - GeForce GTX 750 Ti. Radeon R7 360
  • Storage: 3 GB available space
GAMEBILLET

[ 6102 ]

5.87$ (16%)
20.74$ (17%)
8.37$ (16%)
12.42$ (17%)
18.39$ (8%)
24.87$ (17%)
6.67$ (78%)
42.34$ (15%)
4.24$ (-42%)
16.57$ (17%)
19.95$ (20%)
12.74$ (15%)
2.53$ (72%)
4.14$ (17%)
25.49$ (15%)
8.49$ (15%)
8.39$ (16%)
21.99$ (12%)
5.09$ (15%)
12.27$ (18%)
8.89$ (11%)
16.39$ (18%)
31.14$ (11%)
25.17$ (16%)
21.21$ (15%)
8.89$ (11%)
25.46$ (15%)
2.22$ (78%)
16.57$ (17%)
34.79$ (13%)
GAMERSGATE

[ 764 ]

0.53$ (92%)
0.85$ (91%)
19.99$ (20%)
0.9$ (92%)
2.04$ (66%)
1.35$ (89%)
2.25$ (77%)
8.49$ (58%)
9.0$ (70%)
10.58$ (47%)
0.75$ (92%)
3.83$ (74%)
0.5$ (49%)
0.53$ (92%)
0.85$ (83%)
4.59$ (74%)
1.25$ (75%)
0.43$ (91%)
2.1$ (79%)
5.44$ (66%)
0.77$ (91%)
0.68$ (86%)
0.53$ (92%)
6.8$ (66%)
10.83$ (28%)
3.49$ (30%)
2.0$ (50%)
1.7$ (91%)
0.81$ (91%)
0.53$ (92%)

FANATICAL BUNDLES

Time left:

12 days, 10 hours, 53 minutes


Time left:

19 days, 10 hours, 53 minutes


Time left:

8 days, 10 hours, 53 minutes


Time left:

5 days, 10 hours, 53 minutes


Time left:

13 days, 10 hours, 53 minutes


Time left:

15 days, 10 hours, 53 minutes


Time left:

36 days, 10 hours, 53 minutes


Time left:

356461 days, 2 hours, 53 minutes


Time left:

18 days, 10 hours, 53 minutes


Time left:

47 days, 10 hours, 53 minutes


Time left:

33 days, 10 hours, 53 minutes


HUMBLE BUNDLES

Time left:

0 days, 4 hours, 53 minutes


Time left:

2 days, 4 hours, 53 minutes


Time left:

7 days, 4 hours, 53 minutes


Time left:

9 days, 4 hours, 53 minutes


Time left:

14 days, 4 hours, 53 minutes

by buying games/dlcs from affiliate links you are supporting tuxDB
🔴 LIVE