TUXDB - LINUX GAMING AGGREGATE
by NuSuey
NEWSFEED
▪️ GAMES
▪️ STEAM DECK ▪️ DEALS ▪️ CROWDFUNDING ▪️ COMMUNITY
tuxdb.com logo
Support tuxDB on Patreon
Currently supported by 9 awesome people!

🌟 Special thanks to our amazing supporters:


✨ $10 Tier: [Geeks Love Detail]
🌈 $5 Tier: [Arch Toasty][Benedikt][David Martínez Martí]

Steam ImageSteam ImageSteam ImageSteam ImageSteam ImageSteam Image
Friday Facts #322 - New Particle system

Read this post on our website

Release plans (Klonan)


This week we released version 0.17.79, and marked it stable. Internally we have been calling this 'Stable 3', and the main feature was the new tooltips we showed in FFF-318. There is one constraint we put on ourselves when we started this more swift feature release schedule: We want to avoid breaking mods. This is easy enough in principle, don't start renaming things, don't remove API features, etc. However as we develop further, there are certain features and improvements that we can't realistically do in a way that won't break mods, such as the new Character GUI (FFF-289) and color correction (FFF-320). It is for this reason that we are going to accumulate some of these mod breaking changes, and release them all at once. Since it will definitely be breaking mods, we will bump the major version number, so it will be 0.18.0. We have already internally started merging in these 0.18 features into our master branch, so we will not be doing any more 0.17 releases (unless something absolutely catastrophic is discovered).

The problem with particles (Klonan)


Particles have been in the game for as long as anyone can remember, and they are pretty simple all things considered. They are a small mostly decorative entity, that we use to add a bit of visual gratuity to the death and dying of bugs and machines. For instance, Biters are full of blood, so when they die, they make quite a splash. Lets try to count how many particles we spawn in a typical dying explosion. https://cdn.factorio.com/assets/img/blog/fff-322-biter-die.mp4 In this clip, the blood particle sprite has been replaced with a debug visualisation, to make counting easier So it's quite a few. The Biter spawned 427 particles, and the Spawner 749. Well they don't persist very long, and they're only decorative, so it's all fine right? One key word I would like to highlight in the previous description, is that they are an entity. When kovarex and slpwnd started making Factorio, they made a robust system for managing game objects and their interactions - the entity system - and everything that has a physical representation in the game world was built on top of this system. As the game grew bigger, it became obvious, the entity system is too heavy weight for some things, and we can get better performance by creating more specialized systems. This led to removing items on belts from the entity system in 0.12, and doing the same for smoke and terrain decoratives in later versions. Despite most other games or game engines having very efficient particle systems from the early stages of development, particles in Factorio are still piggybacking off the entity system in 0.17. This means that particles are registered on the game surface in the same generic way as everything else. This also means, that they are iterated through when doing entity searches. So what sort of engine actions do entity searches?
  • Area trigger effects - such as grenade, flamethrower stream damage, atomic bomb, poison capsule.
  • Pathfinding - To check if a path can traverse a given tile.
  • Movement collision checks - such as Characters, Units, Projectiles.
  • And many others...
As you can imagine, having thousands of extra entities to iterate through every tick, can start slowing down the simulation. The worst case these days is defending your walls with flamethrowers. In the image below, all entities are highlighted with a debug visualization.

If you lost count, this scene contains 15,689 entities Flamethrowers vs Biters are pretty much the perfect example of the problem:
  • The biters need to check every tick when they move if they collide with anything.
  • When the flamethrower streams land, they do splash damage, which is an area trigger effect.
  • The flamethrower stream also creates the fire on the ground, which does a collision check.
  • Every 10 ticks, the Fire on the ground do damage with an area trigger effect.
  • The flamethrowers kill biters very efficiently, so a lot of particles spawn in a very short amount of time.
This combination leads to some significant slowdowns later in the game when big groups come knocking. Also, since we improved the pathfinding, the problem is even worse in the latest versions of 0.17. So how do we solve it?

Particle Optimization - Technical (Rseding)


When Posila first talked to me about doing a re-work of how Particles function in the game I had a lot of ideas. Not all of them worked out in the end but they sounded nice:
  • They wouldn't be entities.
  • They would work like smoke does (stored in contiguous blocks of memory).
  • They wouldn't need to be updated each tick if they didn't effect the game state.
In the end I found that it wasn't worth the added complexity to make #3 work. The process Particles needed to not be entities. Something being an entity has a lot of memory and performance overhead that particles just didn't need. Unfortunately when I implemented artillery I made the manual-targeting marker a particle. The reasons why don't matter any more, but it meant I had to add migrations to handle that and then migrations to handle removing all of the entity particles. I stripped out all of the extra data/logic from particles that they no longer needed - reducing the size of each particle in memory from 224 bytes to 64 bytes. As a side effect of making them not entities it also reduces the amount of information that has to be saved in the save file. However, in most cases particles don't exist long enough to end up in the save file so that didn't really matter. I needed some place to store/work with the particles runtime as they are created, exist for some short amount of time, and go away. Most stuff in the game ends up being stored on a given chunk (a 32x32 area of the world). In the case of particles I didn't care at all about any of the other stuff on a given chunk so I didn't want to stick them there. Instead, I made a separate thing that functions very closely to chunks and called it "particle chunk". The key differences being: they only exist when there are particles to update on them and the only data they hold are particles. That meant when the game needs to go over each particle to update them, all it has to do is go over all of the "particle chunks" that exist and run update. Additionally since I had full control of these new particle chunks I can recycle them in memory as needed to avoid spending extra time allocating and de-allocating memory as particles come and go. The end result is a nice performance boost, reduced memory usage, and simplification of the logic around how particles work. A simple unscientific test we performed was nuking the same biter base in the old system and the new system, and recording what the max update tick time was.

The circular ring of entities around the edge are the 'Atomic bomb wave' projectiles. Old system:
  • Max Entity update = 7ms.
  • Entity count (Excluding projectiles) = 7769
New system:
  • Max Entity update = 2.4ms.
  • Max Particle update = 1.7ms
  • Entity count (Excluding projectiles) = 786
This is not very scientific or highly controlled, but just to give an idea of the scale of the improvement. A 10x reduction in the number of created entities, and about a 40% reduction in max update time. Having the new optimized particle system also means the GFX team can go a bit more crazy with particle effects in the future... As always, let us know what you think on our forum.


[ 2019-11-22 12:44:52 CET ] [ Original post ]

Factorio
Wube Software LTD. Developer
Wube Software LTD. Publisher
2020-08-14 Release
Game News Posts: 506
🎹🖱️Keyboard + Mouse
Overwhelmingly Positive (164072 reviews)
The Game includes VR Support
Public Linux Depots:
  • Factorio Linux64 [306.86 M]
  • Factorio Linux32 [300.1 M]
Available DLCs:
  • Factorio: Space Age
Factorio is a game in which you build and maintain factories. You will be mining resources, researching technologies, building infrastructure, automating production and fighting enemies. In the beginning you will find yourself chopping trees, mining ores and crafting mechanical arms and transport belts by hand, but in short time you can become an industrial powerhouse, with huge solar fields, oil refining and cracking, manufacture and deployment of construction and logistic robots, all for your resource needs. However this heavy exploitation of the planet's resources does not sit nicely with the locals, so you will have to be prepared to defend yourself and your machine empire.

Join forces with other players in cooperative Multiplayer, create huge factories, collaborate and delegate tasks between you and your friends. Add mods to increase your enjoyment, from small tweak and helper mods to complete game overhauls, Factorio's ground-up Modding support has allowed content creators from around the world to design interesting and innovative features. While the core gameplay is in the form of the freeplay scenario, there are a range of interesting challenges in the form of the Scenario pack, available as free DLC. If you don't find any maps or scenarios you enjoy, you can create your own with the in-game Map Editor, place down entities, enemies, and terrain in any way you like, and even add your own custom script to make for interesting gameplay.

Discount Disclaimer: We don't have any plans to take part in a sale or to reduce the price for the foreseeable future.

What people say about Factorio


  • No other game in the history of gaming handles the logistics side of management simulator so perfectly. - Reddit
  • I see conveyor belts when I close my eyes. I may have been binging Factorio lately. - Notch, Mojang
  • Factorio is a super duper awesome game where we use conveyor belts to shoot aliens. - Zisteau, Youtube

MINIMAL SETUP
  • OS: Linux (tarball installation)
  • Processor: Dual core 3Ghz+Memory: 4 GB RAM
  • Memory: 4 GB RAM
  • Graphics: OpenGL 3.3 core. DirectX 10.1 capable GPU with 512 MB VRAM - GeForce GTX 260. Radeon HD 4850 or Intel HD Graphics 5500
  • Storage: 3 GB available space
RECOMMENDED SETUP
  • OS: Linux (tarball installation)
  • Processor: Quad core 3GHz+Memory: 8 GB RAM
  • Memory: 8 GB RAM
  • Graphics: OpenGL 4.3 core. DirectX 11 capable GPU with 2 GB VRAM - GeForce GTX 750 Ti. Radeon R7 360
  • Storage: 3 GB available space
GAMEBILLET

[ 6102 ]

5.91$ (15%)
16.97$ (15%)
41.96$ (16%)
21.21$ (15%)
21.99$ (12%)
16.96$ (15%)
4.22$ (15%)
8.47$ (15%)
17.39$ (13%)
18.47$ (16%)
12.71$ (15%)
20.49$ (18%)
7.11$ (11%)
15.26$ (15%)
12.71$ (15%)
42.99$ (14%)
10.78$ (17%)
25.49$ (15%)
8.46$ (15%)
4.44$ (78%)
17.79$ (11%)
17.59$ (12%)
21.21$ (15%)
8.89$ (11%)
16.52$ (17%)
33.99$ (15%)
29.39$ (16%)
16.96$ (15%)
29.74$ (15%)
4.95$ (17%)
GAMERSGATE

[ 764 ]

8.49$ (58%)
1.32$ (91%)
9.0$ (70%)
7.73$ (40%)
0.58$ (92%)
0.68$ (86%)
1.7$ (79%)
2.13$ (91%)
3.86$ (45%)
0.85$ (91%)
1.06$ (79%)
8.49$ (58%)
0.8$ (60%)
1.08$ (91%)
12.14$ (19%)
6.62$ (49%)
20.24$ (33%)
5.94$ (41%)
1.28$ (91%)
0.53$ (92%)
0.77$ (91%)
3.19$ (79%)
6.8$ (66%)
1.35$ (89%)
1.53$ (87%)
1.02$ (91%)
1.91$ (87%)
2.21$ (83%)
1.25$ (75%)
1.02$ (83%)

FANATICAL BUNDLES

Time left:

12 days, 11 hours, 16 minutes


Time left:

19 days, 11 hours, 16 minutes


Time left:

8 days, 11 hours, 16 minutes


Time left:

5 days, 11 hours, 16 minutes


Time left:

13 days, 11 hours, 16 minutes


Time left:

15 days, 11 hours, 16 minutes


Time left:

36 days, 11 hours, 16 minutes


Time left:

356461 days, 3 hours, 16 minutes


Time left:

18 days, 11 hours, 16 minutes


Time left:

47 days, 11 hours, 16 minutes


Time left:

33 days, 11 hours, 16 minutes


HUMBLE BUNDLES

Time left:

0 days, 5 hours, 16 minutes


Time left:

2 days, 5 hours, 16 minutes


Time left:

7 days, 5 hours, 16 minutes


Time left:

9 days, 5 hours, 16 minutes


Time left:

14 days, 5 hours, 16 minutes

by buying games/dlcs from affiliate links you are supporting tuxDB
🔴 LIVE