Friday Facts #343 - Environmental particle effects
Author: Klonan,
published 4 years ago,
[i][url=https://factorio.com/blog/post/fff-343]Read this post on our website.[/url][/i]
[h1]Environmental particle effects (Dom)[/h1]
Since the particle optimization we did for 0.18 ([url=https://factorio.com/blog/post/fff-322]FFF-322[/url]) and the introduction of new explosions ([url=https://factorio.com/blog/post/fff-325]FFF-325[/url]), we were able to push our vision even more.
It always bothered me that the grenade and other explosions would emit the same type of particles regardless of the context. In most cases it isn't that bad, and somewhat okay, but when you throw a grenade into water, it will still emit stone particles, which breaks the illusion.
Another problem is that we have the nice decoratives on the ground, but they don't really 'interact' with anything that goes on, and can feel like fake flat stickers instead of something 'real'. You would expect that when there is a massive explosion 2ft away, the bushes might have some reaction to that.
https://cdn.factorio.com/assets/img/blog/fff-343-grenade-old.mp4
[i]The explosion effect currently in 0.18[/i]
[h3]Specific tile effects[/h3]
One thing we wanted was some way for tiles to respond to the explosions in different ways. The way Posila decided to add this capability, is through the 'Invoke tile effect trigger'. Tiles can define an effect that happens, and the explosion will tell the tile to create that action. After the implementation of this feature, it was smooth sailing from there. I was able to design the explosions like I wanted them, to be emitting specific particles based on their tiles. For example besides the visual improvement of the stone emissions in water, I was able to make the hazard concrete emit dark grey and yellow particles.
https://cdn.factorio.com/assets/img/blog/fff-343-mosaic.mp4
We kept in mind that people might want to tint all the new particles for mods, so we kept everything as tint-able as possible. So a modder can just use our particle definitions and tweak the tints, for instance, if they want to add purple terrain. It's worth mentioning that the same goes for almost all the new particles (metal/stone/vegetation/blood/glass etc). Using the same sprites with different tints also helps us save some VRAM, as the game applies the tint during the render phase.
[h3]Decoratives[/h3]
Posila also added the engine changes required to remove decoratives on impact, and for the decoratives themselves to create some particles on their destruction. This makes it feel much better when you see the explosion, because you see the decoratives reacting as if they were real, and it does not break the immersion in the game. It also helps to make the explosions feel a bit more powerful, at least powerful enough to blow over a bush.
https://cdn.factorio.com/assets/img/blog/fff-343-grenade-new.mp4
[i]The new grenade explosion, showing the new tile effect and decorative effects.[/i]
The reactions are also based on the individual decoratives. So each individual decorative will emit a different set of particles, bushes will emit grassy vegetation particles, stones will emit stone particles, etc. We also use the same tinting system here, so a brown bush and green bush will have the same particle sprites, just tinted accordingly.
There is of course the nice benefit of this to a lot of players, now that grenades can clear the decoratives, you can do some explosive cleaning of your precious prestine factory floors.
https://cdn.factorio.com/assets/img/blog/fff-343-clearing-decoratives.mp4
[i]A player clearing decoratives off their precious pathway[/i]
[h1]Minimal 'No base mod' (Klonan)[/h1]
Bilka has spent quite some time in the last month working on a new 'mod' for the game. Well its more of a mod that allows the removal of the 'Base' mod.
It has always been technically possible to run Factorio without the Base mod enabled, but anytime you would try you'd be hit by a bunch of missing prototype messages. Basically the game needs to have some minimum amount of prototypes defined to be able to launch properly.
So Bilka's work will act as a foundation for other mods to build on, to help modders make true 'total conversion' mods, or just have fun with the raw Factorio engine. Of course enabling this mod and starting the game isn't very fun on its own.
[img]https://clan.cloudflare.steamstatic.com/images//12002589/5e3a80f4c31201c92d6261f33146f02dd34e8695.jpg[/img]
[i]Factorio, but there is no content[/i]
For more details, please check out the detailed [url=https://forums.factorio.com/83567]forum post[/url] by Bilka, and you can find the project repository [url=https://github.com/Bilka2/minimal-no-base-mod]here[/url].