Factorio World


Mod that changes the world generation to be a real-world map. Two world maps to choose from: "Atlantic" and "Pacific".

Content
2 years ago
0.14 - 1.1
7.12K
Environment

i Optimalization suggestion

3 years ago
(updated 3 years ago)

During playing around with this mod and thinking of optimalization I thought about checking if all 4 neighbour tiles are same. If true you can skip further heavy math calculations. Is there some detail about .lua, or some other system involved that could cause that code to not improve speed? I'm looking for some small improvements as I have small lags during game loading new chunks, which are not - so - small "chops" when I run it on server with few players.

https://pastebin.com/5y3MNmEZ here is fragment of my variant of code.

3 years ago

Yea, there's a lot of data going on so optimizations are always welcome.

I used to have a version that did a lot of calculations at the start, but that made loading super long, and used more memory. Now it loads in that stuff gradually, but I guess that gives a bit more stuttering during the game. Maybe I can make it a mod-setting, load everything at the start, or gradually. Perhaps that would already help.

I'm also always open to accept pull requests on Github, if you want to make more changes yourself. I don't have much time to really make big changes myself, but can always review.

Thanks!

3 years ago
(updated 3 years ago)

I'm very unfamiliar yet with how github works unfortunately.
That option in settings would be great! I actually want to use your mod for multiplayer server and it has a lot more memory than it needs, also pre-calculations wouldn't hurt it as I will run this server for few weeks stright, so it only happens once in that time.

3 years ago

No problem. I'll look into it, but not sure when I'll get to it. Other projects I'm working on. I did promise myself to keep the mod up to date with new factorio versions, so worst case when the next version releases :P

New response