This really is a tiny feature, the car and tank will now save the color of the passengers when they exit the vehicle.
So now you won't forget which vehicle you were driving, and can warn everyone else on the server: "Pink tank is mine".
All kinds of bugs
As uninteresting as it is; most bugs are boring and typically involve missing code. Someone forgot to implement part of a new feature, forgot that some situation could happen, forgot to check for null. Rarely interesting things show up where everything is working but not how we want it to.
Performance: It's never what you think it is
Recently we had a bug report where a modded game would freeze for a minute for seemingly no reason and then continue like nothing went wrong. It being a heavily modded game my first reaction was to blame it on the mods doing something in a very unoptimized way. But I had to test it to figure out which mod was causing the problem. After reproducing it... I was reminded (again) that it's (almost) never what you think it is.
When a train is driven by a player the game has no idea what direction the player will drive (straight, left, or right). So, as the train is moving the game goes over the potential rails in front of the train and asks every gate it finds to open in case the train ends up driving over them. This logic was very simple: get the rail distance it would take the train to stop at its current speed and "walk" down the rails until it exceeded that distance. As it walked, tell any gates on any of those rails to open.
That logic is "correct" in that it does what it was supposed to do: open any gates that the train could drive over. What it wasn't accounting for was a rail system where everything looped back onto itself 5-10 times per junction.The time complexity for the algorithm it was using was O(N^2). That's "fine" when N is small. However, in this save file, with this rail network, and with these modded trains (with 2,500% speed bonus from modded fuel no less) it meant N ended up somewhere around 75,865. That - as it turns out - was slow.
Interestingly even though the algorithm was recursive it didn't stack overflow. The old algorithm was executing the "open gates on this rail" 5,755,573,057 times. Many of those requests to open gates where duplicates but the algorithm didn't care. In total it took 57 seconds for it to run all of the logic - still incredibly fast for what it was doing (1.6 million rails per game tick).
After some thinking about it; I was able to re-implement the algorithm in worse-case O(N) time which ended up executing the "open gates on this rail" logic 42,913 times and took 0.009 seconds.
Crashing on dereferencing null? Add a null check
I love this phrase. It's both correct and incorrect at the same time. I put it right next to "Crashing from an exception? Just try-catch". It's such an easy trap to fall into: fixing a symptom instead of the cause.
Earlier this week we got a bug report about the game freezing, consuming all of the available RAM, and then crashing when it ran out of RAM. It was again a modded save file so my first instinct was to blame it on a mod. Again, I had to test it. And again... it's never what you think it is.
The crash was correct: it was running out of RAM and when that happens the game crashes and exits. But why?
The game failed to allocate memory when it tried to create a furnace smoke
Because it was trying to make 4'294'967'000~ (4 billion) smokes
Because a small negative signed integer was being converted to unsigned
Clearly the game wasn't supposed to be making 4 billion smokes. So, seeing the problem my first fix was "Casting a small negative signed integer to unsigned makes it 4 billion? If it's negative, I'll just return 0 since a negative amount of smoke makes no sense". I was about to commit this fix when the smarter part of my brain said "that makes no sense, why would this code ever say to make a negative amount of smoke?" So I kept going ... why?
... Because the logic to make those signed integers was "(cycle progress ...) - (last cycle progress ...)" (cycle was < last cycle ... that should never be possible)
Because the furnace burner had made a negative amount of progress in burning the fuel (negative progress should not be possible)
Because the "remaining amount of fuel from this item to burn" was negative (negative fuel values are invalid and the game won't even reach the main menu if some mod tries to set one)
Because the mod API didn't prevent mods from doing: entity.burner.remaining_burning_fuel = -1 AND the game didn't properly clear "remaining amount of fuel from this item to burn" when the item being burnt was removed due to mod migration/removal.
So, I still repeat the phrase: "Crashing on dereferencing null? Just add a null check!" as a reminder to myself and others to always look deeper into why and never stop at the basic symptom of a problem.
As always, let us know what you think on our forum.
Tweaked default graphics settings. The game should choose better default graphics settings for computers with integrated GPUs or less than 6 GB of RAM.
Bugfixes
Fixed that GUI element size wasn't updated in inactive tabs when ui scaled changed. more
Fixed "Confirm Message" conflicting with some key-bindings. "Confirm Message" can no longer be bound to mouse input. more
Fixed possible crash when rendering GUI element with dynamically loaded sprite. more
Fixed recipe window showing wrong item count or not enough ingredients in some situations. more
Fixed a crash when deleting the force of a car with an active logistic network through vehicle equipment grid. more
Mod names are no longer allowed to contain rich text. more
Fixed IME (Input Method Editors) did not work (Windows only). more
Fixed placement of oil and uranium patches back to that of 0.17.40. more
Fixed that roboports with a request_to_open_door_timeout of 0 wouldn't work correctly. more
Fixed that products wouldn't allow amount_min of 0 for items. more
Fixed that migrated/removed fuel items could leave the game in an invalid state. more
Fixed a crash when building combat robots after resetting the achievements in-game. more
Fixed that assembler ghosts would carry over the unresearched blueprint bug from 0.17.38. more
Fixed crash related to clearing a blueprint book from the cursor. more
Fixed that the rotation of blueprint was not saved to the blueprint library in some situations.
Hello, the bugfixing period boringly continues, we got down to 159 active bug reports, so in few weeks we should be finally down with this burden. But at least the graphics department has something new to show:
New design for the chemical plant
After some time working on the redesign of the chemical plant, we can finally show the results:
In the old version, we had the problem of not being very clear when the chemical plant was working or not. So apart from the style modernisation and high resolution, this redesign was aimed for solving this readability issue. As an addition, we tried also to be very clear at the time of viewing what kind of chemical recipe the plant is processing.
Finally we came with the solution of adding a big window - pipe style - showing the moving liquids inside with the tinted color, and also adding a chimney releasing smoke when the plant is on.
As you can see in the animation above, the smoke is also taking the tinted color of the processed chemical, so it should be crystal clear what it’s going on now with this entity. This tinted smoke is very experimental, and we need to make more testing before releasing it, the point is to avoid a too colorful pollution, but in terms of concept I find it 'very chemical' having colored smoke, which could fit perfectly with the subject.
Here you can see the four rotations:
Factorio wouldn’t be Factorio if the things would be easy as "rotate the model in 3D and done". Due to readability requirements, camera perspective, and interaction with any other entity in the game, we have to recompose the entity for every rotation. That’s why even rotating the entity 90 degrees the window remains at the front, and the chimney at the back. Basically every rotation is like a new entity that tries to look like its other rotations, but somehow rotated (!?).
We truly believe that this new design is going to be a good improvement for the game. Slowly but steady, Factorio is getting to its 1.0 release.
As always, let us know what you think on our forum.
Improved efficiency of noise program compilation and quality of error messages.
Bugfixes
Fixed a crash that would sometimes happen after deleting a blueprint from the library. more
Fixed crash related to train schedule containing only temporary stations. more
Fixed GUI inspector vertical align value inconsistency (middle instead of center). more
Fixed LuaInventory::sort_and_merge when used on cargo wagons with inventory limits set. more
Fixed that distractor robots would show in the bonus GUI under the follower robots section. more
Fixed that reading invalid chain signals wouldn't work correctly. more
Fixed yet another ghost connection error related to consistency checks. more
Fixed some cases of multi-layered icons not being scaled correctly. more
Fixed power switch connection consistency problem. more
Fixed "Confirm Message" key-binding not working when bound to some mouse buttons. more
Fixed backwards/forwards max speed fuel modifier related to two-headed trains. more
Fixed interactions of assemblers and underground pipe connections blocked by induced fluid mixing. more
Fixed setting entity ghosts to minable=false didn't work. more
Fixed that the statistics GUI would show count values < 0.5 as "no count". more
Fixed a performance problem with high speed idling trains on circular rail networks. more
Fixed signal placement visualisation for special cases related to straight diagonal rail. more
Fixed that items supposed to be removed on clearing cursor (copy, cut, paste, blueprints from blueprint library etc.) were put into character corpse. more
Fixed uranium cannon shells shooting backwards when aimed closed to the tank.more
Fixed Programmable Speaker alert textbox not losing focus when pressing ENTER. more
Fixed desync caused by setting font colors on buttons. more
You can get experimental releases by selecting the 'experimental' beta branch under Factorio's properties in Steam.
As the time goes on, the nature of our weekly FFF post has changed. At the very beginning (FFF-1) it was to let people know that "we're still alive and working on the game", and over time we've grown into covering a range of different topics:
Communicating our progress and roadmap of the next releases.
Showing new features and gathering community feedback on them.
Diving into the technical side of game development and particular challenges we face.
'Meta-posts' about the company and the changes outside of the game.
Community spotlights and interesting Factorio related news.
It is always an interesting challenge each week to determine what topics we might be able to cover in the FFF. During the weeks of rapid development the FFF can feel like a triumphant reveal of what we have been working on, and we excitedly await the community response. Other times, such as when most of the team is on bugfixing, we can take the oppourtunity to explore other points of discussion, such as the marketing post last week.
The graph of the FFF readership over the last year is quite informative to look into:
We had a good run back in January and February, we had week after week of really interesting posts and a build-up of excitement for the 0.17 release. Now after the release, the readership has stabilized at around 40-45,000 views a week (note, that the graph does not include people reading the blog post through Steam).
The FFF is close to its 300th post now, with no signs of stopping soon, and the continued audience of dedicated readers each week help to keep us on track and focused on our quest towards 1.0. As we get closer to completion of the game, the general nature of the blog post will no doubt change even further. The good times of showing a new feature each week might be over, but I hope we will be able to provide interesting insights into the game and our development processes. I would also like to thank all the players/readers who share their thoughts with us each week, it is really great to have so much support and care for our project.
Lua API documentation improvements
The Lua API documentation is one of the most valuable resources for modders: It is generated directly from the game's source code, so it completely covers all scripting functionalities. Furthermore, additional pages cover some general concepts such as in what order mod files are loaded or how to store persistent data. However, a big issue with these pages was that they were linked at the very bottom of the main page, below two long lists of classes and events. This means that they were very easy to miss.
To remedy this, all additional pages are now linked at the top of the main page and accompanied by a short description of the structure of the API. To further support getting a quick overview, I added a page about general Lua libraries that Factorio changes. These changes could be frustrating traps where it would take users a very long time to find out that some functions, such as getting the current real time, were not available. The new main page organization should serve well to highlight this new page to make the discovery of these changes much easier.
As always, let us know what you think on our forum.
When a train performs path finding while in a chain signal sequence, the pathfinding will have a constraint to not go through reserved block before exiting the chain sequence. This solves a problem of train intersections being possible to be deadlocked even with proper chain signals usage in cases of using temporary stops or when path is changed because of station is being enabled/disabled by a circuit network. (more) This also allowed us to to let train recalculate path spontaneously even in chain signal sequence, as it shouldn't break anything now.
When a temporary blueprint(e.g. blueprint from copy) is placed in the quickbar, the blueprint won't be destroyed when clearing the cursor and instead moved to the inventory. more
Separated incompatible mods from dependencies in browse mods GUI.
Bugfixes
Fixed a crash when trying to build locomotives near water/edges of the map. more
Fixed players getting a new player character when they connect twice to a paused game. more
Fixed that entity tooltips did not show negative emissions. more
Fluid assembler ghosts now show correct pipe connections.
Fixed a crash when trying to write auto trash filters with not-a-table.
Fixed possible fluid mixing from reviving fluid assembler ghost by higher version. more
Disabled areas of new map GUI are set correctly on exchange string import. more
Fixed that script rendering sprites loaded from files would disappear on save/load. more
Fixed that LuaForce::reset_technology_effects() wouldn't preserve things in the research queue. more
Fixed that using an upgrade planner on a blueprint wouldn't upgrade configured modules. more
Fixed cross-platform issues related to the Lua bit library. more
Fixed crash when changing controller in multiplayer and changing your selection at the same time.
Fixed that blueprint shortcuts in action bar would become magically available when they are destroyed, if they originated from the blueprint library. more
Fixed that technology tooltips could sometimes end up behind the technology screen. more
Fixed that target leading would not take into account any slowdown modifiers on units. more
Fixed that the favorite button for servers wouldn't work correctly if the server was already selected. more
Fixed that rocket silos would show an unhelpful status in the tooltip. more
Fixed PvP crash when loading save games before "player" -> "character" rename. more
Fixed acid splashes were blocking placement of buildings. more
Fixed that acid splashes would have a burning sound effect.
Fixed typo in font name that would cause crash in Cyrillic locales on Linux. more
Fixed that script changing train path as a reaction to train created event could break the rolling-stock connection process. more
Fixed that scroll panes empty areas of the mod GUI was blocking the mouse interaction with the map. more
Fixed that ghost rail building didn't avoid ghost buildings properly. more
All unused control inputs are saved in the config file, to preserve mod key bindings even when the mod is disabled and enabled again. more
Fixed that zooming in the train preview window didn't respect the zooming key binding settings. more
Fixed that train with no path changed from NO_PATH to PATH_LOST and back to NO_PATH every few seconds. more
Fixed that train waiting at the signal changed from WAIT_SIGNAL to ARRIVE_SIGNAL and back to WAIT_SIGNAL every few seconds. more
Fixed a crash that would sometimes happen when two players were connecting to a server at the same time and one of them quit before the map finished saving. more
Fixed a crash related to modded deconstruction item filters. more
Fixed performance issues in mipmap generation routines causing the game to freeze or crash at 95% of sprite loading. more
Fixed traditional Chinese font being used for simplified Chinese. more
Fixed that pollution would not be shown in entity tooltip when using a void energy source. more
Fixed PvP re-roll round button not generating a different map with only a single team.
Fixed PvP state when playing Last silo standing with only a single team.
Fixed PvP DEFCON mode interaction with research queue.
Fixed screenshot rendering could crash when using LuaScriptRendering API to draw a sprite from file. more