Friday Facts #206 - Workflow optimisation

Regular reports on Factorio development.
indjev99
Long Handed Inserter
Long Handed Inserter
Posts: 78
Joined: Thu Feb 26, 2015 2:13 pm
Contact:

Re: Friday Facts #206 - Workflow optimisation

Post by indjev99 »

Fuegas wrote:When you upgrade your belts from yellow to red (for example) and a splitter is halfway, would that splitter be replaced with a single red belt? Currently you can upgrade just the belts and replace the splitters later without the need to be cautious around splitters.
This.

User avatar
ZombieMooose
Filter Inserter
Filter Inserter
Posts: 289
Joined: Mon Feb 09, 2015 7:23 am
Contact:

Re: Friday Facts #206 - Workflow optimisation

Post by ZombieMooose »

Idk if this has been mentioned yet but I found a potential flaw.

When running down a stretch of belt that has splitters and undergrounds trying to upgrade you could potentially mess up your build accidentally with auto replace.

This could be fixed by changing the hot key from left-click to Ctrl+left-click instead but that may be awkward. You could also have splitter replacing regular belt be left click and belt replacing splitter be Ctrl+click which would be better but would require an extra button config in options.

Also I hope this is indicative of fast replacing power poles from small to medium; perhaps even following the auto-place rules you already have in that fast replace works as you're running and not placing them immediately next to each other.

Anyway really excited for this and good work Dev team

Cheers
"men will literally learn everything about ancient Rome instead of going to therapy"

User avatar
Jon8RFC
Filter Inserter
Filter Inserter
Posts: 553
Joined: Tue May 10, 2016 3:39 pm
Contact:

Re: Friday Facts #206 - Workflow optimisation

Post by Jon8RFC »

Instead of extra hotkeys, I would think a more elegant solution would be to only allow the fast-replace of a splitter if the player is standing still.

The data for the optimizations and information about current hardware are very interesting to read.
Image

IronCartographer
Filter Inserter
Filter Inserter
Posts: 454
Joined: Tue Jun 28, 2016 2:07 pm
Contact:

Re: Friday Facts #206 - Workflow optimisation

Post by IronCartographer »

Jon8RFC wrote:Instead of extra hotkeys, I would think a more elegant solution would be to only allow the fast-replace of a splitter if the player is standing still.
+1

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Friday Facts #206 - Workflow optimisation

Post by eradicator »

The fast replacing really looks neat :D. I'm suprised nobody so far mentioned the possibility of half-underground belts left over so far tho. For example if the player runs out of belt during the replacing.
Jon8RFC wrote:Instead of extra hotkeys, I would think a more elegant solution would be to only allow the fast-replace of a splitter if the player is standing still.
It would be even more elegant if it only worked for single-click-placing and ignored drag-replace. Just because the player is standing doesn't mean he's not dragging lines of belt upgrades.
KatherineOfSky wrote:I'd like to suggest another bit of simple functionality to add to 0.16 -- the ability for assemblers/other machines to auto-set their recipe when placed over a BP ghost. This mod was recently made to do just that, and I find it invaluable: https://mods.factorio.com/mods/distantcam/ghost-copier.
That would be a nice base feature indeed. Also btw speaking of "generalization" i posted a generalized version of that mods functionality in one of the discussions (near the end) of that mod - it works for any building type. I doubt the original author is going to add it tho, so you'd have to wrap it up yourself ;)
kovarex wrote:Replace nothing. It only replaces it if there is straight belt from start to finish to avoid being "too smart and annoying".
Does it handle "straigth" belt that is bent outside correctly? (i.e. this should not be replaced)
beltreplace.jpg
beltreplace.jpg (79.7 KiB) Viewed 6634 times
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

ske
Filter Inserter
Filter Inserter
Posts: 411
Joined: Sat Oct 17, 2015 8:00 am
Contact:

Re: Friday Facts #206 - Workflow optimisation

Post by ske »

When you mention JAI, I'd like to hear your opinion about Rust (which is actually released and used and has similar goals to C++).

And regarding the strong focus of Rust on memory safety. Did you have a lot of problems with segfaults and off-by-one-errors while programming the game in C++? How big of a share of development time did debugging such errors consume? (subjectively)

Rseding91
Factorio Staff
Factorio Staff
Posts: 13171
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Friday Facts #206 - Workflow optimisation

Post by Rseding91 »

ske wrote:When you mention JAI, I'd like to hear your opinion about Rust (which is actually released and used and has similar goals to C++).

And regarding the strong focus of Rust on memory safety. Did you have a lot of problems with segfaults and off-by-one-errors while programming the game in C++? How big of a share of development time did debugging such errors consume? (subjectively)
I can answer that one: Rust sounds interesting at first but places *way* too many restrictions on what you can do such that I would venture to say it's impossible to write any reasonably sane program with it without having to use the "just let me do it" "unsafe" option all over the place defeating the so-called advantages it's meant to give.

Regarding segfaults/off-by-one errors: no. Those are C problems and we write modern C++ - memory leaks/off-by-one errors are a symptom of someone using C++ as C - and a sign that they aren't a good developer. Those problems were solved long ago around when the C++ 11 standard was finished in 2011.
If you want to get ahold of me I'm almost always on Discord.

User avatar
V453000
Factorio Staff
Factorio Staff
Posts: 263
Joined: Fri Sep 04, 2015 5:51 pm
Contact:

Re: Friday Facts #206 - Workflow optimisation

Post by V453000 »

kovarex wrote:
ohmusama wrote:Non joining pipes confirmed
Things like that happen when the composition is created in the graphics editor, and not in the game.
Easter eggs on purpose :P

Chaia
Inserter
Inserter
Posts: 27
Joined: Fri Jul 19, 2013 1:53 pm
Contact:

Re: Friday Facts #206 - Workflow optimisation

Post by Chaia »

V453000 wrote:
kovarex wrote:
ohmusama wrote:Non joining pipes confirmed
Things like that happen when the composition is created in the graphics editor, and not in the game.
Easter eggs on purpose :P
Easter eggs confirmed

Lappro
Burner Inserter
Burner Inserter
Posts: 6
Joined: Fri Jul 22, 2016 8:02 pm
Contact:

Re: Friday Facts #206 - Workflow optimisation

Post by Lappro »

I'm curious about the reasoning why you've chosen to upgrade your dev machines to i9s. Is there a reason threadripper didn't make it or was it never considered? At a quick glance it looks like you could've gotten 6 cores/12 threads more for the same price.

Either way great FFF again, nice combination of news for the average player as well as some nice in-depth behind the scenes stuff.

torham
Fast Inserter
Fast Inserter
Posts: 187
Joined: Sun May 25, 2014 1:40 pm
Contact:

Re: Friday Facts #206 - Workflow optimisation

Post by torham »

Fishling wrote:It seems like the belt replacing splitters and underground will make it hard to upgrade a belt. Previously, you could just run along and upgrade the belts which would skip the other entities and then go and upgrade the rest later.
I would still rather have the new functionality over some hassle with upgrading belts. Upgrading belts is at max two times event, and not for the whole factory. But inserting splitters is something I do quite often, from the beginning all the way for the duration of the entire game.

ili
Long Handed Inserter
Long Handed Inserter
Posts: 87
Joined: Thu Apr 14, 2016 6:19 pm
Contact:

Re: Friday Facts #206 - Workflow optimisation

Post by ili »

kovarex wrote:
Ratzap wrote:Now all stock needs is the functionality from 'Upgrade planner'. Manually replacing yellow transport then red later in my sotck save is soooo tedious and error prone.
It is not on our to do list, but I like the idea of Upgrade planner, so it might become vanilla future some day.
Suggestion
You already have 90% of the infrastructure to make an "Upgrade planner"!
Just add another tub to the new deconstruction planner.
Attachments
2017-09-02_15-27-37.png
2017-09-02_15-27-37.png (561.68 KiB) Viewed 6533 times

Serenity
Smart Inserter
Smart Inserter
Posts: 1000
Joined: Fri Apr 15, 2016 6:16 am
Contact:

Re: Friday Facts #206 - Workflow optimisation

Post by Serenity »

Yes! Finally be able to place splitters right over belts. That always annoyed me

Now if only we can get a way to upgrade belts in vanilla :)

bobucles
Smart Inserter
Smart Inserter
Posts: 1669
Joined: Wed Jun 10, 2015 10:37 pm
Contact:

Re: Friday Facts #206 - Workflow optimisation

Post by bobucles »

So turn the deconstruction planner into a reconstruction planner? It's true that one solution won't work for everyone, since every idea will have an exception.

hoho
Filter Inserter
Filter Inserter
Posts: 677
Joined: Sat Jan 18, 2014 11:23 am
Contact:

Re: Friday Facts #206 - Workflow optimisation

Post by hoho »

kovarex wrote:
Tomik wrote:
kovarex wrote:
Tomik wrote:So Jai Programming Language? You mean this?

https://en.wikipedia.org/wiki/Jonathan_ ... I_language
Yes.
So any distant future plans on recompiling Factorio into Jai and getting rid of .lua permanently?
Seems like possible option for Factorio 2 (If it is ready and proves to be actually as good as it promises to be)
Having watched all the videos on the youtube channel of the guy, only way I can currently see Jai failing to deliver would be if Jonathan either dies or gets severe brain damage.

Though one possibility that could make the language to not be as nice to use would be that there are infinite amount of ways to do the same thing, even more than in C, and thus the learning curve would be closer to a cliff. Of course, if one finally manages to figure things out it should be awesome to write code in.

I have to write stuff in C# at the moment and not even being able to dump plain arrays of doubles to binary file without copying them to char arrays causes physical pain :\

gan_
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sat Sep 02, 2017 1:47 pm
Contact:

Re: Friday Facts #206 - Workflow optimisation

Post by gan_ »

While experimenting with very heavily templated C++ code, i noticed that using an "Unity build" (creating a single cpp file that includes everything and building it in a single CU) reduce the compilation time by a lot.
I got a 10x improvement for my 15kloc project without touching the code.

posila
Factorio Staff
Factorio Staff
Posts: 5201
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Friday Facts #206 - Workflow optimisation

Post by posila »

gan_ wrote:While experimenting with very heavily templated C++ code, i noticed that using an "Unity build" (creating a single cpp file that includes everything and building it in a single CU) reduce the compilation time by a lot.
I got a 10x improvement for my 15kloc project without touching the code.
https://www.factorio.com/blog/post/fff-118 (at the bottom)

gan_
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sat Sep 02, 2017 1:47 pm
Contact:

Re: Friday Facts #206 - Workflow optimisation

Post by gan_ »

posila wrote:
gan_ wrote:While experimenting with very heavily templated C++ code, i noticed that using an "Unity build" (creating a single cpp file that includes everything and building it in a single CU) reduce the compilation time by a lot.
I got a 10x improvement for my 15kloc project without touching the code.
https://www.factorio.com/blog/post/fff-118 (at the bottom)
Holy crap... I should really find time to read all of the FFF, these are fantastic!

kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Friday Facts #206 - Workflow optimisation

Post by kovarex »

gan_ wrote:
posila wrote:
gan_ wrote:While experimenting with very heavily templated C++ code, i noticed that using an "Unity build" (creating a single cpp file that includes everything and building it in a single CU) reduce the compilation time by a lot.
I got a 10x improvement for my 15kloc project without touching the code.
https://www.factorio.com/blog/post/fff-118 (at the bottom)
Holy crap... I should really find time to read all of the FFF, these are fantastic!
100 Proved to be the right amount. Have more, and there are too many duplications and things to link. Use less, and the threads are not used fully as the granularity is not good enough.

ThorsDragon
Inserter
Inserter
Posts: 45
Joined: Mon Jul 04, 2016 7:29 pm
Contact:

Re: Friday Facts #206 - Workflow optimisation

Post by ThorsDragon »

Nice work guys!!!!! :D :D :D

Post Reply

Return to “News”