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 #296 - All kinds of bugs

Cars/Tanks remember their color


This really is a tiny feature, the car and tank will now save the color of the passengers when they exit the vehicle.
So now you won't forget which vehicle you were driving, and can warn everyone else on the server: "Pink tank is mine".

All kinds of bugs


As uninteresting as it is; most bugs are boring and typically involve missing code. Someone forgot to implement part of a new feature, forgot that some situation could happen, forgot to check for null. Rarely interesting things show up where everything is working but not how we want it to.

Performance: It's never what you think it is


Recently we had a bug report where a modded game would freeze for a minute for seemingly no reason and then continue like nothing went wrong. It being a heavily modded game my first reaction was to blame it on the mods doing something in a very unoptimized way. But I had to test it to figure out which mod was causing the problem. After reproducing it... I was reminded (again) that it's (almost) never what you think it is. When a train is driven by a player the game has no idea what direction the player will drive (straight, left, or right). So, as the train is moving the game goes over the potential rails in front of the train and asks every gate it finds to open in case the train ends up driving over them. This logic was very simple: get the rail distance it would take the train to stop at its current speed and "walk" down the rails until it exceeded that distance. As it walked, tell any gates on any of those rails to open. That logic is "correct" in that it does what it was supposed to do: open any gates that the train could drive over. What it wasn't accounting for was a rail system where everything looped back onto itself 5-10 times per junction.The time complexity for the algorithm it was using was O(N^2). That's "fine" when N is small. However, in this save file, with this rail network, and with these modded trains (with 2,500% speed bonus from modded fuel no less) it meant N ended up somewhere around 75,865. That - as it turns out - was slow.
Interestingly even though the algorithm was recursive it didn't stack overflow. The old algorithm was executing the "open gates on this rail" 5,755,573,057 times. Many of those requests to open gates where duplicates but the algorithm didn't care. In total it took 57 seconds for it to run all of the logic - still incredibly fast for what it was doing (1.6 million rails per game tick). After some thinking about it; I was able to re-implement the algorithm in worse-case O(N) time which ended up executing the "open gates on this rail" logic 42,913 times and took 0.009 seconds.

Crashing on dereferencing null? Add a null check


I love this phrase. It's both correct and incorrect at the same time. I put it right next to "Crashing from an exception? Just try-catch". It's such an easy trap to fall into: fixing a symptom instead of the cause. Earlier this week we got a bug report about the game freezing, consuming all of the available RAM, and then crashing when it ran out of RAM. It was again a modded save file so my first instinct was to blame it on a mod. Again, I had to test it. And again... it's never what you think it is. The crash was correct: it was running out of RAM and when that happens the game crashes and exits. But why?
  • The game failed to allocate memory when it tried to create a furnace smoke
  • Because it was trying to make 4'294'967'000~ (4 billion) smokes
  • Because a small negative signed integer was being converted to unsigned
Clearly the game wasn't supposed to be making 4 billion smokes. So, seeing the problem my first fix was "Casting a small negative signed integer to unsigned makes it 4 billion? If it's negative, I'll just return 0 since a negative amount of smoke makes no sense". I was about to commit this fix when the smarter part of my brain said "that makes no sense, why would this code ever say to make a negative amount of smoke?" So I kept going ... why?
  • ... Because the logic to make those signed integers was "(cycle progress ...) - (last cycle progress ...)" (cycle was < last cycle ... that should never be possible)
  • Because the furnace burner had made a negative amount of progress in burning the fuel (negative progress should not be possible)
  • Because the "remaining amount of fuel from this item to burn" was negative (negative fuel values are invalid and the game won't even reach the main menu if some mod tries to set one)
  • Because the mod API didn't prevent mods from doing: entity.burner.remaining_burning_fuel = -1 AND the game didn't properly clear "remaining amount of fuel from this item to burn" when the item being burnt was removed due to mod migration/removal.
So, I still repeat the phrase: "Crashing on dereferencing null? Just add a null check!" as a reminder to myself and others to always look deeper into why and never stop at the basic symptom of a problem. As always, let us know what you think on our forum.


[ 2019-05-24 10:07:50 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 ]

2.66$ (11%)
4.95$ (17%)
16.52$ (17%)
7.11$ (11%)
19.97$ (20%)
17.39$ (13%)
4.44$ (78%)
38.22$ (15%)
12.42$ (17%)
25.19$ (16%)
17.79$ (11%)
8.49$ (15%)
25.46$ (15%)
12.71$ (15%)
5.03$ (16%)
25.46$ (15%)
16.96$ (15%)
42.49$ (15%)
41.47$ (17%)
12.71$ (15%)
8.27$ (17%)
24.87$ (17%)
11.27$ (44%)
31.99$ (20%)
4.22$ (15%)
17.79$ (11%)
16.57$ (17%)
25.19$ (16%)
16.96$ (15%)
21.24$ (15%)
GAMERSGATE

[ 764 ]

4.59$ (74%)
0.53$ (92%)
2.55$ (74%)
7.73$ (45%)
8.5$ (66%)
5.09$ (49%)
2.25$ (91%)
0.75$ (92%)
0.6$ (92%)
5.95$ (70%)
4.19$ (30%)
0.77$ (91%)
1.0$ (90%)
0.75$ (92%)
0.64$ (87%)
5.31$ (79%)
0.77$ (91%)
2.55$ (83%)
10.07$ (28%)
5.6$ (53%)
34.99$ (50%)
8.5$ (66%)
1.94$ (84%)
1.0$ (80%)
0.85$ (83%)
8.49$ (32%)
1.58$ (95%)
0.53$ (92%)
3.57$ (74%)
0.85$ (79%)

FANATICAL BUNDLES

Time left:

12 days, 10 hours, 56 minutes


Time left:

19 days, 10 hours, 56 minutes


Time left:

8 days, 10 hours, 56 minutes


Time left:

5 days, 10 hours, 56 minutes


Time left:

13 days, 10 hours, 56 minutes


Time left:

15 days, 10 hours, 56 minutes


Time left:

36 days, 10 hours, 56 minutes


Time left:

356461 days, 2 hours, 56 minutes


Time left:

18 days, 10 hours, 56 minutes


Time left:

47 days, 10 hours, 56 minutes


Time left:

33 days, 10 hours, 56 minutes


HUMBLE BUNDLES

Time left:

0 days, 4 hours, 56 minutes


Time left:

2 days, 4 hours, 56 minutes


Time left:

7 days, 4 hours, 56 minutes


Time left:

9 days, 4 hours, 56 minutes


Time left:

14 days, 4 hours, 56 minutes

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