Factorio - HanziQ
Greetings!

My visit to Prague
Todays Friday Facts are brought to you by Rseding91. I live in the USA and normally work remotely for Wube but I've been visiting Prague for the past 2 months. Since I'm not the touristy kind of person (I'm a programmer) and I love working on Factorio; I've spent almost all of my time here in the office. I've been in Prague since June 6 and my current time sheet says I've logged 568.55 hours.

The bugs
0.13.0 was released 4 weeks ago and we've had 9 releases since with 280+ bugs fixed of which I've personally fixed 99. We've still got 60+ confirmed bugs to work through however the bug reports are coming in less frequently as time passes. The reported bugs have also changed from "the game crashed, my map is corrupt, my computer exploded" style bugs to this kind of bug. While yes, it's still a bug, it doesn't break gameplay at all so it's far less critical to get fixed immediately.

The number of repeat bugs (bugs reported, fixed, and then broken again later) is near zero and of the bugs reported and fixed in 0.13 almost all of them where preexisting issues or introduced from features added in 0.13. That means that our automated tests are working and we aren't fighting against ourselves fixing issues we've already fixed.

Other than the outstanding multiplayer issues mentioned in last week's Friday Facts 0.13 is looking great and baring any major bugs we're planning for a stable release August 1st..

0.14 and optimizations
As of now, there hasn't been any concrete plan as to what will go into 0.14. There are still enough bugs to fix that everyone's busy working on those. However, when optimization was mentioned it immediately got my attention and was assigned to myself for 0.14.

Because we put no limits on what you're allowed to build in Factorio and the nature of the game encourages expansion and large factories even the best computers will eventually struggle to keep the game simulation running at the desired 60 updates per second as you expand. So far our main method for addressing slowdown has been "do less". It sounds simple but it rarely is.

A few examples of past performance improvements:
  • Transport belts in 0.12 onward only check item collision against the item directly in front of the item being moved. (More in FF #83)
  • Solar panels where grouped so regardless of how many you build the calculation is: N * light * power
  • Accumulators are grouped similar to solar panels
  • Logistic/construction robots don't do any collision checks when moving since they can't ever hit anything anyway
  • Most entities will "go to sleep" when they have nothing to do - consuming zero processing time when asleep

Two of the most frequently built entities and subsequently two of the most CPU consuming entities are: transport belts and pipes. The vast majority of them are large section of simple belts without intersections splitters inserters or so. The player simply needed more throughput and so they built 5-10 parallel lines of belts/pipes.

Right now each belt and each pipe is updated individually piece by piece. That means the cost to run those increases as the count of entities does. The other cost is also the transition of fluid/items from each pipe/belt to another.

The plan



The belt/pipe lines would be merged and act as series of segments. This allows the items on the segment to be saved in one continuous piece of memory, which not only improves memory locality, but allows us to use tricks to move the items on the belts smarter, instead of moving every item in the segment, we can just change the overall segment offset as long as the belt exit is not blocked. On top of that, the individual belts and pipes wouldn't have to be updated, as their animation can be simply tick-based. In the ideal case, this could improve the performance of transport belts many times!

Again, that sounds simple enough when stated but as I've started to look into what will be required it becomes more and more complex. This is just the initial list of questions that I need to solve before work can really begin on this:

  • How is the "other movable" logic meant to be handled for belts and splitters if they aren't going to be updatable
  • Right now splitters operate by doing: move items on input lines -> split -> move items on output lines. How will this logic be done when the lines have no knowledge of the splitter or its mechanics?
  • Who's responsible for saving transport line data?
  • Custom render logic, so the segments draws it items in one go instead of individual items drawing them.
  • How is save-load stability going to be maintained for merged transport belts? When a set of belts is merged runtime and then that data is saved how do we ensure the loaded and re-setup belts re-merge in the same way?
  • Segment creating/merging/splitting logic. When belts are build/destroyed.
  • How will migrations of belts in segment work?
  • How will we handle underground belt connection distance changes between save load?
  • And many others.

Nothing is ever as simple as you think it should be :)

Between working on bugs and thinking about optimizations in 0.14 I've been working on some smaller features for 0.14. One of them I really like won't change the gameplay but just gives some fun data for multiplayer games: train kills.



As always, let us know what you think on our forums
Factorio - HanziQ
Greetings!

My visit to Prague
Todays Friday Facts are brought to you by Rseding91. I live in the USA and normally work remotely for Wube but I've been visiting Prague for the past 2 months. Since I'm not the touristy kind of person (I'm a programmer) and I love working on Factorio; I've spent almost all of my time here in the office. I've been in Prague since June 6 and my current time sheet says I've logged 568.55 hours.

The bugs
0.13.0 was released 4 weeks ago and we've had 9 releases since with 280+ bugs fixed of which I've personally fixed 99. We've still got 60+ confirmed bugs to work through however the bug reports are coming in less frequently as time passes. The reported bugs have also changed from "the game crashed, my map is corrupt, my computer exploded" style bugs to this kind of bug. While yes, it's still a bug, it doesn't break gameplay at all so it's far less critical to get fixed immediately.

The number of repeat bugs (bugs reported, fixed, and then broken again later) is near zero and of the bugs reported and fixed in 0.13 almost all of them where preexisting issues or introduced from features added in 0.13. That means that our automated tests are working and we aren't fighting against ourselves fixing issues we've already fixed.

Other than the outstanding multiplayer issues mentioned in last week's Friday Facts 0.13 is looking great and baring any major bugs we're planning for a stable release August 1st..

0.14 and optimizations
As of now, there hasn't been any concrete plan as to what will go into 0.14. There are still enough bugs to fix that everyone's busy working on those. However, when optimization was mentioned it immediately got my attention and was assigned to myself for 0.14.

Because we put no limits on what you're allowed to build in Factorio and the nature of the game encourages expansion and large factories even the best computers will eventually struggle to keep the game simulation running at the desired 60 updates per second as you expand. So far our main method for addressing slowdown has been "do less". It sounds simple but it rarely is.

A few examples of past performance improvements:
  • Transport belts in 0.12 onward only check item collision against the item directly in front of the item being moved. (More in FF #83)
  • Solar panels where grouped so regardless of how many you build the calculation is: N * light * power
  • Accumulators are grouped similar to solar panels
  • Logistic/construction robots don't do any collision checks when moving since they can't ever hit anything anyway
  • Most entities will "go to sleep" when they have nothing to do - consuming zero processing time when asleep

Two of the most frequently built entities and subsequently two of the most CPU consuming entities are: transport belts and pipes. The vast majority of them are large section of simple belts without intersections splitters inserters or so. The player simply needed more throughput and so they built 5-10 parallel lines of belts/pipes.

Right now each belt and each pipe is updated individually piece by piece. That means the cost to run those increases as the count of entities does. The other cost is also the transition of fluid/items from each pipe/belt to another.

The plan



The belt/pipe lines would be merged and act as series of segments. This allows the items on the segment to be saved in one continuous piece of memory, which not only improves memory locality, but allows us to use tricks to move the items on the belts smarter, instead of moving every item in the segment, we can just change the overall segment offset as long as the belt exit is not blocked. On top of that, the individual belts and pipes wouldn't have to be updated, as their animation can be simply tick-based. In the ideal case, this could improve the performance of transport belts many times!

Again, that sounds simple enough when stated but as I've started to look into what will be required it becomes more and more complex. This is just the initial list of questions that I need to solve before work can really begin on this:

  • How is the "other movable" logic meant to be handled for belts and splitters if they aren't going to be updatable
  • Right now splitters operate by doing: move items on input lines -> split -> move items on output lines. How will this logic be done when the lines have no knowledge of the splitter or its mechanics?
  • Who's responsible for saving transport line data?
  • Custom render logic, so the segments draws it items in one go instead of individual items drawing them.
  • How is save-load stability going to be maintained for merged transport belts? When a set of belts is merged runtime and then that data is saved how do we ensure the loaded and re-setup belts re-merge in the same way?
  • Segment creating/merging/splitting logic. When belts are build/destroyed.
  • How will migrations of belts in segment work?
  • How will we handle underground belt connection distance changes between save load?
  • And many others.

Nothing is ever as simple as you think it should be :)

Between working on bugs and thinking about optimizations in 0.14 I've been working on some smaller features for 0.14. One of them I really like won't change the gameplay but just gives some fun data for multiplayer games: train kills.



As always, let us know what you think on our forums
Jul 15, 2016
Factorio - HanziQ
  • Changes
    • Updated demo campaign tips images.
    • Updated/Fixed locale entries.
    • Removed --mp-load-game
    • Default value for "Lights render quality" graphics options was changed to 1.0. If config.ini contains value lower than new minimum (0.25) it will be reset to the default value.
    • Lights are rendered with linear filtering to improve quality for lower "Lights render quality" settings. more
    • Added tips and tricks for pasting wagon slots and cycling in blueprint book.
    • Mods are now sorted alphabetically in the mods list.

  • Bugfixes
    • Fixed transport belt madness map showing an empty message dialog out of nowhere.
    • Fixed transport belt madness being impossible. more
    • Fixed crash on Linux when stdout was closed after starting Factorio. more
    • Fixed trains of other forces could be seen in the Trains GUI. more
    • Fixed inserters not saving custom pickup/dropoff when exported through the Lua blueprint interface.
    • Fixed robots delivering modules into the recipe input slots instead of the module inventory. more
    • Fixed performance issue caused by alt mode when some mods are installed and linear filtering is enabled. more
    • Items stop correctly before a belt deactivated using the circuit network. more
    • Fixed another case where a biter could get stuck. more
    • Fixed crash when using --mp-connect to join a game that requires user verification. more
    • Fixed train GUI would be too big to fit on screen with a large amount of character inventory slots. more
    • Buildings with backer names containing non-ASCII charecters are generated properly.
    • Fixed logistic counts when changing stack sizes of items the player was holding.
    • Fixed crash when right-clicking electric pole in Map Editor. more
    • Fixed crash when building tiles would result in you dying. more
    • Fixed disabled belts would still move the player. more
    • Fixed crashes related to changing train conditions in the latency state.
    • Fixed line breaking in description titles. more
    • Fixed typo in description of flooring items. more
    • Fixed blueprint icons not working as desired when paths where part of the selected area. more
    • Fixed that a username change wouldn't save if the game crashed. more
    • Fixed that clicking an alert button could show the wrong alert. more
    • Fixed flooring placement preview rendered on top of turret base. more
    • Fixed numpad home/end/other keys not working when numlock was off. more
    • Fixed that the game password dialog showed the password. more
    • Fixed that inserters at the very front of trains would sometimes not get enabled when a train would stop. more
    • Fixed the difficutly settings for scenarios not working. more
    • Fixed alignment of some pipe covers. more
    • Fixed the watch-your-step achievement not working. more
    • Rocket parts from building rockets in the rocket silo now show in production stats. more
    • Fixed tracked achievements scrolling off screen when un-tracking them. more
    • Fixed inserter sometimes only dropping one item on the ground before going back. (https://forums.factorio.com/28046#p183886)
    • Fixed LuaGameScript::active_mods not showing the correct list of mods. more
    • Fixed signals letting trains pass when the circuit network changes. more

  • Scripting
    • Fixed SpritePath to recipe that inherits icon from its result would not be considered valid. more
    • Fixed crash when setting new research in the on_research_completed event. more
    • Fixed error during the research completed event being un-clickable. more
    • Added LuaTile::position read.

You can get experimental releases by selecting the 'experimental' beta branch under Factorio's properties in Steam.
Jul 15, 2016
Factorio - Klonan
  • Changes
    • Updated demo campaign tips images.
    • Updated/Fixed locale entries.
    • Removed --mp-load-game
    • Default value for "Lights render quality" graphics options was changed to 1.0. If config.ini contains value lower than new minimum (0.25) it will be reset to the default value.
    • Lights are rendered with linear filtering to improve quality for lower "Lights render quality" settings. more
    • Added tips and tricks for pasting wagon slots and cycling in blueprint book.
    • Mods are now sorted alphabetically in the mods list.

  • Bugfixes
    • Fixed transport belt madness map showing an empty message dialog out of nowhere.
    • Fixed transport belt madness being impossible. more
    • Fixed crash on Linux when stdout was closed after starting Factorio. more
    • Fixed trains of other forces could be seen in the Trains GUI. more
    • Fixed inserters not saving custom pickup/dropoff when exported through the Lua blueprint interface.
    • Fixed robots delivering modules into the recipe input slots instead of the module inventory. more
    • Fixed performance issue caused by alt mode when some mods are installed and linear filtering is enabled. more
    • Items stop correctly before a belt deactivated using the circuit network. more
    • Fixed another case where a biter could get stuck. more
    • Fixed crash when using --mp-connect to join a game that requires user verification. more
    • Fixed train GUI would be too big to fit on screen with a large amount of character inventory slots. more
    • Buildings with backer names containing non-ASCII charecters are generated properly.
    • Fixed logistic counts when changing stack sizes of items the player was holding.
    • Fixed crash when right-clicking electric pole in Map Editor. more
    • Fixed crash when building tiles would result in you dying. more
    • Fixed disabled belts would still move the player. more
    • Fixed crashes related to changing train conditions in the latency state.
    • Fixed line breaking in description titles. more
    • Fixed typo in description of flooring items. more
    • Fixed blueprint icons not working as desired when paths where part of the selected area. more
    • Fixed that a username change wouldn't save if the game crashed. more
    • Fixed that clicking an alert button could show the wrong alert. more
    • Fixed flooring placement preview rendered on top of turret base. more
    • Fixed numpad home/end/other keys not working when numlock was off. more
    • Fixed that the game password dialog showed the password. more
    • Fixed that inserters at the very front of trains would sometimes not get enabled when a train would stop. more
    • Fixed the difficutly settings for scenarios not working. more
    • Fixed alignment of some pipe covers. more
    • Fixed the watch-your-step achievement not working. more
    • Rocket parts from building rockets in the rocket silo now show in production stats. more
    • Fixed tracked achievements scrolling off screen when un-tracking them. more
    • Fixed inserter sometimes only dropping one item on the ground before going back. (https://forums.factorio.com/28046#p183886)
    • Fixed LuaGameScript::active_mods not showing the correct list of mods. more
    • Fixed signals letting trains pass when the circuit network changes. more

  • Scripting
    • Fixed SpritePath to recipe that inherits icon from its result would not be considered valid. more
    • Fixed crash when setting new research in the on_research_completed event. more
    • Fixed error during the research completed event being un-clickable. more
    • Added LuaTile::position read.

You can get experimental releases by selecting the 'experimental' beta branch under Factorio's properties in Steam.
Factorio - kovarex
Hello!

Multiplayer - new field for me
Once we started the matching server, we finally had to face the reality of the multiplayer over the internet with people around the world. We realised there are A LOT of problems rising to the surface, and that it needs to be worked on.
I left all the multiplayer logic to be done by cube and tomas until now, and I had only a very simplistic idea how it works. With tomas on holiday and cube busy with other tasks, I realized how big of a problem it is that no one else has a clue how it works under the hood, so I took this opportunity to dive into it personally. After a week of reading, discussions with cube and partial rewrites, I can present you with my findings and a roadmap of ongoing changes.

From the Peer-to-peer model to the server-client model that is still kind of peer-to-peer
As some of you might know, the Factorio multiplayer was originally written to be always peer-to-peer. The motivation was to minimize the latency, as in the theoretical case of everyone having the same connection with everyone else in the game, the latency would actually be smaller compared to the server-client model.
The problem is, that there are many things that had to be paid as a price.
  • Everyone needs to be actually sending packets to everyone else, which isn't that easy in the current world, where IPv6 isn't everywhere, and public IPv4 address is becoming quite a luxury. This can be solved by nat punching, but it also isn't 100% reliable.
  • The logic of events, like joining, quitting, disconnecting, is very complex, as it always has to be discussed by the peers before anything can be done. And as we have the lock-step simulation, it always has to be ensured, that these actions are performed in perfect synchrony. Complexity means bugs, and in this case, some of them are hard to fix. On top of that, even if it was written perfectly, it wouldn't feel perfect.
  • Everyone needs to have the same latency.
  • No defence from lag spikes of individual players.
  • One packet per player per tick sent and received by everyone, so the amount of packets sent is O(n^2)
So once we encountered the "real internet" network communication, these problems shown to be too serious. We could have anticipated this if we had only listened to the people warning us that peer to peer will lead to trouble when we were first writing about the implementation more than a year ago. But sometimes, you just have to learn from your own mistakes.

So we added an additional option to run in the Server mode, which became the only option later on.

But our server mode only solved the first problem, as it was just a patch that re-routed all the communication between peers to go through the server, but all of the peer discussion related complexities stayed.

The original peer to peer model:



The new server model:


In other words, we took the worst from both of the models and combined it.

The real server-client architecture version 1.0 (to be done)
The current state can't be solved by just small fixes and tweaks, fundamental changes in the internals of the multiplayer logic on almost all of the layers has to be done to take advantage of the possible simplifications implied from the fact that peer to peer isn't supported anymore. Let me present the most important changes that I'm working on:

Clients receive merged package once per tick.
One of the most obvious changes is, that instead of re-sending all the packets, the server is unpacking these and merging them. He first waits to get the actions of all players in a certain tick, and then sends it to all the clients as a single message. This not only reduces the number of packets sent (from O(n^2) to O(n)), but it also keeps the clients from having to deal with the synchronisation and shit. They just accept the package as it is and apply it. If they miss something due to the packet loss, the client just asks the server for the whole package to be resent, in other words, the clients don't communicate with each other at all.



Clients don't know about other clients (network wise)
As clients don't need to communicate, they don't even need to know about their existence in the game. This doesn't mean that you wouldn't know about other players in the game. When a player joins, clients receive an input action Player joined as part of the merged package, so the player is created on the map and in the player list, but this is not related to network logic, and it is a different layer that works like this already. The difference is, that the clients don't need to know what network entity is related to what player, they don't care. Ignorance is bliss!

Server is the only Input action authority
The clients are also sending input actions, but only to the server, and it is up to the server to decide whether it should be included in the merged package or not. As the merged package is the only source of the actions to be applied, the server can safely omit a player from the package if he has a lag spike, so the lag spike is isolated from the rest of the game. This is not possible in the peer to peer model.

Removal of strange freezes on network events
Currently, when player wants to join a game, first it had to be discussed to stop the game at a certain tick. This tick had to be at least one latency step in the future, as other players could already be ahead of us, and you can't go backwards in Factorio state (Yes entropy works the same way in Factorio world). This is the strange freeze that happens when someone is connecting, disconnecting etc. During this time, the new client is introduced to others so they know they have to count with him.

But as we decided that clients know nothing about other clients, this can be removed completely. Once the server agrees on the new player to join the game, it can just start sending his actions as part of the merged package without any interruption. The save-game still needs to be uploaded by the server, so there will still be waiting, but there shouldn't be any strange freezes inbetween the download progress bar and normal game anymore.

Internal code simplification
As all the logic is straightened, the internal code will get actually much more simple as well. Simplier code means less bugs. Also this should mean, that if we want someone else to tweak the internals of the multiplayer, it shouldn't take him 3 weeks of study to understand what is going on.

The possible improvements (version 2.0)
Once this is all implemented and working, which will take some weeks, we could use this architecture as a reliable base to make additional improvements. These are ideas that shouldn't be that hard to do, but can't be promised.

Individual latency
The latency is now a global parameter of the multiplayer game, and it is the delay between creation of the user action (Input action), and it's execution, the bigger the latency is, the more time to deliver the actions between players, so the game might be less laggy. Big latency is bad for gameplay, small latency is bad for distant players. But with the proper server-client architecture and the server being the only input action authority, everyone can have different latency. The guy in the same street as the server only needs 30ms to send the package to the server to be included in the next merged package and next 30ms to get his action back to see it on the screen. But someone from the other part of the world in the same game might need 500ms to send the message, so his actions will just be packed into the merged package with bigger delay.

The latency of individual players should be tweaked automatically during the game by the server, so it could make sure that it is as small as possible for a flawless game.

An implication of this would be, that the server would have 0 latency, this would be unfair in a competitive game, but in Factorio, there is no reason to drag everyone down just to make it fair.
Don't wait for upload
This feature could also be added. When someone joins the game, the server needs to save it, and others have to wait for it, this can't be removed, but once it starts uploading the game, other players (including the server) could just continue playing, while the server is providing the map. On top of that, the server would save all the actions made by the players in the meantime. Once the map is uploaded, the server would send these actions and the client would fast-forward to catch up. The only limitation is, that the client has to be able to run the map in faster speed, so he can catch up.
Auto kick based on network speed or CPU limits
Apart from the latency tweaking based on the network roundrip time of individual peers, the server could also measure slowdown related to CPU lag. CPU lag means, that some of the players computers are not able to simulate the Factorio map fast enough, so others have to slow down their simulation and wait for him. It should be possible to set an option to auto-kick players who drag down the game too much. A similar limitation could be applied to upload speed.

Translations for Factorio
Scott and Mishka have been spending this week working through the crowdin, this is the website we use to allow the community to help us translate the game. To this date the community on crowdin has helped us translate the game into dozens of languages, along with the subtitles for the trailer and other related media.

We'd like to take an opportunity to thank all the translators, as their contribution really has a great impact on the game, and their perspective often helps us in understanding how terms and descriptions we write in the game are interpreted by the players.

We still have many untranslated languages on crowdin, so if you think you might be able to help out with the translation for your language, please checkout the factorio project.

As always, let us know what you think on our forums
Factorio - kovarex
Hello!

Multiplayer - new field for me
Once we started the matching server, we finally had to face the reality of the multiplayer over the internet with people around the world. We realised there are A LOT of problems rising to the surface, and that it needs to be worked on.
I left all the multiplayer logic to be done by cube and tomas until now, and I had only a very simplistic idea how it works. With tomas on holiday and cube busy with other tasks, I realized how big of a problem it is that no one else has a clue how it works under the hood, so I took this opportunity to dive into it personally. After a week of reading, discussions with cube and partial rewrites, I can present you with my findings and a roadmap of ongoing changes.

From the Peer-to-peer model to the server-client model that is still kind of peer-to-peer
As some of you might know, the Factorio multiplayer was originally written to be always peer-to-peer. The motivation was to minimize the latency, as in the theoretical case of everyone having the same connection with everyone else in the game, the latency would actually be smaller compared to the server-client model.
The problem is, that there are many things that had to be paid as a price.
  • Everyone needs to be actually sending packets to everyone else, which isn't that easy in the current world, where IPv6 isn't everywhere, and public IPv4 address is becoming quite a luxury. This can be solved by nat punching, but it also isn't 100% reliable.
  • The logic of events, like joining, quitting, disconnecting, is very complex, as it always has to be discussed by the peers before anything can be done. And as we have the lock-step simulation, it always has to be ensured, that these actions are performed in perfect synchrony. Complexity means bugs, and in this case, some of them are hard to fix. On top of that, even if it was written perfectly, it wouldn't feel perfect.
  • Everyone needs to have the same latency.
  • No defence from lag spikes of individual players.
  • One packet per player per tick sent and received by everyone, so the amount of packets sent is O(n^2)
So once we encountered the "real internet" network communication, these problems shown to be too serious. We could have anticipated this if we had only listened to the people warning us that peer to peer will lead to trouble when we were first writing about the implementation more than a year ago. But sometimes, you just have to learn from your own mistakes.

So we added an additional option to run in the Server mode, which became the only option later on.

But our server mode only solved the first problem, as it was just a patch that re-routed all the communication between peers to go through the server, but all of the peer discussion related complexities stayed.

The original peer to peer model:



The new server model:


In other words, we took the worst from both of the models and combined it.

The real server-client architecture version 1.0 (to be done)
The current state can't be solved by just small fixes and tweaks, fundamental changes in the internals of the multiplayer logic on almost all of the layers has to be done to take advantage of the possible simplifications implied from the fact that peer to peer isn't supported anymore. Let me present the most important changes that I'm working on:

Clients receive merged package once per tick.
One of the most obvious changes is, that instead of re-sending all the packets, the server is unpacking these and merging them. He first waits to get the actions of all players in a certain tick, and then sends it to all the clients as a single message. This not only reduces the number of packets sent (from O(n^2) to O(n)), but it also keeps the clients from having to deal with the synchronisation and shit. They just accept the package as it is and apply it. If they miss something due to the packet loss, the client just asks the server for the whole package to be resent, in other words, the clients don't communicate with each other at all.



Clients don't know about other clients (network wise)
As clients don't need to communicate, they don't even need to know about their existence in the game. This doesn't mean that you wouldn't know about other players in the game. When a player joins, clients receive an input action Player joined as part of the merged package, so the player is created on the map and in the player list, but this is not related to network logic, and it is a different layer that works like this already. The difference is, that the clients don't need to know what network entity is related to what player, they don't care. Ignorance is bliss!

Server is the only Input action authority
The clients are also sending input actions, but only to the server, and it is up to the server to decide whether it should be included in the merged package or not. As the merged package is the only source of the actions to be applied, the server can safely omit a player from the package if he has a lag spike, so the lag spike is isolated from the rest of the game. This is not possible in the peer to peer model.

Removal of strange freezes on network events
Currently, when player wants to join a game, first it had to be discussed to stop the game at a certain tick. This tick had to be at least one latency step in the future, as other players could already be ahead of us, and you can't go backwards in Factorio state (Yes entropy works the same way in Factorio world). This is the strange freeze that happens when someone is connecting, disconnecting etc. During this time, the new client is introduced to others so they know they have to count with him.

But as we decided that clients know nothing about other clients, this can be removed completely. Once the server agrees on the new player to join the game, it can just start sending his actions as part of the merged package without any interruption. The save-game still needs to be uploaded by the server, so there will still be waiting, but there shouldn't be any strange freezes inbetween the download progress bar and normal game anymore.

Internal code simplification
As all the logic is straightened, the internal code will get actually much more simple as well. Simplier code means less bugs. Also this should mean, that if we want someone else to tweak the internals of the multiplayer, it shouldn't take him 3 weeks of study to understand what is going on.

The possible improvements (version 2.0)
Once this is all implemented and working, which will take some weeks, we could use this architecture as a reliable base to make additional improvements. These are ideas that shouldn't be that hard to do, but can't be promised.

Individual latency
The latency is now a global parameter of the multiplayer game, and it is the delay between creation of the user action (Input action), and it's execution, the bigger the latency is, the more time to deliver the actions between players, so the game might be less laggy. Big latency is bad for gameplay, small latency is bad for distant players. But with the proper server-client architecture and the server being the only input action authority, everyone can have different latency. The guy in the same street as the server only needs 30ms to send the package to the server to be included in the next merged package and next 30ms to get his action back to see it on the screen. But someone from the other part of the world in the same game might need 500ms to send the message, so his actions will just be packed into the merged package with bigger delay.

The latency of individual players should be tweaked automatically during the game by the server, so it could make sure that it is as small as possible for a flawless game.

An implication of this would be, that the server would have 0 latency, this would be unfair in a competitive game, but in Factorio, there is no reason to drag everyone down just to make it fair.
Don't wait for upload
This feature could also be added. When someone joins the game, the server needs to save it, and others have to wait for it, this can't be removed, but once it starts uploading the game, other players (including the server) could just continue playing, while the server is providing the map. On top of that, the server would save all the actions made by the players in the meantime. Once the map is uploaded, the server would send these actions and the client would fast-forward to catch up. The only limitation is, that the client has to be able to run the map in faster speed, so he can catch up.
Auto kick based on network speed or CPU limits
Apart from the latency tweaking based on the network roundrip time of individual peers, the server could also measure slowdown related to CPU lag. CPU lag means, that some of the players computers are not able to simulate the Factorio map fast enough, so others have to slow down their simulation and wait for him. It should be possible to set an option to auto-kick players who drag down the game too much. A similar limitation could be applied to upload speed.

Translations for Factorio
Scott and Mishka have been spending this week working through the crowdin, this is the website we use to allow the community to help us translate the game. To this date the community on crowdin has helped us translate the game into dozens of languages, along with the subtitles for the trailer and other related media.

We'd like to take an opportunity to thank all the translators, as their contribution really has a great impact on the game, and their perspective often helps us in understanding how terms and descriptions we write in the game are interpreted by the players.

We still have many untranslated languages on crowdin, so if you think you might be able to help out with the translation for your language, please checkout the factorio project.

As always, let us know what you think on our forums
Jul 11, 2016
Factorio - Klonan

Use the automatic updater if you can (check experimental updates in other settings) or download full installation at http://www.factorio.com/download/experimental.
Jul 11, 2016
Factorio - Klonan

Use the automatic updater if you can (check experimental updates in other settings) or download full installation at http://www.factorio.com/download/experimental.
Jul 11, 2016
Factorio - HanziQ
  • Minor Features
    • Holding the "drop item" key will keep dropping items.
    • Rocks can be mined while holding blueprints. Graphics;
    • Updated the stack inserter technology icon.

  • Balancing
    • Medium and large worms spawn further from the starting area.

  • Bugfixes
    • Connect game dialog remembers DNS the address as written rather than only IP more
    • Science packs and ammo are now recorded in the items consumed portion of production stats.
    • Fixed the mysterious crash when building rails. more
    • Unified the mass production 3 achievement to 20 M (it was 10M in game and 100M on steam). more
    • Fixed rendering layer of gate wall. more
    • Fixed fullscreen toggle in graphics options. more
    • Fixed mining drills using slightly too much energy per item mined.
    • Fixed that rail signals connectable to two rails at the same time were marked as buildable even when the buildability was valid only for one of the rails. more
    • Fixed burner inserters sometimes getting stuck. more
    • Fixed inserters with stack bonus waiting for stacks indefinitely when there's nothing to take from. more
    • Fixed blueprint previews with tiles and rails vs tiles with no rails. more
    • Fixed crash that could sometimes happen when a biter couldn't reach a target for a long time. more
    • Fixed on_player_placed_equipment was not called when quick transferring equipment into armor. more
    • Fixed map generator problems very far from the start.
    • Map size is now limited to 2000 km by 2000 km with a black bar rather than crashing when reaching this distance
    • Fixed clean-cursor with armor not putting it into filtered slots in your quickbar. more
    • Fixed that expansion chunk candidates values weren't updated properly. more
    • Fixed landfills could be included in blueprints. more
    • Fixed multiple instances of walls blocking movement when they shouldn't. more
    • Fixed that the solaris achievement unobtainable.
    • Fixed flamethrower turret would cause blueprint preview move up and down.
    • Fixed crash when the currently-playing folder can't be deleted when exiting game. more
    • Fixed crash when connection to the mod portal fails more
    • Fixed Update Mods button being sometimes disabled more
    • Fixed that LuaGameScript::write_file treated data as null-terminated byte string. more
    • Fixed entities marked with "not-repairable" still being repairable manually. more
    • Attempt to fix "Access is denied" error message during autosaves. more
    • Fixed desync caused by transport belt connected to circuit network reading in pulse mode.
    • Fixed save corruption when driving vehicles on transport belts in some instances. more
    • Fixed copy-paste not waking up inserters when copying filters between different inerter types. more
    • Fixed error when biters tried to expand while evolution factor was 0. more
    • Fixed building paths not refilling the cursor in some instances. more
    • Fixed unlocked achievements blinking too quickly. more
    • Fixed crash when setting the force of a logistic container in ghost form. more

  • Scripting
    • Fixed label size issues when using different font sizes or resizing the game window. more
    • Fixed crash when trying to create sprite-button with valid SpritePath to sprite that doesn't exist. (https://forums.factorio.com/28564) LuaGuiElement::add won't create sprite-button and returns nil if invalid SpritePath is passed.
    • Added an option to LuaSurface::set_tiles() to disable the correction logic for total control of what the tiles end up as.
    • Added item-group, fluid, tile, virtual-signal and achievement icons to be accessible by the SpritePath used in the sprite-button element. Added SpriteButton to the scripting documentation.
    • Added "grid" to the on_player_placed_equipment event.
    • Added LuaRecipe::localised_name read.
    • Added LuaGuiElement type "scroll-pane".

You can get experimental releases by selecting the 'experimental' beta branch under Factorio's properties in Steam.
Jul 11, 2016
Factorio - HanziQ
  • Minor Features
    • Holding the "drop item" key will keep dropping items.
    • Rocks can be mined while holding blueprints. Graphics;
    • Updated the stack inserter technology icon.

  • Balancing
    • Medium and large worms spawn further from the starting area.

  • Bugfixes
    • Connect game dialog remembers DNS the address as written rather than only IP more
    • Science packs and ammo are now recorded in the items consumed portion of production stats.
    • Fixed the mysterious crash when building rails. more
    • Unified the mass production 3 achievement to 20 M (it was 10M in game and 100M on steam). more
    • Fixed rendering layer of gate wall. more
    • Fixed fullscreen toggle in graphics options. more
    • Fixed mining drills using slightly too much energy per item mined.
    • Fixed that rail signals connectable to two rails at the same time were marked as buildable even when the buildability was valid only for one of the rails. more
    • Fixed burner inserters sometimes getting stuck. more
    • Fixed inserters with stack bonus waiting for stacks indefinitely when there's nothing to take from. more
    • Fixed blueprint previews with tiles and rails vs tiles with no rails. more
    • Fixed crash that could sometimes happen when a biter couldn't reach a target for a long time. more
    • Fixed on_player_placed_equipment was not called when quick transferring equipment into armor. more
    • Fixed map generator problems very far from the start.
    • Map size is now limited to 2000 km by 2000 km with a black bar rather than crashing when reaching this distance
    • Fixed clean-cursor with armor not putting it into filtered slots in your quickbar. more
    • Fixed that expansion chunk candidates values weren't updated properly. more
    • Fixed landfills could be included in blueprints. more
    • Fixed multiple instances of walls blocking movement when they shouldn't. more
    • Fixed that the solaris achievement unobtainable.
    • Fixed flamethrower turret would cause blueprint preview move up and down.
    • Fixed crash when the currently-playing folder can't be deleted when exiting game. more
    • Fixed crash when connection to the mod portal fails more
    • Fixed Update Mods button being sometimes disabled more
    • Fixed that LuaGameScript::write_file treated data as null-terminated byte string. more
    • Fixed entities marked with "not-repairable" still being repairable manually. more
    • Attempt to fix "Access is denied" error message during autosaves. more
    • Fixed desync caused by transport belt connected to circuit network reading in pulse mode.
    • Fixed save corruption when driving vehicles on transport belts in some instances. more
    • Fixed copy-paste not waking up inserters when copying filters between different inerter types. more
    • Fixed error when biters tried to expand while evolution factor was 0. more
    • Fixed building paths not refilling the cursor in some instances. more
    • Fixed unlocked achievements blinking too quickly. more
    • Fixed crash when setting the force of a logistic container in ghost form. more

  • Scripting
    • Fixed label size issues when using different font sizes or resizing the game window. more
    • Fixed crash when trying to create sprite-button with valid SpritePath to sprite that doesn't exist. (https://forums.factorio.com/28564) LuaGuiElement::add won't create sprite-button and returns nil if invalid SpritePath is passed.
    • Added an option to LuaSurface::set_tiles() to disable the correction logic for total control of what the tiles end up as.
    • Added item-group, fluid, tile, virtual-signal and achievement icons to be accessible by the SpritePath used in the sprite-button element. Added SpriteButton to the scripting documentation.
    • Added "grid" to the on_player_placed_equipment event.
    • Added LuaRecipe::localised_name read.
    • Added LuaGuiElement type "scroll-pane".

You can get experimental releases by selecting the 'experimental' beta branch under Factorio's properties in Steam.
...