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 #323 - Animated water

Read this post on our website

Water animation - Concept (Albert)


Since the very beginning of the project, we have focused a lot in the side of the factory, providing better designs for the machines, and expressive animations that give a sense of life and credibility in this area. We put a lot of effort also in the environmental side, adding different tile sizes, improving textures, adding doodads, cliffs, trees, decals, and constantly improving the map generation for a better feeling. But apart from biters and the factory, nothing else moves in this Factorio planet. So the environment is nice looking but it feels somehow unreal due this lack of motion. Today we proudly present the first experiment in this area: Animated water. This animation doesn't try to grab your attention, it's just there. Slowly moving. I personally bet that this animation, with the proper sound design, will provide the natural feeling that the planet needs. https://cdn.factorio.com/assets/img/blog/fff-323-animated-water.mp4

Water animation - Technical Art (Ernestas)


Animation was always one of the most powerful creative tools we have. Animation is how we communicate with our audience about functionality, it creates interest and emotions people like. So let us talk about water and how the current representation might be missing something. Some of you with an eye for detail might have noticed that water in Factorio is static. It has foam, which is static. There are also some static reflections. Due to the fact that making animated water was considered polishing, we never took the time to make an actual solution. But now we are polishing Factorio, trying to make it as beautiful as we possibly can given our constraints. I am glad to talk to you a bit about us solving animated water! Christmas of 2018, I decided to gift myself with solving water animation in secret. Based on past conversations with Albert the goal for it was clear:
  • It had to look similar to the current water.
  • Photorealism was a no no.
  • It had to be super cheap for the GPU.
In the past I was experimenting with this cheap clouds shader. It used fractal Brownian Motion and only sampled a noise texture, instead of the usual approach of calculating Perlin noise. With a low iteration count, it was almost as cheap as drawing a sprite. So I started MonoGame (lovely framework) and implemented a tile-based world using the same technique for the shader, the only difference being I clamped noise values to simulate brighter and darker areas. For the noise I used our water sprite.
Original - Noise - Clamped To save GPU power, water was drawn the same as tiles, one after another. The position was easy to solve also, I simply used UV coordinates to represent the game world position. With some trial and error, water was recreated with a moving effect. https://cdn.factorio.com/assets/img/blog/fff-323-pitch.mp4 At the beginning of 2019, I pitched the prototype to the team. Sadly it was not really accepted mostly because of the movement. However, I sat down with Albert and talked and tweaked values to more appealing ones. After that, we basically forgot about it. Half a year passed and that solution was back on the table, I only had to solve reflections, foam, transparency, out of map transitions, and some other stuff. Solving reflections, transparency and foam resulted in using a render target to save information for water shader. A render target is just a texture on which you can draw. Using three channels RGB, I am able to save three kinds of information. Red for reflections, green for transparency, and blue for foam. All drawing is additive to account for multiple tiles drawing on top of each other. This way we are able to add information not only for shore, but also for entities. https://cdn.factorio.com/assets/img/blog/fff-323-layers.mp4 For out of map we updated our jelly feeling with waves on top. Basically we left the old graphics on the bottom and added animated water on top. For cutting/masking out water where we want, I used another shader that generated green waves in the water render target. Now some of you might ask why we did not use a waterfall. I mean it would look nice having a waterfall to this pitch-black hole of nothing. The reason is waterfall was the first thing we tried, and concluded that the jelly looks better and cleaner. https://cdn.factorio.com/assets/img/blog/fff-323-out-of-map.mp4

Water animation - Game integration (posila)


For a long time, in order to make terrain rendering fast, we would keep an offscreen buffer with terrain that was rendered in the previous frame, and reuse it to render terrain in the current frame. If the players view didnt change at all, we would use the offscreen buffer as is, if the player moved, we would shift the buffer accordingly, and render just the bits that were not visible before. Zooming or changing tiles in the view would invalidate the content of the offscreen buffer, and the terrain would have to be re-rendered for the entire view. But that happens only in a fraction of frames, so its not a big problem. You may have noticed this optimization is incompatible with rendering animated tiles, so for the initial integration of Ernestas water effect, I had to force a full redraw every frame. This created a performance issue, as the tile render prepare step would take up 3ms (almost 1/5 of total frame time) when zoomed out. Why does that matter? The games main loop runs in 3 major stages:
  • Update - progresses the game state one tick forward.
  • Prepare render - collects the data that is needed to render the current view.
  • Render - uses this collected data to issue commands to the GPU.
While game update and render are executed in parallel, neither of them can run while prepare render does (more on this in FFF-70). So 3ms of additional prepare time means 3ms less can be spent in update before the update rate drops below 60 (and I dont even want to mention how much time it would take in debug build, Ill just say that Id expect a lot of nasty looks from coworkers). Luckily, I already had an idea how to solve this. The water animation depends only on global time, and the vertex data of water tiles doesn't change in between the frames, so instead of caching the finished terrain render in a texture, we can cache the data resulting from prepare render, which we call draw orders. To make it work, we cache draw orders per-chunk, and we only run prepare render on chunks that have just entered the player view (and werent in the cache already). That pretty much solves the problem of the render prepare and has some nice side benefits. First of all, changing render scale doesnt need to invalidate the new cache, so zooming doesnt cause prepare render to run for all tiles in the entire view. Secondly, it creates opportunities for other future optimizations - for example, we can start caching tile draw orders that are likely to enter into the view in advance and spread this work over multiple ticks, or we can generate tile draw orders for each chunk in parallel as they are independent of each other now. Even though the water effect is relatively cheap, some of our players play the game on really weak hardware, which already struggles with the current state of the game, so we needed to add an option to turn the effect off and essentially revert back to the old behavior. Initially I thought we would even use the old water sprites, but because we had to change the tile transition definitions, the old water would look really bad. I have decided to always render water using the new effect, but if you disable the animation, it will render frozen in time and will be cached to the offscreen buffer. Since we were keeping the offscreen buffer logic around, we could utilize it for everyone if possible. I added a flag to cached per-chunk tile draw orders, that determines if the chunk contains a dynamic effect (and therefore needs to be rerendered each frame - if the animation is enabled) or if it can reuse pixels from the previous frame. This means when rendering chunks without any water (E.G, the middle of your factory), the new water effect will have no impact on performance. Modding When seeing this you might get excited about the possibilities for modding. Well, dont just yet. The system has been setup for making it possible to define different tile effects, but at the moment it is limited to allow just 1, which is used to define the water effect. I plan to lift this restriction in the near future, but in the end youll be limited to only changing the properties of the effect we made. But that still might be interesting enough, due to ability to change the noise texture. There is still no plan to support custom shader definitions before 1.0. As always, let us know what you think on our forum.


[ 2019-11-29 14:53:19 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 ]

16.97$ (15%)
16.52$ (17%)
15.29$ (15%)
2.22$ (78%)
22.24$ (11%)
24.39$ (19%)
25.49$ (-2%)
15.11$ (16%)
21.24$ (15%)
13.34$ (11%)
12.42$ (17%)
29.71$ (15%)
42.47$ (15%)
12.59$ (16%)
16.79$ (16%)
16.99$ (15%)
27.59$ (8%)
13.27$ (17%)
4.21$ (16%)
33.59$ (16%)
17.79$ (11%)
9.93$ (17%)
25.19$ (16%)
17.79$ (11%)
14.44$ (15%)
41.47$ (17%)
20.65$ (17%)
48.98$ (18%)
4.21$ (16%)
8.39$ (16%)
GAMERSGATE

[ 764 ]

3.48$ (83%)
16.57$ (45%)
11.99$ (20%)
1.02$ (91%)
0.5$ (49%)
4.25$ (57%)
0.5$ (49%)
0.43$ (91%)
7.65$ (62%)
1.91$ (87%)
1.32$ (91%)
4.75$ (41%)
2.13$ (79%)
6.96$ (83%)
2.55$ (83%)
9.99$ (60%)
0.53$ (92%)
3.0$ (85%)
0.6$ (92%)
9.0$ (70%)
1.53$ (83%)
0.81$ (91%)
0.53$ (92%)
3.4$ (83%)
0.85$ (91%)
1.35$ (89%)
0.43$ (78%)
0.43$ (91%)
1.08$ (91%)
1.28$ (91%)

FANATICAL BUNDLES

Time left:

12 days, 10 hours, 52 minutes


Time left:

19 days, 10 hours, 52 minutes


Time left:

8 days, 10 hours, 52 minutes


Time left:

5 days, 10 hours, 52 minutes


Time left:

13 days, 10 hours, 52 minutes


Time left:

15 days, 10 hours, 52 minutes


Time left:

36 days, 10 hours, 52 minutes


Time left:

356461 days, 2 hours, 52 minutes


Time left:

18 days, 10 hours, 52 minutes


Time left:

47 days, 10 hours, 52 minutes


Time left:

33 days, 10 hours, 52 minutes


HUMBLE BUNDLES

Time left:

0 days, 4 hours, 52 minutes


Time left:

2 days, 4 hours, 52 minutes


Time left:

7 days, 4 hours, 52 minutes


Time left:

9 days, 4 hours, 52 minutes


Time left:

14 days, 4 hours, 52 minutes

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