Friday Facts #297 - New resource icons
Author: Klonan,
published 5 years ago,
[i]Read this post on our [url=https://factorio.com/blog/post/fff-297]website[/url][/i]
[h1]Inserters are now smarter[/h1]
A few days ago I was investigating a rather minor [url=https://forums.factorio.com/69592]bug report[/url] 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.
https://cdn.factorio.com/assets/img/blog/fff-297-inserters.gif
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 [url=https://forums.factorio.com/66973]another bug[/url] 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:
https://cdn.factorio.com/assets/img/blog/fff-297-stack-inserters.webm
We released the change on Thursday. Something strange was quickly discovered after release...
https://cdn.factorio.com/assets/img/blog/fff-297-inserter-bug.webm
[i]From [url=https://www.twitch.tv/nefrums]Nefrums[/url] speedrun stream.[/i]
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.
[h1]New resource icons[/h1]
In [url=https://www.factorio.com/blog/post/fff-179]FFF-179[/url] we presented new resource graphics for Factorio 0.15. When the resource graphics were finished, we tried to cut pieces from them and compose these into new item icons - but the results were not better than what we already had and we needed to do many more things for 0.15, so we kept the resource icons as they were for the time being.
[img]https://steamcdn-a.akamaihd.net/steamcommunity/public/images/clans/12002589/2d354a07a9d5f8df38b41385dca6417b15bb662c.png[/img]
Recently we have started work on higher resolution for icons, and the resource icons are one of the first families to get a revisit.
As mentioned in FFF-179, to save time when creating the resource graphics we used various randomization methods to get a new batch of re-randomized resource pieces easily. This method has one big drawback for icons - it’s very hard to preview and control in Blender.
[img]https://steamcdn-a.akamaihd.net/steamcommunity/public/images/clans/12002589/cbb59e4af2dd11c99b0d148a03ca6e5be8d9ecfc.png[/img]
However the random generation allows us to generate many random pieces of resources very quickly...
[img]https://steamcdn-a.akamaihd.net/steamcommunity/public/images/clans/12002589/7be57a2b14ece7790e712f3d23a14feb4d41452d.png[/img]
...and combine them in Photoshop into icons with perfect control over every pixel.
[img]https://steamcdn-a.akamaihd.net/steamcommunity/public/images/clans/12002589/02499519b28c915d5740f6554b4e7ab120a71c91.png[/img]
However when we put these icons in the game, on belts they seem to suffer a lot from repetitiveness just like the older versions did.
[img]https://steamcdn-a.akamaihd.net/steamcommunity/public/images/clans/12002589/9434f8ce705cb9fa871da0cd57abe28375d4a33f.png[/img]
There was one more thing regarding resource icons that we tried to do for 0.15 but did not have enough time for - resources would get randomized variations of icons when drawn on belts.
Rendering more variations and assembling new icons was relatively easy at this point, so we made some more versions.
[img]https://steamcdn-a.akamaihd.net/steamcommunity/public/images/clans/12002589/6dcff42e08cf5f3ed5e52b8db1a0de76ac1977af.png[/img]
With randomized variations the resources look much more natural and unrefined, which makes a lot of sense as The Factory has not processed them into perfect uniform products yet.
https://cdn.factorio.com/assets/img/blog/fff-297-animated.webm
The new icons are not ready just yet, but we hope to have them for the 0.17 stable.
As always, lets us know what you think on our [url=https://forums.factorio.com/71433]forum[/url].