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

🌟 Special thanks to our amazing supporters:


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

Any feedback for tuxDB? Join us!

Steam ImageSteam ImageSteam ImageSteam ImageSteam Image
Iron Village
Lunar Chippy Games Developer
Lunar Chippy Games Publisher
1970-01-01 Release
Game News Posts: 27
🎹🖱️Keyboard + Mouse
🕹️ Partial Controller Support
🎮 Full Controller Support
Positive (30 reviews)
Public Linux Depots:
  • [0 B]
  • [0 B]
Diary #51 - But what about second [bugfix]?

Alternative Title: "Oops, I did it again!"

So uh, I have yet another bugfix update that just dropped (except on Google Play, 1.1.04 didn't even get approved there yet, so we'll be going straight to 1.1.05 once I get a payments "issue" sorted). There's two bugs fixed, so I figure I'll explain a little about how they happened, and what the fixes entail.

Bright White Hair & Train Cars


So this one seems simple enough to explain: in some situations, loading a save will cause some of the villagers to have bright white hair, and some of the train cars to be bright white. However, the cause has to do with commas, periods, and (parts of) Europe*. The main thing that concerns me is that none of this was new in 1.1, so this problem may have been in the game all along? And the people affected never said anything - I only found out from an unrelated bug report!

*As you'll see later, this applies outside of Europe as well, but that's where the bug was originally reported.

So a couple things need to be laid out to fully understand the issue. First of all, decimal separators. In the English speaking world, we use "." to separate everything above 1 and everything below, e.g. 2.7. However, many other parts of the world (not all of them) use a "," for this, e.g. 2,7. Things get a bit more complicated with the optional separators used for big numbers: two thousand seven hundred and 54 hundredths could be 2,700.54 in English, but 2.700,54 in other parts of the world.

Hold on to that, now it's time for the second part: storing colo(u)r in computers. If you're not printing (where CMYK is more useful), you want to store the red, green, and blue values (RGB) so that you know how much to light up each part of each pixel on the computer screen. There's a few different ways of doing this, sometimes you'll see a hex code (for instance, #ffffff is ff for red, ff for green, and ff for blue; combining these makes bright white), sometimes it'll be a value between 0 and 255 for red, green, and blue, and in our case Godot uses a number between 0.0 and 1.0. (It also stores an alpha value 0.0 to 1.0, where 0.0 is fully transparent and 1.0 is fully opaque.)

In Iron Village, train cars and villagers' hair and clothing have different colors applied to them. Rather than making separate images for each color, the game just stores the color as a separate variable. That way it can use the same texture to make different variations. In order to maintain this data when you save the game and load it later, we have to store this color in the save file. In Iron Village, that save is a "string", basically a bunch of words written out in a text file. It's not the most compressed, but it makes it much more easily readable by humans (or at least, me), which means it's way easier to find bugs.

So at this point, we need to take a number between 0.0 and 1.0 and store it in this text file. Or, we need to read some text and convert it to a number between 0.0 and 1.0. That's easy enough though, just about every common programming language has functionality built in to get this done, or at least some sort of standard library. Since I'm using C#, I just use the built in ToString() and Parse(). It seems to work pretty well, and I don't encounter any issues while developing the game or testing it.

At some point a few months ago, too late to avoid this problem but early enough that it saved me a lot of debugging time, I learned something kind of horrifying: the way C# handles converting numbers to strings and back can depend on the user's locale. That's right, the code behaves differently based on who is running it. My reaction when I discovered this boiled down to "WTF?!", but I hadn't yet realized my code was vulnerable. I had even wrote down a note to audit my code for this sort of thing, I just never got around to it.

With all of that prior knowledge, I open up the save that the bug reporter sent in, and see this:

"Shirt":{"color":"(0.0, 463000.0, 435000.0, 10000.0)"}

The UI of the screenshot was in German, so my first thought was, "uh oh, there's a gonna problem isn't there?" Somehow the save and load were acting differently, so it was reading 0.463000 as 463000 or something like that. The fix I put in was to force the usage of "CultureInfo.InvariantCulture" (i.e. US English, but pretending it's international), and fix existing issues by moving the decimal point for values above 1.

Loud Sounds


In comparison, this was such an easy bug to fix. At some point during development, I split up all of the sounds into two different channels, or "buses": Sounds and Music. Sounds also got split into regular and UI sounds, but the difference isn't user configurable. It turns out that a couple of sounds were missed, and were still on the Master bus, meaning they could be super loud even if you turned the sounds down. This was an easy fix - find the remaining sounds, and put them on a bus.

...and, now I've written a bunch of paragraphs about two bugs, lol. Hopefully that was at least somewhat interesting!


[ 2025-06-23 23:59:31 CET ] [ Original post ]


  • Build houses to give your villagers homes.
  • Clear farm fields to grow a variety of crops, from basic staples to exotic magical ingredients.
  • Open shops that turn raw resources into valuable goods.
  • Construct warehouses to store your resources and goods.


  • Take the resources and goods your villagers make and turn them into gold!
  • Trade for other resources that your villagers need.
  • Invest your gold to expand your village.
  • Refuel trains that stop by on their long journeys.


  • Keep the railway happy and pour in gold to improve it.
  • Unlock new types of goods and resources.
  • Create opportunities to grow into a prospering town!

MINIMAL SETUP
  • OS: Linux distribution released after 2016
  • Processor: Intel Core 2 Duo E8200 or AMD Athlon XE BE-2300Memory: 2 GB RAM
  • Memory: 2 GB RAM
  • Graphics: Intel HD Graphics 5500 (Broadwell) or AMD Radeon R5 Graphics (Kaveri)
  • Storage: 200 MB available spaceAdditional Notes: Full Vulkan 1.0 graphics support required
RECOMMENDED SETUP
  • OS: Linux distribution released after 2020
  • Processor: Intel Core i5-6600K or AMD Ryzen 5 1600Memory: 4 GB RAM
  • Memory: 4 GB RAM
  • Graphics: NVIDIA GeForce GTX 1050 (Pascal) or AMD Radeon RX 460 (GCN 4.0)
  • Storage: 400 MB available spaceAdditional Notes: Dedicated graphics with full Vulkan 1.2 support recommended

GAMEBILLET

[ 6442 ]

5.36$ (82%)
4.46$ (55%)
39.95$ (11%)
17.59$ (12%)
19.59$ (22%)
5.27$ (12%)
6.71$ (78%)
16.79$ (16%)
1.50$ (90%)
24.87$ (17%)
16.79$ (16%)
13.46$ (78%)
9.86$ (51%)
33.14$ (17%)
2.50$ (90%)
12.82$ (57%)
1.60$ (90%)
8.96$ (55%)
2.73$ (73%)
17.19$ (14%)
8.39$ (16%)
1.00$ (90%)
8.39$ (16%)
1.70$ (83%)
20.72$ (17%)
16.57$ (17%)
5.34$ (79%)
8.39$ (16%)
8.20$ (73%)
6.26$ (37%)
GAMERSGATE

[ 2684 ]

3.0$ (70%)
1.88$ (81%)
1.31$ (81%)
5.4$ (82%)
1.05$ (85%)
2.25$ (85%)
0.56$ (81%)
0.56$ (81%)
1.8$ (91%)
3.38$ (62%)
0.58$ (92%)
3.38$ (89%)
0.56$ (81%)
6.0$ (80%)
1.58$ (95%)
2.0$ (90%)
1.7$ (83%)
0.56$ (81%)
2.25$ (89%)
6.0$ (80%)
1.8$ (77%)
1.5$ (85%)
1.0$ (80%)
11.24$ (55%)
7.04$ (65%)
1.5$ (85%)
6.25$ (75%)
0.9$ (77%)
1.32$ (83%)
17.5$ (50%)
MacGamestore

[ 2298 ]

2.49$ (88%)
1.24$ (75%)
1.99$ (80%)
2.99$ (95%)
1.49$ (85%)
2.99$ (85%)
21.99$ (12%)
6.24$ (75%)
4.49$ (70%)
1.69$ (83%)
1.10$ (93%)
1.19$ (76%)
18.99$ (24%)
2.49$ (75%)
1.19$ (88%)
2.49$ (75%)
3.99$ (90%)
3.99$ (80%)
1.19$ (88%)
3.99$ (80%)
1.29$ (91%)
1.99$ (87%)
1.19$ (88%)
2.48$ (75%)
1.09$ (86%)
1.19$ (88%)
3.99$ (80%)
1.29$ (90%)
1.42$ (93%)
1.10$ (84%)

FANATICAL BUNDLES

Time left:

356294 days, 10 hours, 44 minutes


Time left:

1 days, 17 hours, 44 minutes


Time left:

356294 days, 10 hours, 44 minutes


Time left:

1 days, 17 hours, 44 minutes


Time left:

7 days, 17 hours, 44 minutes


Time left:

29 days, 17 hours, 44 minutes


Time left:

12 days, 17 hours, 44 minutes


Time left:

15 days, 17 hours, 44 minutes


Time left:

21 days, 17 hours, 44 minutes


Time left:

26 days, 17 hours, 44 minutes


Time left:

28 days, 17 hours, 44 minutes


Time left:

33 days, 17 hours, 44 minutes


HUMBLE BUNDLES

Time left:

1 days, 11 hours, 44 minutes


Time left:

3 days, 11 hours, 44 minutes


Time left:

8 days, 11 hours, 44 minutes


Time left:

8 days, 11 hours, 44 minutes


Time left:

10 days, 11 hours, 44 minutes


Time left:

17 days, 11 hours, 44 minutes

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