Page 1 of 3

Friday Facts #82 - Optimisations

Posted: Fri Apr 17, 2015 9:05 pm
by kovarex
Did you ever wonder what optimisations are we working on? No? I will tell you anyway :) https://www.factorio.com/blog/post/fff-82

Re: Friday Facts #82 Optimisations

Posted: Fri Apr 17, 2015 9:18 pm
by Smarty
Looks like there is a solid plan for 0.12

cant wait

Re: Friday Facts #82 Optimisations

Posted: Fri Apr 17, 2015 9:20 pm
by vegeta897
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?

Re: Friday Facts #82 Optimisations

Posted: Fri Apr 17, 2015 9:22 pm
by Yaua
Congratulation for the stable version :D Kudos to all the team who is doing a great job ! I'm waiting so much to see the 0.12 branch !
And I'm really happy to see that you're working on more optimization and planning to do even more.

Now, I have some small questions :
1) When you talk about "Steam integration", what kind of things will this be ? I assume it won't affect in any way people who don't use steam at all ?
2) About optimization, I don't understand the "time reduction" thing : "The overall optimization of this change was roughly 20% time reduction on the testing factory.". Can I have a very short explanation ?

Re: Friday Facts #82 Optimisations

Posted: Fri Apr 17, 2015 9:25 pm
by FishSandwich
Yaua wrote:1) When you talk about "Steam integration", what kind of things will this be ? I assume it won't affect in any way people who don't use steam at all ?
Going to steam has always been the plan afaik. It just means anyone that already owns the game will get a steam code for it, and steam users can buy the code there. If you don't want to use the steam code that's your choice, the installer will still be available on their site.

Re: Friday Facts #82 Optimisations

Posted: Fri Apr 17, 2015 9:29 pm
by Yaua
FishSandwich wrote:
Yaua wrote:1) When you talk about "Steam integration", what kind of things will this be ? I assume it won't affect in any way people who don't use steam at all ?
Going to steam has always been the plan afaik. It just means anyone that already owns the game will get a steam code for it, and steam users can buy the code there. If you don't want to use the steam code that's your choice, the installer will still be available on their site.
Oh, I understood it was about "Steam integration" inside the game XD So sorry for the unrelevant question :P

But thanks for your answer ;) (and for developing team for giving us the choice)

Re: Friday Facts #82 Optimisations

Posted: Fri Apr 17, 2015 9:30 pm
by kovarex
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?
Exactly. Most of the time, your actions don't conflict with others so they will match with the simulation so you don't feel delayed.
Yaua wrote: Now, I have some small questions :
1) When you talk about "Steam integration", what kind of things will this be ? I assume it won't affect in any way people who don't use steam at all ?
It basically means getting to steam. We will always keep the independence, so you can download the client without steam if you want.
Yaua wrote: 2) About optimization, I don't understand the "time reduction" thing : "The overall optimization of this change was roughly 20% time reduction on the testing factory.". Can I have a very short explanation ?
When the simulation of the factory and one tick took 10ms, it will be 8ms after the optimisations took place.

Re: Friday Facts #82 Optimisations

Posted: Fri Apr 17, 2015 9:32 pm
by vegeta897
kovarex wrote:actions don't conflict with others so they will match with the simulation so you don't feel delayed.
That's awesome news! I really did not have any hope that this would be addressed, since most RTS-style games do not bother (age of empires, rise of nations... and those are big budget titles and the problem persists in the HD remasters!)
Yaua wrote: 2) About optimization, I don't understand the "time reduction" thing : "The overall optimization of this change was roughly 20% time reduction on the testing factory.". Can I have a very short explanation ?
Games are simulated in a series of "steps", usually dozens per second. In each step (or "update") the necessary calculations are run to advance time in the game. The more calculations that need to be done, the longer it takes to simulate each step, thus reducing performance and making your game choppy. Their optimization caused the time it takes to run a single step of the simulation to reduce by 20%. That means the game can simulate 25% more steps every second.

Re: Friday Facts #82 Optimisations

Posted: Fri Apr 17, 2015 9:35 pm
by kovarex
vegeta897 wrote:
Yaua wrote: 2) About optimization, I don't understand the "time reduction" thing : "The overall optimization of this change was roughly 20% time reduction on the testing factory.". Can I have a very short explanation ?
Games are simulated in a series of "steps", usually dozens per second. In each step (or "update") the necessary calculations are run to advance time in the game. The more calculations that need to be done, the longer it takes to simulate each step, thus reducing performance and making your game choppy. Their optimization caused the time it takes to run a single step of the simulation to reduce by 20%. That means the game can simulate 20% more steps every second.
That is right, but just small correction: When the time is reduced to 80%, you can actually run 25% more steps every second :) (When the time is reduced by 50%, you have 200% more steps).

Re: Friday Facts #82 Optimisations

Posted: Fri Apr 17, 2015 9:36 pm
by vegeta897
kovarex wrote: That is right, but just small correction: When the time is reduced to 80%, you can actually run 25% more steps every second :) (When the time is reduced by 50%, you have 200% more steps).
Haha, just noticed that myself and fixed it, then saw your post :P

Re: Friday Facts #82 Optimisations

Posted: Fri Apr 17, 2015 9:38 pm
by Flandere
Stable \o/

Re: Friday Facts #82 Optimisations

Posted: Fri Apr 17, 2015 9:40 pm
by Yaua
vegeta897 wrote:
Yaua wrote: 2) About optimization, I don't understand the "time reduction" thing : "The overall optimization of this change was roughly 20% time reduction on the testing factory.". Can I have a very short explanation ?
Games are simulated in a series of "steps", usually dozens per second. In each step (or "update") the necessary calculations are run to advance time in the game. The more calculations that need to be done, the longer it takes to simulate each step, thus reducing performance and making your game choppy. Their optimization caused the time it takes to run a single step of the simulation to reduce by 20%. That means the game can simulate 25% more steps every second.
Ok ! I fully understand now :) Thank you for the explanation !
kovarex wrote:
Yaua wrote: Now, I have some small questions :
1) When you talk about "Steam integration", what kind of things will this be ? I assume it won't affect in any way people who don't use steam at all ?
It basically means getting to steam. We will always keep the independence, so you can download the client without steam if you want.
Yaua wrote: 2) About optimization, I don't understand the "time reduction" thing : "The overall optimization of this change was roughly 20% time reduction on the testing factory.". Can I have a very short explanation ?
When the simulation of the factory and one tick took 10ms, it will be 8ms after the optimisations took place.
It's great to have the choice of not using steam, thanks a lot for this.
Thanks for your answers :)

But I have another "technical" question : with your new way to consider objects on transport belt, won't this be problematic when another belt adds objects in it for example ? How does it work ? (if it's too long to explain, don't waste your time, it's only for my curiosity ;))

Re: Friday Facts #82 Optimisations

Posted: Fri Apr 17, 2015 9:43 pm
by Shaymes
we still need a color select in options to chance player color for silngle/multiplayer

Re: Friday Facts #82 Optimisations

Posted: Fri Apr 17, 2015 9:52 pm
by Albert
Shaymes wrote:we still need a color select in options to chance player color for silngle/multiplayer
Yesss!,
I use to dream with a color picker wheel with a real-time render preview of the chosen color on the player rotating in a turntable style.
EDIT: only in my most wet Factorio dreams

Re: Friday Facts #82 Optimisations

Posted: Fri Apr 17, 2015 10:05 pm
by dee-
Still looking forward for the new belt logic.
There sure will be funny corner cases like dropped items that get a belt build under them (has to be removed from the map, virtualized and allocated to a lane), etc. I suppose three items parallel on a belt belt aren't possible anymore then? Are inner and outer lanes still at different speeds? I still wonder why this only yields a meager 20% gain as the complete collision box logic was trashed and replaced by a 1-dimensional distance field, which is also constant as items in relation to each other won't accelerate or decellerate (minus disturbations like adding/removing items from the belt, belt operations, etc.) So I think there's still potential left after the belt logic has been simplificied.
I'm curious how the multiplayer not-sync-locked-mode will work out...

Re: Friday Facts #82 Optimisations

Posted: Fri Apr 17, 2015 10:54 pm
by keyboardhack
That's some awesome optimizations you got there. Optimizations will always be my favorite kind of updates so i am really looking forward to these awesome changes :D Especially the one with the solar panels!

Re: Friday Facts #82 Optimisations

Posted: Fri Apr 17, 2015 10:55 pm
by Artman40
Would it be possible for storage tanks to be at least partly transparent so you could see how filled they are without hovering a mouse over them?

Re: Friday Facts #82 Optimisations

Posted: Fri Apr 17, 2015 11:03 pm
by bigyihsuan
Artman40 wrote:Would it be possible for storage tanks to be at least partly transparent so you could see how filled they are without hovering a mouse over them?
Yes! Maybe a glass window in the side that fills with the liquid level.

Re: Friday Facts #82 Optimisations

Posted: Sat Apr 18, 2015 1:59 am
by Ohz
Update time
Yep, basically if I want reduce lag pics when my factory is getting big, I remove smoke.

Re: Friday Facts #82 Optimisations

Posted: Sat Apr 18, 2015 2:46 am
by immibis
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.