Friday Facts #207 - Lua noise specification

Regular reports on Factorio development.

Friday Facts #207 - Lua noise specification

Postby Klonan » Fri Sep 08, 2017 5:58 pm

User avatar
Klonan
Factorio Staff
Factorio Staff
 
Posts: 2788
Joined: Sun Jan 11, 2015 2:09 pm

Re: Friday Facts #207 - Lua noise specification

Postby orzelek » Fri Sep 08, 2017 6:07 pm

Wow nice terrain :)

And noise functions in lua - seems like something new to play with on 0.16 release.
Will those also work for ores/biters?
orzelek
Smart Inserter
Smart Inserter
 
Posts: 2815
Joined: Fri Apr 03, 2015 10:20 am

Re: Friday Facts #207 - Lua noise specification

Postby diongham » Fri Sep 08, 2017 6:10 pm

Islands are the best starting zones. People actively look for exchange strings with island starting locations.

I don't like this potential change at all.

I do like the terrain features tough. They look like they could be potentially varied especially if they're moddable and people can add more.
User avatar
diongham
Fast Inserter
Fast Inserter
 
Posts: 146
Joined: Mon Feb 09, 2015 7:23 am

Re: Friday Facts #207 - Lua noise specification

Postby IronCartographer » Fri Sep 08, 2017 6:16 pm

diongham wrote:Islands are the best starting zones. People actively look for exchange strings with island starting locations.


The 0.13-era mapgen and its tendency to create island starts with perfect resource availability is good, but hasn't quite eliminated the impossible island starts with a handful of tiles under the player in what's supposed to be your guaranteed source of boiler water.

Eliminating the issue would only require a very small filter effect...or a recipe for a cheap boat which you can make with your initial scrap metal. ;)

Edit: The "It stinks and they don't like it" achievement would also benefit from requiring that biters are able to find a path. I've seen it trigger when they were actually unable to reach the pollution source, even though it wasn't an island (extremely large peninsula).
Last edited by IronCartographer on Fri Sep 08, 2017 6:19 pm, edited 1 time in total.
IronCartographer
Fast Inserter
Fast Inserter
 
Posts: 211
Joined: Tue Jun 28, 2016 2:07 pm

Re: Friday Facts #207 - Lua noise specification

Postby TOGoS » Fri Sep 08, 2017 6:18 pm

diongham wrote:Islands are the best starting zones. People actively look for exchange strings with island starting locations.

I don't like this potential change at all.

I do like the terrain features tough. They look like they could be potentially varied especially if they're moddable and people can add more.


You'll still be able to get islands by setting water level to [very] high or using an alternate elevation function (either an alternate built-in one for just this purpose, or one provided by a mod)

orzelek wrote:Will those also work for ores/biters?


Noise for elevation/humidity/temperature is handled a little bit differently than one-off noise layers for entity placement, e.g. for biters. In theory it shouldn't be too difficult to unify the two system (which would also have the advantage that we could delete a bit of code), but right now the focus is on making a good default terrain, so that probably won't happen for 0.16. Mods can still alter placement using the (somewhat obscure) peak system though.
TOGoS
Factorio Staff
Factorio Staff
 
Posts: 10
Joined: Fri Jun 24, 2016 2:29 pm

Re: Friday Facts #207 - Lua noise specification

Postby orzelek » Fri Sep 08, 2017 6:22 pm

TOGoS wrote:...
orzelek wrote:Will those also work for ores/biters?


Noise for elevation/humidity/temperature is handled a little bit differently than one-off noise layers for entity placement, e.g. for biters. In theory it shouldn't be too difficult to unify the two system (which would also have the advantage that we could delete a bit of code), but right now the focus is on making a good default terrain, so that probably won't happen for 0.16. Mods can still alter placement using the (somewhat obscure) peak system though.

I was interested due to RSO mod - with custom noise layers it could switch to those for ore generation.
orzelek
Smart Inserter
Smart Inserter
 
Posts: 2815
Joined: Fri Apr 03, 2015 10:20 am

Re: Friday Facts #207 - Lua noise specification

Postby TOGoS » Fri Sep 08, 2017 6:36 pm

orzelek wrote:I was interested due to RSO mod - with custom noise layers it could switch to those for ore generation.


I haven't inspected the source, but I'm guessing RSO works by placing entities explicitly from an on-chunk-load callback. That will always be the method that gives mods the most flexibility, but for things like elevation that need to be calculated for every single tile, it might not be too great performance-wise.
TOGoS
Factorio Staff
Factorio Staff
 
Posts: 10
Joined: Fri Jun 24, 2016 2:29 pm

Re: Friday Facts #207 - Lua noise specification

Postby Zavian » Fri Sep 08, 2017 6:47 pm

I look at the 'web' in the second picture and think yuk. That looks so artificial. Personally I don't think that the you need the starting area to be connected to the rest of the map provided it typically contains some biter bases and enough stone for your initial base + walls + landfill.

Have you considered making the starting area some sort of peak or hill that encompasses the entire starting area and its resources , plus has a few nearby biter bases, and then adding a few small lakes for power generation/refineries 2-3 chunks from the spawn point ?

If a single hill looks to regular, then add an additional 4-12 hills each with random heights and slopes, each offset randomly around 4-8 chunks from the spawn point.
Zavian
Fast Inserter
Fast Inserter
 
Posts: 238
Joined: Thu Mar 02, 2017 2:57 am

Re: Friday Facts #207 - Lua noise specification

Postby Omarflyjoemacky » Fri Sep 08, 2017 6:49 pm

Looking at this generated map - does this mean we will end up with elevated terrain? Very exciting if so. Hill, mountains, valleys!! :)
"And then Bender ran."
Omarflyjoemacky
Inserter
Inserter
 
Posts: 44
Joined: Tue Nov 15, 2016 10:56 pm

Re: Friday Facts #207 - Lua noise specification

Postby Proxy » Fri Sep 08, 2017 7:01 pm

man, can't wait to see the new Terrain in action.

Giant Lakes and Oceans would not be a problem if we had Cargo Ships *wink* *wink*
I'm a Very Huge fan of Automation in Minecraft (modded), and this game is Mostly about Automating everything! :D
p.s.: The Best Spawn
User avatar
Proxy
Fast Inserter
Fast Inserter
 
Posts: 134
Joined: Mon Mar 30, 2015 11:10 am
Location: Germany

Re: Friday Facts #207 - Lua noise specification

Postby Omarflyjoemacky » Fri Sep 08, 2017 7:09 pm

Proxy wrote:man, can't wait to see the new Terrain in action.

Giant Lakes and Oceans would not be a problem if we had Cargo Ships *wink* *wink*


Please yes!! And Cargo Planes! Can you see it? Cargo ports and air terminals loading onto trains?!
"And then Bender ran."
Omarflyjoemacky
Inserter
Inserter
 
Posts: 44
Joined: Tue Nov 15, 2016 10:56 pm

Re: Friday Facts #207 - Lua noise specification

Postby IronCartographer » Fri Sep 08, 2017 7:12 pm

TOGoS wrote:
orzelek wrote:I was interested due to RSO mod - with custom noise layers it could switch to those for ore generation.


I haven't inspected the source, but I'm guessing RSO works by placing entities explicitly from an on-chunk-load callback. That will always be the method that gives mods the most flexibility, but for things like elevation that need to be calculated for every single tile, it might not be too great performance-wise.


That's true, but people still use it because the vanilla resource generation doesn't raise the threshold for resources appearing when the frequency is decreased. This leads to annoying small patches scattered between the desired, larger ones--especially when size is increased at the same time.

If you're ever working on the resource distribution in vanilla, and you can find a way for the "frequency" setting to also re-scale the waveforms with some nonlinearity in addition to simply decreasing the raw frequency (creating truly isolated, large resource nodes)...That would replace RSO at long last. ;)

If the frequency could somehow get lower and lower as distance from spawn increases, that might be interesting too.
IronCartographer
Fast Inserter
Fast Inserter
 
Posts: 211
Joined: Tue Jun 28, 2016 2:07 pm

Re: Friday Facts #207 - Lua noise specification

Postby miturion » Fri Sep 08, 2017 7:28 pm

Omarflyjoemacky wrote:Looking at this generated map - does this mean we will end up with elevated terrain? Very exciting if so. Hill, mountains, valleys!! :)


I think you should read it again. It is not to have elevated terrain in the game, just to show how terrain is generated.
miturion
Long Handed Inserter
Long Handed Inserter
 
Posts: 64
Joined: Mon Aug 03, 2015 5:46 pm

Re: Friday Facts #207 - Lua noise specification

Postby Omarflyjoemacky » Fri Sep 08, 2017 7:34 pm

miturion wrote:
Omarflyjoemacky wrote:Looking at this generated map - does this mean we will end up with elevated terrain? Very exciting if so. Hill, mountains, valleys!! :)


I think you should read it again. It is not to have elevated terrain in the game, just to show how terrain is generated.


I see it now. "added height shading". Sigh. Balloon deflated. That's what happens when you scroll down quickly to the bottom to see the next high res upgrade and immediately see that map instead.

Factorio 2 I suppose. :roll:
"And then Bender ran."
Omarflyjoemacky
Inserter
Inserter
 
Posts: 44
Joined: Tue Nov 15, 2016 10:56 pm

Re: Friday Facts #207 - Lua noise specification

Postby bluerock » Fri Sep 08, 2017 7:41 pm

Regarding solving the issue with starting on an island... I agree that starting on starting on an island can be fun, but that we just want to avoid starting on an island that is TOO small without sufficient resources. It seems to me that a relatively easy way to resolve would be to use something like a 4-way flood fill algorithm starting at the player start location and use it to count land tiles surrounding the player above sea level. Maybe allow the player to set the value. For example a value of 40,000 would mean that the algorithm would check to be sure that the player isn't starting on an island smaller than about 200 x 200 in size (if the island happened to be squarish). I don't really like the thought of adding in a webbing or some other structure on top to deal with islands as I am not sure it can be done without looking like a 'patch' that doesn't really fit with the rest of the terrain generation.
bluerock
Manual Inserter
Manual Inserter
 
Posts: 1
Joined: Fri Sep 08, 2017 7:11 pm

Re: Friday Facts #207 - Lua noise specification

Postby IronCartographer » Fri Sep 08, 2017 7:50 pm

bluerock wrote:I am not sure it can be done without looking like a 'patch' that doesn't really fit with the rest of the terrain generation.


Kind of surprising that's not how it works, actually. Generating the starting area with its own dedicated system with a randomly blurred/blended biome edge would allow players to choose their preferred biome start, then have it merge with the rest of the world naturally. :)
IronCartographer
Fast Inserter
Fast Inserter
 
Posts: 211
Joined: Tue Jun 28, 2016 2:07 pm

Re: Friday Facts #207 - Lua noise specification

Postby pleegwat » Fri Sep 08, 2017 7:57 pm

bluerock wrote:It seems to me that a relatively easy way to resolve would be to use something like a 4-way flood fill algorithm starting at the player start location and use it to count land tiles surrounding the player above sea level. Maybe allow the player to set the value. For example a value of 40,000 would mean that the algorithm would check to be sure that the player isn't starting on an island smaller than about 200 x 200 in size (if the island happened to be squarish).


I think there's some merit in this idea - to avoid starting on a tiny island, rather than changing the map generation to make it impossible, you make it so if it does happen you can detect it and simply discard that seed.

Of course, you still want to reduce the chance these situations pop up or your world generation could get very slow.
pleegwat
Inserter
Inserter
 
Posts: 30
Joined: Fri May 19, 2017 7:31 pm

Re: Friday Facts #207 - Lua noise specification

Postby MrGoodbits » Fri Sep 08, 2017 8:07 pm

I don't care what size a tiny island might be, as long as I have resources to be able to build enough to get off the island. So perhaps a flood fill to find land and resources to verify you can at least get to landfill researched. If not, then either re-seed or add the bridges.
MrGoodbits
Inserter
Inserter
 
Posts: 21
Joined: Mon Jun 27, 2016 9:33 pm

Re: Friday Facts #207 - Lua noise specification

Postby Tomik » Fri Sep 08, 2017 8:29 pm

What are those purple ore field splotches in the second map? Oil? Did you change how oil is going to be extracted?
User avatar
Tomik
Fast Inserter
Fast Inserter
 
Posts: 107
Joined: Mon Apr 18, 2016 3:30 pm
Location: Bohemia

Re: Friday Facts #207 - Lua noise specification

Postby Jap2.0 » Fri Sep 08, 2017 8:52 pm

I am also against the idea of the spiderweb thing near your start. It could mess up early-game defense - now, with a good starting area you can get away with only defending 3 sides of your base, with a lake on one side - or only defend one side if you find a nice peninsula. With these changes, there would be many paths through the water you would have to block off as well. These is also the fun challenge of getting off an island. My suggestion would be to try to path to a dozen points a few hundred or thousand tiles away (or use some other algorithm to find if you are on an island), and then if at least, say, 10 fail, look to see if enough resources to easily research landfill and make a generous amount are available. If not, generate a new map. Alternatively, in the advanced options, you could put an option to turn this off or set the threshold for the minimum amount of resources on the island.
There are 10 types of people: those who get this joke and those who don't.
Jap2.0
Filter Inserter
Filter Inserter
 
Posts: 657
Joined: Tue Jun 20, 2017 12:02 am

Next

Return to News

Who is online

Users browsing this forum: No registered users and 1 guest