Friday Facts #232 - PAX, Bugs, Graphs

Posted by Twinsen, Rseding91 and Posila on 2018-03-02

Hello, it has been extremely cold these last weeks. It's one of those weeks when we can't think of anything to write about. So we will try to write some small parts.

The struggle for the stable

Most of us are working on fixing bugs and small issues on our backlog, but some of us are already working on 0.17. TOGoS is doing major changes to the map generator in order to fix the many small issues it still has. HanziQ and sindri are working on the OpenGL 3.3 graphics back-end replacement, along with posila who started working on the DirectX 11 back-end. Wheybags is working on the new font rendering. Oxyd started implementing our first GUI from the GUI rewrite, a new technology GUI that among other small things, has a queue.

Crash reports per version

We made a quick graph from the reports gathered by the crash log uploader.

Factorio is going to PAX East (Twinsen)

We have confirmation from PAX that we will have a booth there (number 10019). The event is in Boston between 5th to the 8th of April.
We purchased our plane tickets and reserved our accommodation. The tickets for the general public during some of the days seem to be sold out already, so if you want to come check us out, you should buy a ticket soon. We will be there mainly to show the game to new players, see how new players react to the game, hang out with fans and other developers.

The devs who will be there are: HanziQ, Klonan, Rseding91, Twinsen, and V453000. Rseding91 and I will also be visiting Los Angeles afterwards, so if there are some hardcore Factorio fans around, we can probably go for dinner or even have a small meet-up. HanziQ will be staying in NYC for 7 days after the convention, so if you are around there you can arrange a meet-up with him.

We even played a small mini-game of trying to efficiently fit all the furniture in our booth space, and Klonan made an isometric representation of what it will look like:

Edge case bugs (Rseding91)

In the last 2 weeks thanks to the auto crash reporting system I've fixed so many crash bugs that we haven't gotten a single report about. One particularly interesting crash that I fixed a few minutes before writing this was related to Mod Settings in multiplayer, and took me a few minutes of staring at the crash log to understand what was happening.

When you join a multiplayer game, the server saves the map and starts uploading it to you. In the meantime it keeps ticking along letting the rest of the connected players keep playing. Anything the other players do is queued and sent to you to be processed once you finish downloading the map. When a player changes a mod setting runtime it packs and sends that change just like any other action, except the logic to load that data was never expecting it to happen while someone was still downloading a map in multiplayer.

The end result was: while you're downloading the map the game loads the "mod setting changed" data into memory and says "I don't know what this mod setting is; I'll load it and throw it away" (this logic is meant to handle loading save files when you remove a mod). Once the game finishes loading it applies all of the pending actions to catch up with the other players - as it should - except when the "mod setting changed" is applied, it's now applying an empty setting and the game crashes.

The fix was simple but the series of steps and timing required reproduce the crash meant anyone trying to do so most likely would never be able to. Factorio has a handful of these special rules about what you can and can't do at specific parts of the simulation.

  • You can't expect game prototypes to be setup when loading any network actions.
  • You can't delete items while the game is loading.
  • You can't delete entities while the game is loading.
  • You can't use the random generator while the game is loading.
  • You can't enable/disable an updatable entity during the entity setup while running setup as a result of loading the map.

The list gets more and more specific as we keep going. It just goes to show that Factorio internals are very complex and bugs can go hidden for years.

IME support for Chinese, Japanese, Korean (posila)

In update 0.16.26 that dropped on Monday, we included partial (Windows) IME support developed by a Chinese fan, pjincz, who kindly implemented it for us. It turned out to be quite a challenge for us westerners, who have never experienced typing in a language that has more characters than there are keys on a keyboard. The feature was requested for a long time by many players, as they couldn't conveniently chat or name things in the game in their native languages.

As always, let us know what you think on our forum.