[0.14.7] Map generation runs when not near edge of map

Bugs that are actually features.
dauphin
Inserter
Inserter
Posts: 38
Joined: Fri Aug 19, 2016 1:59 am
Contact:

[0.14.7] Map generation runs when not near edge of map

Post by dauphin »

I noticed recently that, on the map I'm currently playing, if I venture into the wild, my UPS drop dramatically. On my Macbook Pro, with 16GB RAM, 2.5GHz Core i7, and AMD 2GB M370X, UPS can drop from near 60 all the way to 35.

This appears to be happening because map generation gets 'activated'. Even if I stand still, the map generation continues to run, as far as I can tell indefinitely.

Having RSO as part of the save sometimes makes it even worse, and sometimes doesn't.

Either way, I am curious why map generation is running when I am not near the edge of the world. I can definitely move *farther* from the edge of the world and make the map generation stop completely, so it must have something to do with how close I am to the edge of the world. But I am not particularly close - I cannot even see the edge of the world in the minimap.

Basically, it makes doing work far from my base much harder than doing work near my base, which is pretty unintuitive.

I am not at all sure this is a bug - it's quite possible this is just some requirement of how map generation works. On the other hand, when I am actively revealing new tiles, it gets much worse than this, so obviously there is a difference between this type of map generation and the 'real thing', where I'm actively seeing new tiles get revealed.

Obviously, it would be nice if the game could run at 'normal' speeds when I am not actively exploring new parts of the map. But if this is necessary to the way the game works, I understand.

No map generation running -- 57 UPS
Image

Map generation running, only a few steps north (toward the edge of the world) -- 36 UPS
Image


Same map, different location, but also far away from main base.... RSO mod not actively taking time, but map generation still running -- 46 UPS
Image


All screenshots in imgur album: https://imgur.com/a/1Hzo2
savegame and mods: https://www.dropbox.com/sh/vb475cno8eon ... IYpya?dl=0
Rockstar04
Fast Inserter
Fast Inserter
Posts: 171
Joined: Sun Feb 17, 2013 4:31 pm
Contact:

Re: [0.14.7] Map generation runs when not near edge of map

Post by Rockstar04 »

I'm at work so I can load up the save, but do you have radars that could be generating the new areas?
Rseding91
Factorio Staff
Factorio Staff
Posts: 14253
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.14.7] Map generation runs when not near edge of map

Post by Rseding91 »

Someone changed the map settings max_expansion_distance from 7 to 30 so now every time a chunk is generated the game scans a 30x30 chunk area around the new chunk to check expansion settings. Set it back to the default 7 and you won't get the massive lag from chunk generation.

As for the chunk generation: when you're near the edge of the generated world the game generates chunks passively around your player so they're ready if you walk that way. The max_expansion_distance change caused a *massive* amount of chunks to be requested any time you would get near the edge of the world resulting in it appearing to run forever.

So: don't mess with settings you don't understand is the lesson here :P
If you want to get ahold of me I'm almost always on Discord.
dauphin
Inserter
Inserter
Posts: 38
Joined: Fri Aug 19, 2016 1:59 am
Contact:

Re: [0.14.7] Map generation runs when not near edge of map

Post by dauphin »

Rseding91 wrote:Someone changed the map settings max_expansion_distance from 7 to 30 so now every time a chunk is generated the game scans a 30x30 chunk area around the new chunk to check expansion settings. Set it back to the default 7 and you won't get the massive lag from chunk generation.

As for the chunk generation: when you're near the edge of the generated world the game generates chunks passively around your player so they're ready if you walk that way. The max_expansion_distance change caused a *massive* amount of chunks to be requested any time you would get near the edge of the world resulting in it appearing to run forever.

So: don't mess with settings you don't understand is the lesson here :P
This makes sense.

I was going off a different forum post that suggested that increasing game.map_settings.enemy_expansion.max_expansion_distance would make the biters more aggressive. I am a little surprised that a setting under enemy_expansion affects map generation, but I'm sure there's a reason for it. My assumption was that this setting had to do with how far biters would move before founding their next colony. Is this not the case? Regardless, I do appreciate how much configuration is at least available to players to experiment with.

And yes, I did suspect that passive generation in preparation for crossing into unknown territory was causing it. It just didn't occur to me that my changes to enemy_expansion settings would have changed that behavior.

Thanks for the help!
dauphin
Inserter
Inserter
Posts: 38
Joined: Fri Aug 19, 2016 1:59 am
Contact:

Re: [0.14.7] Map generation runs when not near edge of map

Post by dauphin »

Oh, and out of curiosity - is the map generation happening any time I get within max_expansion_distance of the edge of the world? Or is that distance a separate parameter?

I.e., would the game be generating 7x7 chunks (instead of 30x30 chunks) out toward the edge of the map if I were standing at that same location and the parameter were set to default? Or is it that it tries to make sure that a 7x7 chunks area centered on my character is pre-generated? Or is it something else I'm missing?

basically, I'm a long ways from the edge of the map, but 30 chunks seems about right. Hopefully when I reduce that parameter, it won't even be pre-generating anything at that particular location, instead of just generating fewer chunks.
Post Reply

Return to “Not a bug”