Page 1 of 1

[0.10.0] Massive base, fps drops, filesize triples

Posted: Mon Jun 16, 2014 8:57 pm
by jeroon
I'm not sure if this is the right part of the forums to put this in, but i don't know where else to put it (not even the new technical help section i think :) )

I've been building a massive base since 0.9.8 came out, my goal was to have assembling machines running non stop for all 3 different level 3 modules. As my base got bigger, my fps started dropping, so I tried lowering the graphics quality, but this didn't help. My guess is, there are too many calculations to be done withing 1 tick, so the game slows down. I've been playing around 2 x 8 hours over the last two days, and the Play Time has increased 3 hours (according to the Load Game dialog) in total..

some save games and their file sizes:

0.9.8 - playtime 69 hours - file size 30 mb (save game)
0.10.0 - playtime 70 hours - file size 44 mb
0.10.0 - playtime 71.5 hours - file size 89 mb
0.10.0 - playtime 73.5 hours - file size 155 mb (save game)

between the last 2 saves, i probably played 10 hours, where the game only says 2 hours. The file size has almost doubled.

The base in 0.9 was already massive, frame rate around 24 fps, autosave took around 8 seconds. With 0.10 the autosave was much much better, 1 second or less, but after a couple of days play the frame rate has dropped to 14 fps, and the save time is 10+ seconds. The game is now so slow that's it's completely unplayable.

The goal of this post is not to look for a quick solution, because i can't think of one, but more to show what happens as bases grow bigger, on not so fast computers. I'm guessing the file size exploding has to do with the new replay function, maybe there should be an option to turn it off?

Also, maybe players with faster computers can try my saves, see what frame rate they get?

Re: [0.10.0] Massive base, fps drops, filesize triples

Posted: Wed Jun 18, 2014 3:27 pm
by jorgenRe
weird my save is only 19.5 MB and its 91 hours, so i guess i might have not been building so much even thought i am using around 1.5k copper ore a min :roll:

Re: [0.10.0] Massive base, fps drops, filesize triples

Posted: Wed Jun 18, 2014 6:43 pm
by Rahjital
Hmm.. For me, replays themselves tend to be about 20-25 MB themselves (until I get a bad allocation error). I think how big the save grows depends on how much you are moving, clicking and doing various other stuff as well as on how much you explore.

Re: [0.10.0] Massive base, fps drops, filesize triples

Posted: Thu Jun 19, 2014 3:31 pm
by slpwnd
Thanks for the report. The big saves is caused by two things:

1) A lot of biters
2 A lot of biters pathfinding simultaneously

We made some tweaks for the 0.10.1 to avoid this. Namely:

1) Big nests will not get so crowded. Crowded nests are troublesome because often biters there can't get out. Now spawners will look in the vicinity and if there are more than X biters (even from other spawners - set to 5 experimentally) then they don't spawn.

2) There will be a limit on number of running simultaneous path finds. This is because if we have 300 path find searches running each with its path finding data structures, that can eat the memory quite fast. So now there will be a limit that first 10 path finds can go in without problem. Then only next 10 path finds for "estimated" short distance. And then no one.

Also there will be a migration to kill all the enemies if they are overcrowded in 0.10.1. I have tried to load this save and even after running for like 20 minutes it still had less than 20MB (the migration killed all the biters and they don't get overpopulated so much now). So we will see how this helps :D

Re: [0.10.0] Massive base, fps drops, filesize triples

Posted: Thu Jun 19, 2014 4:39 pm
by Rahjital
Do these bugfixes change game balance in any way? Biters are already easy to deal with in 0.10 and reducing their number would only seem to make them even less of a threat.

Same with the limiting of maximum pathfinders - if you get a lot of biters to run after you at once, won't the majority of them get stuck until they are finally allowed to find a path of their own? I'm not sure if that's how it works, I'm just worried if the biters will regress back to their pre-0.10.0 levels of intelligence.

Re: [0.10.0] Massive base, fps drops, filesize triples

Posted: Fri Jun 20, 2014 8:43 am
by cube
Rahjital wrote:Do these bugfixes change game balance in any way? Biters are already easy to deal with in 0.10 and reducing their number would only seem to make them even less of a threat.

Same with the limiting of maximum pathfinders - if you get a lot of biters to run after you at once, won't the majority of them get stuck until they are finally allowed to find a path of their own? I'm not sure if that's how it works, I'm just worried if the biters will regress back to their pre-0.10.0 levels of intelligence.
Yes, they change the ballancing a litle, but not too much. The second thing shouldn't be a probelm in practice, because the total limit of path finds per tick doesn't change. There might be a little more biters waiting for path than in 0.10.0, but not too many more.

Re: [0.10.0] Massive base, fps drops, filesize triples

Posted: Fri Jun 20, 2014 9:01 am
by hoho
slpwnd wrote:1) Big nests will not get so crowded. Crowded nests are troublesome because often biters there can't get out. Now spawners will look in the vicinity and if there are more than X biters (even from other spawners - set to 5 experimentally) then they don't spawn.
Will you increase the spawner spawning rate to balance things a bit?

Alternative, though perhaps somewhat hacky, way would be to not really store the paths of worms until player somehow interacts with them.
At the moment of interaction (or even better, a few seconds before that) take a snapshot of the worm positions and store that in the replay and any other thing they do after that. When playing it back the random movements of the worms would not be equal every time you play through it. As long as there is a half-decent way of getting from random position of worms to the position they were in that snapshot it should be good enough.

Of course that won't really help in multiplayer and full movement of worms still needs to be synced.

Re: [0.10.0] Massive base, fps drops, filesize triples

Posted: Fri Jun 20, 2014 9:10 am
by BurnHard
After 22 hours of play my savegame is also already 140MB big, with the uncompressed level.dat at an impressive size of 580 MB. Where will this end after another 24 hours of play? Will we end up with savegames of 1gigabyte or larger if I keep on playing? Hopefully 0.10.1 can help a litte bit.. And yes I play with maximum spawner sizes and numbers. A LOT of biters around ^^

Re: [0.10.0] Massive base, fps drops, filesize triples

Posted: Fri Jun 20, 2014 10:16 am
by hoho
Another option to cut down on the worm-generated massive replays:
don't have the worms out all the time.

Have them only pop out of ground when player (or machines) gets close enough. Not when he or she is in agro range but somewhat sooner.
Of course it would mean players would often need to get much closer to the enemy bases when exploring and the bases would sort of look like "dead".

Re: [0.10.0] Massive base, fps drops, filesize triples

Posted: Sat Jun 21, 2014 9:21 am
by jeroon
Last night, on IRC, we've been playing with my last map for a bit, with 0.10.1 :

The good news: file size went from 160 MB to 20 MB, saving in instant again :)

The not so good news: frame rate went from 14 fps to 18 fps, and as said before, it's not just 'refresh rate' that's low, it's game speed that goes down as well, 15 fps means the game runs at 25% of normal speed, and everything. slooowwweees. dooooowwwwn.

Since I use belts as a stockpile, and the base is set up pretty spread out, there are a lot of full belts. After emptying most of the belts, frame rate went up to 30+ fps (but empty belts also means idle machines, so not all fps gain is due to emptying belts..).

So what I will try now is replace a lot of belts with robots, all flying short distances, and see if I can get the factory running at decent speed again :D

Re: [0.10.0] Massive base, fps drops, filesize triples

Posted: Sat Jun 21, 2014 1:06 pm
by kovarex
jeroon wrote:Last night, on IRC, we've been playing with my last map for a bit, with 0.10.1 :

The good news: file size went from 160 MB to 20 MB, saving in instant again :)

The not so good news: frame rate went from 14 fps to 18 fps, and as said before, it's not just 'refresh rate' that's low, it's game speed that goes down as well, 15 fps means the game runs at 25% of normal speed, and everything. slooowwweees. dooooowwwwn.

Since I use belts as a stockpile, and the base is set up pretty spread out, there are a lot of full belts. After emptying most of the belts, frame rate went up to 30+ fps (but empty belts also means idle machines, so not all fps gain is due to emptying belts..).

So what I will try now is replace a lot of belts with robots, all flying short distances, and see if I can get the factory running at decent speed again :D
Your save will be good for upgrading the performance in the future.

P.S. Full belts of items (that are not moving) don't move doesn't slow the game at all.