How many "chunks" are loaded?
How many "chunks" are loaded?
I am making world generation for my mod, and I was thinking:
I need to generate the world inside the chunks that are loaded, or it may not work... but how many chunks are loaded?
So I need to know that to make the worldgen part of the f mod
I need to generate the world inside the chunks that are loaded, or it may not work... but how many chunks are loaded?
So I need to know that to make the worldgen part of the f mod
Re: How many "chunks" are loaded?
I am not sure that there is any chunkloading/unloading.
Shouldn't unloading the chunks with your power plant kill your power?
Shouldn't unloading the chunks with your power plant kill your power?
Re: How many "chunks" are loaded?
Im not sure about chunk unloading, but im sure about chunk loading ( the map is infinite, but it generates when you go throught the chunks), obiously, your computer cant interpretate infinite chunks.
Re: How many "chunks" are loaded?
All generated chunks are active all the time.
Providing event like "chunk-generated" could help.
Providing event like "chunk-generated" could help.
Re: How many "chunks" are loaded?
but how many chunks are generated? what distance from the player
Re: How many "chunks" are loaded?
Probably the most useful answer here would be how many 'chunks' are generated around the player at start (assuming that is the buffer around the player where if a chunk is not loaded it becomes loaded).
PS. this would explain for sure why my 71 mb save is down to only 20fps perhaps a console command to unload chunks more than x away from the player could be implemented so I can actually play this save again lol?
Well assuming that your terraforming worked based off placing a machine down then (once we know) as along as it doesn't go farther than what the buffer is around the player it would work fine. I'd take a wild guess (until we get an answer) that it's only slightly more than the size of the minimap. Which would still be a fairly insane amount of land to terraform, even if it took an hour or twoficolas wrote:I am making world generation for my mod, and I was thinking:
I need to generate the world inside the chunks that are loaded, or it may not work... but how many chunks are loaded?
So I need to know that to make the worldgen part of the f mod
PS. this would explain for sure why my 71 mb save is down to only 20fps perhaps a console command to unload chunks more than x away from the player could be implemented so I can actually play this save again lol?
<I'm really not active any more so these may not be up to date>
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me
Or drop into #factorio on irc.esper.net
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me
Or drop into #factorio on irc.esper.net
Re: How many "chunks" are loaded?
I think the game should unload the chunks, for multiplayer, it needs to be done if multiplayer will be public server based (I hope it is like so) and im sad that world gen will be so bad in my mod, becaise the player will be so near to the player, or I just had an idea xD, the worldgen wont be runned untill the player is near.
Re: How many "chunks" are loaded?
Agreed, there will be a need for chunkloading in the future.ficolas wrote:I think the game should unload the chunks, for multiplayer, it needs to be done if multiplayer will be public server based (I hope it is like so) and im sad that world gen will be so bad in my mod, becaise the player will be so near to the player, or I just had an idea xD, the worldgen wont be runned untill the player is near.
On the other hand - I am not sure that unloading inactive chunks (those that have no running machinery) would improve the situation.
Re: How many "chunks" are loaded?
Good point. I don't have the data however I would guess that unloading the chunks wouldn't help that much because there are mostly just fish and creepers there.MF- wrote:On the other hand - I am not sure that unloading inactive chunks (those that have no running machinery) would improve the situation.
- Lukasecicek
- Inserter
- Posts: 26
- Joined: Mon Mar 11, 2013 9:42 am
- Contact:
Re: How many "chunks" are loaded?
I have sort of solution for the performace, with the help of actual "factory" buildings. Will write it down into detail right after i get some sleep.
Re: How many "chunks" are loaded?
The radius is up to 3 chunks far from the player (so 7X7 chunks around the player should be always there).
Chunk is 64X64 tiles.
Concerning the performance issues, there is lot of optimisations that can be done, and later, we can implement multithreaded game update as well, so don't worry the limits will get much bigger.
I don't know how does it work in your maps, but the results of our profiling showed, that most of the time of the update was spent in the factory.
Chunk is 64X64 tiles.
Concerning the performance issues, there is lot of optimisations that can be done, and later, we can implement multithreaded game update as well, so don't worry the limits will get much bigger.
I don't know how does it work in your maps, but the results of our profiling showed, that most of the time of the update was spent in the factory.
Re: How many "chunks" are loaded?
so 49 chunks minimum (3 on each side and the chunk the player is in) at start. I'm assuming there is no way to currently tell if a chunk is unloaded yet (for instance you wanted to use game.createentity out at say x=5000 y=5000, or would the game load the chunk before it tried to create an entity there)? Not a huge issue if your doing something around the player since the world never UNloads right now Have you decided which update will include world gen possibilties?
edit: btw, just created a stone furnace at 5k, 5k and teleported to check it out. It created the furnace fine...I lagged on teleport and was pretty much instantly killed by creepers ah, what a sight to behold however
edit again: um, just wanted to recommend that you do NOT try teleporting to 50k, 50k...it literally took win 7 over five minutes just to tell me that factorio had stopped responding and ate 96% of my 6 GBs of ram + 76% of my swapfile (5.6 GB) lol, cpu was only about 25% but that could be because factorio isn't multi-threaded (yet ) This makes me wonder how chunk loading works when teleporting however, if it only loaded the 49 chunks around me at spawn and then the 49 chunks at 50k,50k it shouldn't have crashed like it did (at least I wouldn't think so).
edit: btw, just created a stone furnace at 5k, 5k and teleported to check it out. It created the furnace fine...I lagged on teleport and was pretty much instantly killed by creepers ah, what a sight to behold however
edit again: um, just wanted to recommend that you do NOT try teleporting to 50k, 50k...it literally took win 7 over five minutes just to tell me that factorio had stopped responding and ate 96% of my 6 GBs of ram + 76% of my swapfile (5.6 GB) lol, cpu was only about 25% but that could be because factorio isn't multi-threaded (yet ) This makes me wonder how chunk loading works when teleporting however, if it only loaded the 49 chunks around me at spawn and then the 49 chunks at 50k,50k it shouldn't have crashed like it did (at least I wouldn't think so).
<I'm really not active any more so these may not be up to date>
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me
Or drop into #factorio on irc.esper.net
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me
Or drop into #factorio on irc.esper.net
Re: How many "chunks" are loaded?
Here is a fun *hypothesis*:
Creeper spawners might be placed in the same way as items when you remove a chest (they explode around)
at 50k,50k there was a lot of spawners "in the chest that exploded".
So much that there is actually more spawners to be exploded around than the actual space.
And that would probably cause infinite terrain generation.
Creeper spawners might be placed in the same way as items when you remove a chest (they explode around)
at 50k,50k there was a lot of spawners "in the chest that exploded".
So much that there is actually more spawners to be exploded around than the actual space.
And that would probably cause infinite terrain generation.
Re: How many "chunks" are loaded?
Ok so I can place entities far away, but the question is:
Why?
Because the chunk loads when the entity is placed?
or because the entity is placed in an unloaded chunk?
the first one let me do world gen, the second one doesnt, I need to clear the terrain by removing all entities there...
Why?
Because the chunk loads when the entity is placed?
or because the entity is placed in an unloaded chunk?
the first one let me do world gen, the second one doesnt, I need to clear the terrain by removing all entities there...
Re: How many "chunks" are loaded?
just try it and see what happens that's what I did (and almost regretted it when i teleported to 50k,50k lol)
<I'm really not active any more so these may not be up to date>
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me
Or drop into #factorio on irc.esper.net
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me
Or drop into #factorio on irc.esper.net