Friday Facts #82 - Optimisations

Regular reports on Factorio development.
kovarex
Factorio Staff
Factorio Staff
Posts: 8035
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Friday Facts #82 Optimisations

Post by kovarex »

immibis wrote:Could the "middle lane" be re-added with the new belt system? It seems a lot more natural than having all the items move to one side for no reason.
It could, but I consider it to not be worth the trouble.

MeinAccount
Burner Inserter
Burner Inserter
Posts: 16
Joined: Wed Apr 30, 2014 7:49 pm
Contact:

Re: Friday Facts #82 Optimisations

Post by MeinAccount »

Awesome update! Always love you technical insights. :D
I would suggest to group accumulators as well as solar panels. The code is probably quite similar.

Rahjital
Filter Inserter
Filter Inserter
Posts: 435
Joined: Thu May 29, 2014 10:44 am
Contact:

Re: Friday Facts #82 Optimisations

Post by Rahjital »

kovarex wrote:For 0.12, I completely rewrote the internal logic of all the transport belt related entities (belt, underground belt, splitter). The items on the belts are no longer represented as individual entities. These are just very simple internal structures moving on small invisible "rails".
Will this restrict modding abilities? There's mods such as Belt Blocker that rely on physical simulation of items.

karlstri
Burner Inserter
Burner Inserter
Posts: 14
Joined: Fri May 02, 2014 11:59 am
Contact:

Re: Friday Facts #82 Optimisations

Post by karlstri »

is it possible to use the same optimastions on accumilators that are developed for the solars? it seams to me that they shuold be quite similar in the simulations.

Zeblote
Filter Inserter
Filter Inserter
Posts: 972
Joined: Fri Oct 31, 2014 11:55 am
Contact:

Re: Friday Facts #82 Optimisations

Post by Zeblote »

Does the new belt system mean corners are finally going to work properly?

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

Re: Friday Facts #82 Optimisations

Post by kovarex »

Zeblote wrote:Does the new belt system mean corners are finally going to work properly?
Yes corners don't slow limit the throughput now.
MeinAccount wrote:Awesome update! Always love you technical insights. :D
I would suggest to group accumulators as well as solar panels. The code is probably quite similar.
Yes, accumulators could be also grouped.

Zeblote
Filter Inserter
Filter Inserter
Posts: 972
Joined: Fri Oct 31, 2014 11:55 am
Contact:

Re: Friday Facts #82 Optimisations

Post by Zeblote »

kovarex wrote:
Zeblote wrote:Does the new belt system mean corners are finally going to work properly?
Yes corners don't slow limit the throughput now.
:D

User avatar
Nova
Filter Inserter
Filter Inserter
Posts: 944
Joined: Mon Mar 04, 2013 12:13 am
Contact:

Re: Friday Facts #82 Optimisations

Post by Nova »

Some people will not like that news, but I do - I really like this "bug" fixed. :)
Greetings, Nova.
Factorio is one of the greatest games I ever played, with one of the best developers I ever heard of.

User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7323
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Friday Facts #82 Optimisations

Post by bobingabout »

Almost 10% of the update time is spent on "Smoke", a graphical effect that has no practical purpose, other than to look good.

Yeah, that does sound like a bit of a waste of processing power when compared to the fact that the other 90% has a practical purpose.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.

JimiQ
Inserter
Inserter
Posts: 32
Joined: Tue May 13, 2014 9:52 am
Contact:

Re: Friday Facts #82 Optimisations

Post by JimiQ »

bobingabout wrote:Almost 10% of the update time is spent on "Smoke", a graphical effect that has no practical purpose, other than to look good.

Yeah, that does sound like a bit of a waste of processing power when compared to the fact that the other 90% has a practical purpose.
Yeah, that's why I play with the smoke turned off

Zeblote
Filter Inserter
Filter Inserter
Posts: 972
Joined: Fri Oct 31, 2014 11:55 am
Contact:

Re: Friday Facts #82 Optimisations

Post by Zeblote »

Nova wrote:Some people will not like that news, but I do - I really like this "bug" fixed. :)
Why quotes? It is a bug, a real convyor belt corner would not work like that. Items on the outer row would be spaced out but moving faster, both sides still getting the same ammount of pieces around the corner.

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

Re: Friday Facts #82 Optimisations

Post by Rseding91 »

JimiQ wrote:
bobingabout wrote:Almost 10% of the update time is spent on "Smoke", a graphical effect that has no practical purpose, other than to look good.

Yeah, that does sound like a bit of a waste of processing power when compared to the fact that the other 90% has a practical purpose.
Yeah, that's why I play with the smoke turned off
That has no effect on it. That just stops the smoke from rendering. It still exists and it still ticks down its life time and "floats" around.
If you want to get ahold of me I'm almost always on Discord.

User avatar
Nova
Filter Inserter
Filter Inserter
Posts: 944
Joined: Mon Mar 04, 2013 12:13 am
Contact:

Re: Friday Facts #82 Optimisations

Post by Nova »

Zeblote wrote:
Nova wrote:Some people will not like that news, but I do - I really like this "bug" fixed. :)
Why quotes? It is a bug, a real convyor belt corner would not work like that. Items on the outer row would be spaced out but moving faster, both sides still getting the same ammount of pieces around the corner.
Realism has nothing to do with something being a bug or not. The only question is: Was / is it intended or not? If no, than it's a bug, but I'm not sure if this was ever intended or not. ^^
Greetings, Nova.
Factorio is one of the greatest games I ever played, with one of the best developers I ever heard of.

jgntrugytub
Inserter
Inserter
Posts: 21
Joined: Sun Mar 01, 2015 1:08 pm
Contact:

Re: Friday Facts #82 Optimisations

Post by jgntrugytub »

Heya, great news on the performance improvements.

As an idea regarding smoke:
If smoke is really such an issue performance wise, how about adding a 2nd tier train that doesnt produce smoke (i.e. electricity based,using accumulators and some kind of charging device at stations). This would do the same as the solar cells, during beginning and mid game (where performance is usually no issue) a lot of smoke can be produced and calculated without issues, whereas in lategame, where performance really matters, most people would have replaced steam engines with solar cells and diesel trains with electric trains, meaning there is not much smoke to calculate.

TeDeum
Burner Inserter
Burner Inserter
Posts: 19
Joined: Sat Mar 28, 2015 1:43 am
Contact:

Re: Friday Facts #82 Optimisations

Post by TeDeum »

How about better multi-threading? It seems for me even better than 20% optimization, as game could use all my 8 CPU cores and don't lag.

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

Re: Friday Facts #82 Optimisations

Post by kovarex »

TeDeum wrote:How about better multi-threading? It seems for me even better than 20% optimization, as game could use all my 8 CPU cores and don't lag.
We are keeping this for later :)
Also it is quite logical to first optimise the core performance first.

KrzysD
Long Handed Inserter
Long Handed Inserter
Posts: 60
Joined: Mon Oct 27, 2014 6:49 pm
Contact:

Re: Friday Facts #82 Optimisations

Post by KrzysD »

Great Friday Facts!! Would love to see the higher resolution entities for 0.12 like mentioned in FF64

User avatar
cpy
Filter Inserter
Filter Inserter
Posts: 811
Joined: Thu Jul 31, 2014 5:34 am
Contact:

Re: Friday Facts #82 Optimisations

Post by cpy »

I wonder if main thread threading is planned, because you could build 4x ish bigger factories on quadcore cpu. :)

slpwnd
Factorio Staff
Factorio Staff
Posts: 1835
Joined: Sun Feb 03, 2013 2:51 pm
Contact:

Re: Friday Facts #82 Optimisations

Post by slpwnd »

cpy wrote:I wonder if main thread threading is planned, because you could build 4x ish bigger factories on quadcore cpu. :)
The original idea here was to simulate different chunks in different threads. However this is quite tricky to do properly - namely because overlaps and special cases. Another approach we have been thinking about recently is to do some "thematic" parallelization. Things like electric energy propagation, path finder, rail finding.

Also the game uses a few threads already. During the update there is the update thread, render thread, map generation thread, multiplayer socket processing thread and some more in the allegro library. So the speedup will be less than linear.

Anyway, for now we prefer to do single thread optimizations because there is better ratio of gain / work and they are less error prone.

slpwnd
Factorio Staff
Factorio Staff
Posts: 1835
Joined: Sun Feb 03, 2013 2:51 pm
Contact:

Re: Friday Facts #82 Optimisations

Post by slpwnd »

vegeta897 wrote:
Tomas is working on the lag hiding and it seems to have nice results, you can expect detailed description of it in the next fff.
Does this mean things like movement will be rendered client-side instantly before actually being simulated? Thus making playing with 200ms ping not feel so delayed?
Yes. The goal is to make it playable even with 1s latency. However the latency hiding won't be perfect. This involves some dirty internal tricks, therefore we decided to go for most common actions. Things like moving, building, mining, etc. They will be (unless there is a collision) instantaneous. However in non-latency hidden actions the lag will still be felt. More on this will be in the fff.

Post Reply

Return to “News”