Friday Facts #390 - Noise expressions 2.0

Regular reports on Factorio development.
varundevan
Fast Inserter
Fast Inserter
Posts: 182
Joined: Mon Jan 20, 2020 4:41 am
Contact:

Re: Friday Facts #390 - Noise expressions 2.0

Post by varundevan »

Great post ,
I don't intend to create a Factorio game myself , so polite pass.
User avatar
Turbofant
Inserter
Inserter
Posts: 24
Joined: Fri Apr 07, 2017 6:20 am
Contact:

Re: Friday Facts #390 - Noise expressions 2.0

Post by Turbofant »

Image

That looks incredible! :o

Creating a snow covered version for that many entities is quite a lot of work for a Christmas card.

So I guess this screenshot wasn't taken on Nauvis ;)
User avatar
Hares
Filter Inserter
Filter Inserter
Posts: 360
Joined: Sat Oct 22, 2022 8:05 pm
Contact:

Re: Friday Facts #390 - Noise expressions 2.0

Post by Hares »

Mooncat wrote: ↑Fri Dec 22, 2023 1:41 pm This FFF is unreadable : (
I don't get it. What exactly you don't like?
screenshot-tick-73528871.png
screenshot-tick-73528871.png (3.65 MiB) Viewed 5302 times
The lengths and direction of all underground belts or pipes are OK.

User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1196
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: Friday Facts #390 - Noise expressions 2.0

Post by Mooncat »

Hares wrote: ↑Fri Dec 22, 2023 2:01 pm
Mooncat wrote: ↑Fri Dec 22, 2023 1:41 pm This FFF is unreadable : (
I don't get it. What exactly you don't like?
screenshot-tick-73528871.png
The lengths and direction of all underground belts or pipes are OK.


Oh so that's the cover's shadow
Dammit, haven't played Factorio for too long :?
User avatar
koliw_br
Burner Inserter
Burner Inserter
Posts: 13
Joined: Fri Nov 11, 2022 9:38 pm
Contact:

Re: Friday Facts #390 - Noise expressions 2.0

Post by koliw_br »

Verry technical this time but I love it! There is no such thing as a blog post that is too long.I like to understand the internal thinking of programmers, which then allows me to better understand the direction in which the game is going.

Are you planning to do a podcast about the game someday? In Czech or English? It can be cool :D

Merry Christmas! evry1
mmmPI
Smart Inserter
Smart Inserter
Posts: 3643
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: Friday Facts #390 - Noise expressions 2.0

Post by mmmPI »

The snow !!! waow !!! Must have taken quite some time to decorate or the shots were taken on a cold and wet planet !

Imagine an endless planet with the crop circle geometry and the height map colors, would you even want to build on it ? That's what i started wondering around half way throught the shunting yard algorithm page, when i was trying to remember why it was necessary in the game, thank you for the pictures, it is worth a thousand words, but also better understanding would require a thousand pictures :lol:

I'm not sure i got that correct but it seem to be , allowing custom functions written in lua to modders to the map generation written in C++ , and in the process it ends up making the game faster to launch ? That was necessary for the new planets ? you guys are aware some games are sold not even finished and never fixed ? Is that how you communicate on the quality of your game ? Just it being fun isn't enough ? Hum Are those real questions ?

Please give some more of those FFF !
Genhis
Factorio Staff
Factorio Staff
Posts: 629
Joined: Wed Dec 24, 2014 8:19 am
Contact:

Re: Friday Facts #390 - Noise expressions 2.0

Post by Genhis »

Tooster wrote: ↑Fri Dec 22, 2023 12:58 pm As for noise expression - I am not quite sure I understand the need for the "noise expression engine" altogether, the post is a bit hard to understand and it's not very clear what it can do that simply writing functions itself wouldn't. For example description of implementing things like "constant folding" raise some red flags for me β€” this sounds too familiar to what compilers already do to optimize, so why does it have to be reinvented :?:
Yeah, noise expressions isn't an easy topic, sorry! They were released in 0.16 (6 years ago), so this post just explains how we improved the existing system. Lua functions are slow and can't take advantage of SIMD execution (we are processing 1024 tiles at once per thread). That is, "x + y * 4" will first evaluate "y * 4" for 1024 tiles which the C++ compiler can optimize to vector instructions and process 4 multiplications per instruction. (We rely on SSE2 if anyone is wondering.)

So we came up with a system which allows defining noise expressions through Lua and compiles them to a fast noise program. I wasn't around when it was implemented so I can't tell you why it was done this way, but now that we are familiar with the system, we wanted to continue using it and not invent a different way of defining map generation. Noise expressions are closer to math than to Lua, and the string parser was meant to speed up loading and improve clarity. In 1.1 the slow and verbose format is hidden away behind the noise library and metatables.

This is why constant folding was "reimplemented" and expanded for 2.0 - because it's a different system.

If anyone wants to have a sneak peek at the new format, I shared this on Discord: https://gist.github.com/Genhis/b4c88f47 ... c177e13d4a
malecord
Fast Inserter
Fast Inserter
Posts: 169
Joined: Wed Mar 23, 2016 11:23 am
Contact:

Re: Friday Facts #390 - Noise expressions 2.0

Post by malecord »

Christmas planet confirmed then.

Will flamethrower work to repeal attacks from reindeers or are we limited to laser turrets?
Cerberus
Long Handed Inserter
Long Handed Inserter
Posts: 62
Joined: Sat Sep 17, 2022 8:12 am
Contact:

Re: Friday Facts #390 - Noise expressions 2.0

Post by Cerberus »

malecord wrote: ↑Fri Dec 22, 2023 3:37 pm Christmas planet confirmed then.

Will flamethrower work to repeal attacks from reindeers or are we limited to laser turrets?
I think you will have snowball builders. Because elevation gets lower the farther away from the starting point of (0, 0) in map generation where your base likely is, it means the snowball will get larger and larger as it rolls down and crushes all enemies charging at your base!
FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2768
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: Friday Facts #390 - Noise expressions 2.0

Post by FuryoftheStars »

This is very lovely and great! Glad to hear that you all are still finding ways to improve the efficiency of the game.

----------------------------------------------------------
Metin200 wrote: ↑Fri Dec 22, 2023 12:30 pm I know Factorio isn't about exploration, but those "crop circle pattern" could be an interesting random find.
Agreed! The occasional easter egg would be grand. :)

----------------------------------------------------------
aka13 wrote: ↑Fri Dec 22, 2023 1:10 pm
Hares wrote: ↑Fri Dec 22, 2023 1:09 pm
Shadow_Man wrote: ↑Fri Dec 22, 2023 12:45 pm Hou-hou-hou!
We really need that snowy sprites and Christmas Tree in-game!
I assume that these snowy sprites are a sneak preview of the next planet and its particle effect covering all sprites with snow.
That is also what I think, really curious if that is the case. Weather effects and weather in general would be really cool.
Yeah, same thoughts here as well. And yeah, I'd love to be able to see some weather affects coming into the game. Rain storms, snow storms, wind storms (dust effects in desert like areas?), etc. Changing seasons...? :)

But that shot with the Christmas tree makes me want to request something else: holiday themed sprites. Either as separate mods, or as things built into the game that automatically enable on and for the duration of the holiday, then turn back off after. And some random joke stuff on April 1st. :mrgreen:
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles | New Gear Girl & HR Graphics
Rebmes
Long Handed Inserter
Long Handed Inserter
Posts: 98
Joined: Sat Sep 15, 2018 7:51 pm
Contact:

Re: Friday Facts #390 - Noise expressions 2.0

Post by Rebmes »

happy holidays Wube
User avatar
Hares
Filter Inserter
Filter Inserter
Posts: 360
Joined: Sat Oct 22, 2022 8:05 pm
Contact:

Re: Friday Facts #390 - Noise expressions 2.0

Post by Hares »

FuryoftheStars wrote: ↑Fri Dec 22, 2023 4:54 pm But that shot with the Christmas tree makes me want to request something else: holiday themed sprites. Either as separate mods, or as things built into the game that automatically enable on and for the duration of the holiday, then turn back off after. And some random joke stuff on April 1st. :mrgreen:
There're actually two mods which change science packs and artillery shells into Christmas gifts.
User avatar
TatsuZZMage
Inserter
Inserter
Posts: 38
Joined: Thu Dec 29, 2016 1:26 am
Contact:

Re: Friday Facts #390 - Noise expressions 2.0

Post by TatsuZZMage »

Well that was pretty technical ^_^ i understood less then half but i have messed around with the variables in several of the map gen lua in core so i understood it a little better hahah. very fun. Factorio is one game were causeing it to crash outside of boot up from bad variables is damn near impossible. tho going gomez on some trains did do it. two one thousand kmh plus fifty engine trains head on into each other did it once years ago now.
Chrisdasdasd
Burner Inserter
Burner Inserter
Posts: 13
Joined: Mon Sep 11, 2023 2:17 pm
Contact:

Re: Friday Facts #390 - Noise expressions 2.0

Post by Chrisdasdasd »

Very nice. Makes me curious about other optimizations for 2.0
Merry Christmas
User avatar
morsk
Fast Inserter
Fast Inserter
Posts: 145
Joined: Fri Dec 15, 2017 1:00 am
Contact:

Re: Friday Facts #390 - Noise expressions 2.0

Post by morsk »

I normally hate noise-based generation, and wish Factorio was tile-based like roguelikes, and this convinced me noise-based at least makes pleasing terrain if artists try hard enough.

It will last until I see another map where 2 copper patches in a row are eaten by water, and one of them left a tiny fragment on an island taunting me with how unsatisfying it is. :/ I think I like it for everything but ore & cliffs. A forest (etc.) can't really be unsatisfying; it just looks one way instead of another way, and noise seems to work well for "natural" things. But ores & cliffs can easily be unsatisfying. Though I don't expect the game to ever change this. I will try to focus more on the positive!
FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2768
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: Friday Facts #390 - Noise expressions 2.0

Post by FuryoftheStars »

Hares wrote: ↑Fri Dec 22, 2023 6:15 pm
FuryoftheStars wrote: ↑Fri Dec 22, 2023 4:54 pm But that shot with the Christmas tree makes me want to request something else: holiday themed sprites. Either as separate mods, or as things built into the game that automatically enable on and for the duration of the holiday, then turn back off after. And some random joke stuff on April 1st. :mrgreen:
There're actually two mods which change science packs and artillery shells into Christmas gifts.
Yeah, I'm aware of those, but it'd be nice to have a lot of the entities and machines decorated with their holiday appropriate decorations and lights, too. :)
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles | New Gear Girl & HR Graphics
Upserter
Inserter
Inserter
Posts: 35
Joined: Fri Oct 06, 2023 8:33 pm
Contact:

Re: Friday Facts #390 - Noise expressions 2.0

Post by Upserter »

β€˜Twas the night before Christmas, and all through Nauvis
Not a biter was stirring, nor even a fish;
The steam plants were placed by the boilers with care,
In hopes that the Engineer soon would be there;
The spitters were nestled all snug in their nests;
While visions of smelter stacks danced in their heads;
…
adam_bise
Filter Inserter
Filter Inserter
Posts: 448
Joined: Fri Jun 08, 2018 10:42 pm
Contact:

Re: Friday Facts #390 - Noise expressions 2.0

Post by adam_bise »

Merry Cogmas!

85% is huge! I've enjoyed playing with the map generator. I only wish you could manually enter the map gen numbers in the GUI instead of the % sliders. I've wound up having to use the command line and map-gen-settings.josn to get desired results.

Thanks for the detailed information!
malecord
Fast Inserter
Fast Inserter
Posts: 169
Joined: Wed Mar 23, 2016 11:23 am
Contact:

Re: Friday Facts #390 - Noise expressions 2.0

Post by malecord »

Was thinking, among the planet types you evaluated, have you ever considered a tidal locked one? Like a planet where you have to connect the sunny desert side with the night frozen one through the lush monster filled stripe in between? It could become a the "train planet".
User avatar
planetfall
Burner Inserter
Burner Inserter
Posts: 15
Joined: Fri May 04, 2018 7:49 pm
Contact:

Re: Friday Facts #390 - Noise expressions 2.0

Post by planetfall »

the way i see it, there are three possibilities for generating things that can appear on multiple planets:

- things that autoplace can have multiple sets of placement rules, varying per surface
- things that can be autoplaced on multiple surfaces have an obscenely complicated autoplace system that takes into account every planet's environment, it's just that all the "what vulcanus biome is this" values are 0 when looking at nauvis and so on.
- nauvis coal deposits and vulcanus coal deposits are secretly different entities that look and behave identically once spawned but have different autoplace rules

any hint as to which it is, or is this a secret?
gradus delenda est
Post Reply

Return to β€œNews”