Page 2 of 4

Re: Friday Facts #390 - Noise expressions 2.0

Posted: Fri Dec 22, 2023 1:48 pm
by varundevan
Great post ,
I don't intend to create a Factorio game myself , so polite pass.

Re: Friday Facts #390 - Noise expressions 2.0

Posted: Fri Dec 22, 2023 1:56 pm
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 ;)

Re: Friday Facts #390 - Noise expressions 2.0

Posted: Fri Dec 22, 2023 2:01 pm
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 3034 times
The lengths and direction of all underground belts or pipes are OK.


Re: Friday Facts #390 - Noise expressions 2.0

Posted: Fri Dec 22, 2023 2:33 pm
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 :?

Re: Friday Facts #390 - Noise expressions 2.0

Posted: Fri Dec 22, 2023 2:59 pm
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

Re: Friday Facts #390 - Noise expressions 2.0

Posted: Fri Dec 22, 2023 3:32 pm
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 !

Re: Friday Facts #390 - Noise expressions 2.0

Posted: Fri Dec 22, 2023 3:35 pm
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

Re: Friday Facts #390 - Noise expressions 2.0

Posted: Fri Dec 22, 2023 3:37 pm
by malecord
Christmas planet confirmed then.

Will flamethrower work to repeal attacks from reindeers or are we limited to laser turrets?

Re: Friday Facts #390 - Noise expressions 2.0

Posted: Fri Dec 22, 2023 4:12 pm
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!

Re: Friday Facts #390 - Noise expressions 2.0

Posted: Fri Dec 22, 2023 4:54 pm
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:

Re: Friday Facts #390 - Noise expressions 2.0

Posted: Fri Dec 22, 2023 5:50 pm
by Rebmes
happy holidays Wube

Re: Friday Facts #390 - Noise expressions 2.0

Posted: Fri Dec 22, 2023 6:15 pm
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.

Re: Friday Facts #390 - Noise expressions 2.0

Posted: Fri Dec 22, 2023 6:47 pm
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.

Re: Friday Facts #390 - Noise expressions 2.0

Posted: Fri Dec 22, 2023 7:33 pm
by Chrisdasdasd
Very nice. Makes me curious about other optimizations for 2.0
Merry Christmas

Re: Friday Facts #390 - Noise expressions 2.0

Posted: Fri Dec 22, 2023 7:59 pm
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!

Re: Friday Facts #390 - Noise expressions 2.0

Posted: Fri Dec 22, 2023 8:40 pm
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. :)

Re: Friday Facts #390 - Noise expressions 2.0

Posted: Fri Dec 22, 2023 9:13 pm
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;

Re: Friday Facts #390 - Noise expressions 2.0

Posted: Fri Dec 22, 2023 9:58 pm
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!

Re: Friday Facts #390 - Noise expressions 2.0

Posted: Fri Dec 22, 2023 11:19 pm
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".

Re: Friday Facts #390 - Noise expressions 2.0

Posted: Fri Dec 22, 2023 11:56 pm
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?