Posts by Twinsen

Friday Facts #316 - Map editor Lua snippets & Non-colliding Biters

Posted by wheybags, Twinsen, Abregado, Klonan on 2019-10-11

Map editor Lua snippets wheybags In the last few weeks, we've really accelerated our work on the campaign. We've been pushing ahead a lot with both the scripting and blocking out the physical level design. One of the problems we've come up against a lot, is that we often need to perform custom edits to the map, which are quite tedious, but not common enough to add a new tool to the map editor for them. For example, something like "disable all the spawners in this region". This kind of problem is easily solved with a little bit of custom Lua code, but getting the specification of the area we want to edit into Lua is a painful process of noting down and typing out location coordinates. It is also easy to lose track of these Lua snippets, as there is no good place to save them. To solve this problem, we decided to add a Lua snippet tool to the map editor. This tool will let you drag your cursor over an area, and it will then run your custom Lua code on that area. The snippets are named, and saved in your player-data.json, so you can keep them around for later. For example, this simple snippet replaces trees with biters. Currently, there doesn't seem to be a very big scene for community made custom maps/scenarios with custom maps, and we're hoping that the example from the campaign once released, as well as the much improved editor we have in 0.17 will encourage more people to give this a go.

Friday Facts #309 - Controversial opinions

Posted by Twinsen, wheybags, TOGoS, posila, Rseding on 2019-08-23

The boring phase of bug-fixing is still going, slowly but surely. Stable should be released next week, but with some people on vacation (Ben, Jitka, kovarex, Klonan, Sanqui) and with the release of WoW Classic, it might get slowed down a bit. (By the way, some of us will be playing on Pyrewood Village, Alliance, so if you want to have the chance of meeting Twinsen, kovarex or dominik while leveling, you can join that server). So since there's not much happening, this week we decided to explore some unpopular or controversial opinions about the game from within the team. In Wube we don't have a very strict management structure, everyone is free to have ideas and opinions about almost all aspects of the game. This means that with almost every change we argue and discuss a lot before making a final decision. Sometimes we argue about everything, from the smallest GUI change, to how a major feature should work. This is probably not a bad thing since this means changes are usually well thought out and unpopular ideas or changes don't make it to the game very often. Some people feel quite strongly about their opinions or sometimes the team is very divided on what should we do. Today we'll share some of those opinions and controversies. Keep in mind that these are simply opinions and none of them will actually make it into the game, we are simply sharing them to have an interesting discussion.

Friday Facts #304 - Small bugs; Big changes

Posted by Klonan, Sanqui, V453000, Posila, Twinsen on 2019-07-19

Hello, We are down to 28 bugs on the forum. The last bugs are often the ones we have been putting off for a reason, they generally require some more meaningful changes and decisions. That is why this week we have a lot to discuss.

Friday Facts #302 - The multiplayer megapacket

Posted by Twinsen, Klonan on 2019-07-05

The multiplayer megapacket Twinsen Last month I joined KatherineOfSky's MMO event as a player. I noticed that after we reached a certain number of players, every few minutes a bunch of them got dropped. Luckily for you (but unluckily for me), I was one of the players who got disconnected every, single. time, even though I had a decent connection. So I took the matter personally and started looking into the problem. After 3 weeks of debugging, testing and fixing, the issue is finally fixed, but the journey there was not that easy. Multiplayer issues are very hard to track down. Usually they only happen under very specific network conditions, in very specific game conditions (in this case having more than 200 players). Even when you can reproduce the issue it's impossible to properly debug, since placing a breakpoint stops the game, messes up the timers and usually times out the connection. But through some perseverance and thanks to an awesome tool called clumsy, I managed to figure out what was happening. The short version is: Because of a bug and an incomplete implementation of the latency state simulation, a client would sometimes end up in a situation where it would send a network package of about 400 entity selection input actions in one tick (what we called 'the megapacket'). The server then not only has to correctly receive those input actions but also send them to everyone else. That quickly becomes a problem when you have 200 clients. It quickly saturates the server upload, causes packet loss and causes a cascade of re-requested packets. Delayed input actions then cause more clients to send megapackets, cascading even further. The lucky clients manage to recover, the others end up being dropped. The issue was quite fundamental and took 2 weeks to fix. It's quite technical so I'll explain in juicy technical details below. But what you need to know is that since Version 0.17.54 released yesterday, multiplayer will be more stable and latency hiding will be much less glitchy (less rubber banding and teleporting) when experiencing temporary connection problems. I also changed how latency hiding is handled in combat, hopefully making it look a bit smoother.

Friday Facts #297 - New resource icons

Posted by Twinsen, v453000 on 2019-05-31

Inserters are now smarter Twinsen A few days ago I was investigating a rather minor bug report related to "Rotational Asymmetry in Belt/Inserter interactions" (aka Inserter was not behaving identically when rotated). This was a classic case of floating point equality comparison. The Inserter would move it's arm and then it would pick up the item if the current arm orientation is equal to the desired arm orientation. Because of some chain of calculations related to rotation, some precision was lost and the equality check would fail for 1 tick, delaying the item pickup for 1 tick in some Inserter rotations. So I fixed that by finishing the inserter movement if it's close enough. Now the inserters should be a tiny bit faster in some rotations, plus all rotations should again be symmetrical and identical. While analyzing the code and Inserter behavior for that bug, I also noticed that inserters with stack bonus would do nothing for 1 tick after picking up an item from a belt. I changed it so inserters will start moving to a new target immediately after they pick up something. This also sped up the Stack Inserter by a tiny bit. Both the speedups were enough to fix another bug that was often regarded by the other devs as "not a bug": A Stack Inserter was not fast enough to pick up all the items placed on a belt by another Stack Inserter. Furthermore, because of different timings, the amount of items a Stack Inserter would pick up would depend on how far that Stack Inserter was from the item source: We released the change on Thursday. Something strange was quickly discovered after release... From Nefrums speedrun stream. As someone from Twitch chat noted "Inserters are so fast now, they even don't care about the side of belt". Remember that I fixed the rotation problem by finishing the Inserter movement if it's close enough. Well, what ended up happening was what now the Inserter would stop 0.0001 degrees short of perfectly vertical. That was of course closer to the other belt lane so the item would be dropped there. Previously it was always dropped perfectly vertical, and the lane decision algorithm would choose the right lane. The fix was easy and it's probably released by the time you are reading this. So with everything fixed, inserters are now more consistent, predictable and intuitive, things that I think are important for a precise game like Factorio. Some situation might end up being slightly slower or will consume a bit more electricity, but generally inserters are now faster.

Friday Facts #292 - Inching closer to stable

Posted by Klonan, Twinsen on 2019-04-25

Inching closer to stable Klonan The last 2 weeks have been less productive than we would like on the bug fixing front. The Easter festivities along with a wave of illness have dampened our efforts. We have still managed to push out 2 more experimental releases, and fixed a few desyncs. We encountered one specific desync in the mass MP stress test last weekend, caused by a characters inventory size changing (such as researching the toolbelt technology) while the player is respawning. The graph of crashes paints a similar story to how the office atmosphere feels. It is natural though, most of the major crashes affecting most players are resolved, so all that remains are the more difficult issues that only affect a handful of players. This means that each bug fix is less effective at reducing the overall crash count. This last weekend, we had over 500 total crashes reported, which is a slight improvement over the prior weekend's ~650. One thing that makes our progress hard to evaluate is that we don't know how many people are actually playing experimental. Most people play through Steam, and so far we have found no way of determining how many people are opted-in to the 0.17 experimental through Steam. It could be that the game is more stable, or it could be that less people are playing. There are still over 250 open bug reports on our forum, so it seems it will be a few more weeks until the first stable 0.17. Some people have been asking when we will release the new GUI and GFX updates that we promised before 0.17 release. The plan is that after the first 0.17 stable version, some of the team will be moved from fixing bugs to working on features. At the point where we have a meaningful amount of new content ready (A few GUIs, some new GFX, etc.), we will release it as a new experimental 0.17 version. We plan to give some explanation and notice about these 'mini-content releases' in a FFF before they are each released.

Friday Facts #291 - New Campaign, MP stress testing, HR Icons II

Posted by Abregado, Twinsen, Albert, posila on 2019-04-19

New Campaign Abregado Have you ever been playing a Freeplay game and realised you don't know what your next big goal is? And then, once you decide to pick a new goal, you realise while you worked on automating the last goal, there were 10 new technologies unlocked and now you don't know which to pick next. These are the situations we hope to address with the new full Campaign. A guided Freeplay, in which the player plays through the whole tech tree, without being overloaded with choice, while still having the permanence and unidirectional progression of Factorio. The permanence problem has already been solved using the new map expansion technique which is playable in the Introduction scenario. Over the last year we have been working on the bigger design task of unravelling the tech tree and breaking it into a set of choices for the player. This task has been made all the more Interesting as the tech tree is also constantly getting tweaks and revisions over that time as well. I look forward to providing more insights but for now I will leave you with one example (read: spoiler): Just to note, we won't be changing the freeplay tech tree, which will still have all the choice and diverging paths as it does now.

Friday Facts #289 - Character GUI

Posted by Albert, Aleš, twinsen, kovarex, Klonan on 2019-04-05

Hello, we are still focusing most of our resources towards fixing as many bugs as possible so we have stable release in reasonable time. In the meantime, the preparation for the continuation of the work on the GUI rewrite is still happening:

Friday Facts #280 - Visual Feedback is the king

Posted by kovarex, Twinsen on 2019-02-01

Hello, as we learned countless time before: Visual feedback is the king! Especially when the GUI is as complex as the Train GUI.

Friday Facts #278 - The new quickbar

Posted by Twinsen, Klonan on 2019-01-18

It's finally here (Twinsen) The proposal was first mentioned more than 1 and a half years ago, in FFF-191. Since then, we kept mentioning it in our blog posts and players kept asking about it. After a lot of back and forth within the team on whether we should implement it or not, and how it should work, we finally have it almost finished for 0.17.