1. Factorio
  2. News

Factorio News

Version 0.18.7 released

Graphics


  • New visuals for poison capsule effect.
  • New dying effect and remnants for flying robots.
Sounds


  • Entity destroyed alert - Sound softened and lowered in volume.
  • Weapon sounds (WIP) - new Pistol, Submachine gun, Gun turret, Laser turret.
  • Logistic chests open sound (WIP).
  • Poison capsule cloud (WIP).
Bugfixes


  • Fixed that reordering heat buffers during the same tick a different heat buffer was built would leave the heat buffer state corrupted. more
  • Fixed that entity sounds with probabilities would loop forever once they started playing. more
  • Fixed rocket silo tooltip did not include contents of the rocket result inventory. more
  • Fixed that styles were applied to wrong slot in a filtered train view. more
  • Fixed that server authentication would fail if both the token and username and password were provided. more
  • Fixed that changing inserter pickup/dropoff through mods didn't work correctly. more
  • Fixed that combat robots had their fire resistance overwritten. more
  • Fixed that rolling stocks were not pulled correctly when train was moving through curved rails. more
  • Fixed that LuaEntityPrototype::burner_prototype didn't work for the burner-generator entity type. more
  • Fixed janky construction robot flying animation during repair work. more
Scripting


  • Added optional LuaItemStack::build_blueprint raise_built.
  • Added LuaInventory::find_empty_stack(), count_empty_stacks(), and get_insertable_count().
  • Added LuaEntityPrototype::heat_energy_source_prototype, fluid_energy_source_prototype, and void_energy_source_prototype read.
  • Added LuaGameScript::encode_string() and decode_string().
  • Added on_player_set_quick_bar_slot.
  • Added on_pre_player_toggled_map_editor.
  • Removed LuaPlayer::name write. more
  • Removed core lualib util.encode() and util.decode().


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

Friday Facts #334 - New poison cloud animation, flying robot dying effect

Read this post on our website.

Poison cloud (Ernestas, posila)

The poison cloud animation is a placeholder spritesheet (that kovarex found somewhere on the internet), we have wanted to improve it for a long time, but since it was always such a small detail other things took priority. Well now is the time to finish everything, big and small.

https://cdn.factorio.com/assets/img/blog/fff-334-old-cloud.mp4

Some of the problems we see with the old placeholder animation:
  • The edge (where damage will apply) is not clearly defined
  • The center strongly obstructs vision underneath the animation
  • It breaks the perspective/height illusion with its very circular shape


The new animation was done quickly and without the need of any large changes to the Factorio engine. This is the mindset we are in these days, use the engine features we already have to finish things quickly and without trouble, and we try to stop ourselves going crazy with more detail.

https://cdn.factorio.com/assets/img/blog/fff-334-new-cloud.mp4

The smoke capsule itself spawns a bunch of smaller dummy entities which do the smoke drawing, while the damage is kept consistent by only using the central smoke cloud to apply damage.

Flying robot die effect (Dom, Klonan)

Unlike the poison cloud, the flying robots dying was never something that we felt strongly about changing, they just exploded and poofed out of existence. With the new particle system we had an idea of using a particle to show the robot falling to the ground. The experimentation was quick and effective, and we liked the effect. Using the 16 directions of the flying robot sprites, we can create a 16 frame animation of the robot spinning for free, which is a good trick.

https://cdn.factorio.com/assets/img/blog/fff-334-robot-dying.mp4

To complete the effect we needed to pay a bit of a price by creating some remnants on the ground. Dom didn't take long to model and render 3 remnant variations for each robot. Even if you don't see the robots falling and dying actively, the corpses on the ground can really add to the battlefield.



These new effects have been merged in our master branch now, so you can expect to play with them with the next 0.18 experimental release, likely early next week.

Version 0.18.6 released

Bugfixes


  • Fixed a crash related to multiple blocks reserved for different trains but later merged by placing a rail. more
  • Fixed that construction robots were missing their working animation. more
  • Fixed circuit network debug visualization text overlap. more
  • Fixed the circuit network tooltip backgrounds didn't highlight correctly. more
  • Fixed that script.active_mods wouldn't be accurate when loading save files in some cases. more
  • Fixed that the sync-mods-with-save feature would try to download mods it didn't need to in some cases. more
  • Fixed that trains pathfinder could create non contiguous path in case of single segment cycle with a junction. more
  • Fixed possible crash when units were attacking rails with train on them. more
  • Fixed pump would consume energy and play animation when it tried to transfer very small amount of fluid but failed to do so. more
  • Fixed creating fire entity by trigger effect invoked by a particle would crash the game.
  • Fixed overriding LuaSurface::brightness_visual_weight would cause light map to appear in map view. more
Scripting


  • Building entities with from items with 0 health will set the entity to 1 health instead of 0. more
  • Added LuaGameScript::reset_time_played() which will reset the 'Time played' to 0.


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

Friday Facts #333 - Terrain scrolling

Read this post on our website.

Hello,
We released 0.18.4 this week, same old same old, more bugfixes, more bugs, more changes. At this stage of development, not many interesting things are happening, we are just polishing what we have.

Minor terrain render optimization (posila)

Just a couple days before the release of 0.18.0 I had an epiphany about a terrain rendering problem that was bugging me for a really long time. When rendering terrain, we reuse the texture from the previous frame. How this was always done, is that we would render the texture shifted to the new position, fill up the gap, and then copy the final result back into the texture for reuse in next frame. So what was bugging me about this? This simple operation would result in rasterizing 2 screens worth of pixels. While that is not a problem for at least half decent GPUs from the past decade, it's a significant work load for integrated GPUs, which in general have an order of magnitude lower memory bandwidth than dedicated GPUs. It could also be equally bad for old low-end dedicated GPUs.

One of the extreme examples is the Intel HD Graphics 3000 - an integrated GPU on the Sandy Bridge CPU architecture. When you sit still and the terrain can be reused without shifting, it would take 'just' 2 milliseconds to copy it to the game view. But when you started to move, the GPU time to render the terrain could go up to 5 milliseconds. And that is only at 1600x900 resolution. Not even 1080p. So, it was bothering me we were spending nearly 1/3rd of a frame time (16.66 ms) to render the terrain, when the engine has much more work to do to render the rest of the game (for comparison GeForce GTX 750Ti or Radeon R7 360 would do the same under 0.5 ms at 1080p).

The realization I had, was that I can 'scroll' the buffer texture. If I remember the offset of the top left corner, I can un-scroll it to the game view, and then instead of copying all the terrain back to the buffer, we can just adjust the offset and update the parts that changed. So, the number of pixels copied is proportional to how much the terrain scrolled. It is so simple I am embarrassed not to have figured this out years ago.

https://cdn.factorio.com/assets/img/blog/fff-333-tile-buffer.mp4

Most people could not have noticed this optimization, as most GPUs people have nowadays did the un-optimal thing in a fraction of a millisecond already. But it still made me very happy to be finally able to remove this inefficiency. Contemporary integrated GPUs are also significantly faster, and while it might not be as much of a challenge to render the game for them, they do share some resources with the CPU - be it the last level of cache, or CPU cooler, so the integrated GPU working hard may cause the CPU to slow down.

However, the point I wanted to illustrate by this post is how broad a range of GPUs there is. People see a 2D game and expect to be able to play it on essentially anything. If we want to live up to that expectations, we have to impose a lot of limitations on ourselves, because 'anything' also includes a couple orders of magnitude slower GPU than is found in an average gaming computer of today. CPUs got a lot faster in the last decade too, but mostly due to increasing the number of cores and adding wider vector computation units. They didn't get that much faster when executing serial code, which is unfortunately most of Factorio's game code. So if you play the game on a laptop with a Core 2 Duo and GeForce 320M, you'll run into framerate issues due to the weak GPU much sooner than a UPS slowdown due to the old CPU.

Side note: You might ask, why do we bother with caching the terrain in the first place and not just re-render it from scratch every frame. Short answer is - because Factorio's terrain rendering is insane due to its complicated tile transition rules, and re-rendering it every frame is just not fast enough.

Version 0.18.4 released

Balancing


  • Wave defense difficulty will scale with online player count.
  • Wave defense hard difficulty will give 50% less bounty on each kill.
Sounds


  • New sound for small explosion.
  • Combat robots now have their own explosion sound.
  • Shotgun has more variety so it sounds less repetitive.
  • Vehicle impacting wooden objects (e.g chests) now sounds subtly different to crashing into trees.
  • A few minor volume level changes including lowering the offshore pump and electric furnace.
Bugfixes


  • Fixed a crash when saving fails due to mod issues. more
  • Fixed a crash that would happen when the player entered a vehicle when some biters were aggroed at them. more
  • Fixed that cargo wagons built while a train is moving didn't animate the doors correctly. more
  • Fixed an error when using modded night vision defined in zip files. more
  • Fixed a performance issue with assembling machine result slot tooltips. more
  • Fixed that items marked with the mod-openable flag couldn't be opened from the quickbar in some cases. more
  • Fixed that train could fail with chain signal sequence escape maneuver when path goes multiple times through a rail segment.
  • Possibly fixed seam on terrain at certain position and zoom level. more
  • Fixed that sometimes wave defense would trigger victory before killing all spawners. more
Scripting


  • Fixed that writing to LuaForce::stack_inserter_capacity_bonus was limited to 200 instead of 254.
Modding


  • Changed definitions of map colors of beacons, pipes, heat pipes, roboports and steam engines, so they can be overridden by friendly_map_color. more
  • Added ParticlePrototype::ended_on_ground_trigger_effect.
  • Added fuel burnt results to the item tooltip.
  • Loader remnants will pick rotation the same way as underground belts do. more


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