1/17/2022 - devlog
Michi details a very curious case of bug squashing, and Martin talks Steam.
Michi (molp)
Over the course of the last few months or so a lot of smaller issues and bugs have been piling up in our issue tracker. This week I tried to fix as many of them as I could for the upcoming maintenance release.
Just to give you an idea, here are a few of them:
I added a few more details to the material transfer view of the mobile UI. The top row now also contains the name of the source inventory and shows the amount of materials of the given type in the target inventory. I also fixed the display of the slider component when there are more materials in the source inventory than the target inventory can accept. The transfer dialog now is also able to transfer items like shipments and doesn't crash when trying to do so.
Also mobile related: The stack of buffered cards did grow without limits so far. Some players reached 1000+ cards in that stack. I added an automatic culling mechanism that removes the old cards once the amount is above a certain threshold. So no need to manually remove them anymore.
We had a long-standing bug that would prevent the filling up of an FTL tank (for example) to the maximum if there was fuel left. This didn't occur every time, and led some players to assume that it couldn't be filled to the maximum, because there were fractional parts of the inventory that we didn't show in the user interface. That is not true! All inventories (ships, bases, tanks, warehouses, etc) only contain integer amounts of materials. The reason for that bug lies in how computers work with numbers.
Take the number 1/6
for example. To represent it in decimal form we would write 0.1666..
. If we needed a certain precision we'd have to round at one point, because in the decimal system we use we cannot represent 1/6
in short form. The same is true for the binary system the computer uses.
In the concrete situation we have a fuel tank that can hold 300
units of FTL fuel (15t
in sum) with each unit weighing 0.05
t. Let's assume the tank only has one unit of fuel left. To calculate how many more units fit into the tank, we can simply use this formula:
available = (capacity - load) / material_weight
and fill in our values
= (15 - 0.05)/0.05
which results in 298.99999999999994
.
This is very close to the result we expect: 299
units will fit into the tank, but to be sure that this calculation yields an amount that fits into the tank every time, we have to round the result down. Rounding down leaves us with 298
which is exactly one unit shy of the maximum and thus leads to the bug we all encountered in the past.
Nick
Last week was a bit short for me since I got sick and had to take some time off. I was able to reach out to some influencers and work on a few smaller tasks like Reddit ads, etc. Hopefully this week I can be a bit more productive. Jet lag has been such a pain in the neck this year!
Martin
Happy new year everyone! Michi already hinted at it in his last devlog, but last week, we sat together to come up with a plan for the first quarter of 2022. Since the livestream in December, it's common knowledge that we are working on a Steam port. And as we mentioned on said stream, the primary motivation for this port is to reach an extended audience, hopefully translating into more players and more (much needed) revenue. As such, I really don't want to let this project drag on for too long and get it out as quickly as possible, even if that means that some of the popular Steam features like Achievements might have to wait a bit longer. A sad but important part of game dev no one ever talks about: Scope cutting.
As always: we'd love to hear what you think: join us on Discord or the forums!
Happy trading!