Game slows down all the time

I dont know why the game slows down all the time.
The longer i play the more it slows down.
Then i save and load and it works fine for alittle. Then slows down again lagging.

Im at Stoneheart 0.19.0 (Release 687) x64 build.

My pc specs should not be the case. I have 32 bg ram.
Skylake I7
Nvidia GeForce GTX 980 Ti
etc etc. This pc can run nearly all games on maximum without much trouble.

I have been having similar issues, i believe the game has a memory leak somewhere. for now all i know to do is save anr restart the game.

Try to change some settings, like shadows or maximum lights.
Use container to store your stuff, stockpiles could slow down the game.
Do not use the second building vision all the time, the one with half opened buildings.

But yes, the game needs a lot more optimization.

I tried to place only chests and no stockpile zones. Its still happening.

This is the first map i had though with alot of water on it. I dont know if water is heavy in this way.

Could you upload your save so we can look into it? It should be in where you installed the game, compressing it and uploading it here, or if it’s too big via somewhere like google gDrive

From my experience the game still gets some massive lags from 90%-100% LUA activity.
I cannot figure what causes this but it generally happens when my workers are mining (into dirt at least).
No stockpiles on the floor (except potions), everything is stocked in chests.

Edit: Game’s speed, building vision and day time do not affect it.

1484966819810.7z (5.2 MB)

Here is my save file.

Okay. My game have come to a point now where even if i save and load. It will only run smoothly for a few min. Then i have to do it again.

1485011384703.7z (5.3 MB)

perhaps its that you are messing with water?

I havent touched the water at all.

No, i didn’t manipulate the water at all in this game. Not yet. But still the game is very laggy.
I tried on some games to make the water flow into holes and create artificial rivers. That was creating some massive lags but only the time the water filled up the area and then stopped.
Right now this cannot be related to water.

To me it looks like this could very well be a problem with too many Hearthlings. At the moment the Hearthlings AI is very ressource intense and this may be the problem here (especially since the AI is written in LUA and you say LUA has uses nearly all of the memory). Have you tried playing with less Hearthlings? (E.g. “delete” some and see if it runs better)

1 Like

It started allready as 8 heartlings.

And i have another save with 32 heartlings that runs waaaaaay smoother.
Its the Raya, though in the desert.
I dont know if the forest is different.

I’ve had the same issue. I’ve turned lights and shadows way down and still have it. It seems to occur when there are lots of lights, such as braziers. Typically saving the game, exit and restart works. Possibly a memory leak?

Well. It was there before the Braziers. And my other save which run alot smoother have just as many braziers.

Sorry for the late reply :sweat:

In your second savefile, @SquidNeko (the one that gets lag after a few minutes) it is caused by Ogo’s Army not finding a path to your city, which makes the pathfinder work hard. This will get solved once we introduce the new reachability service from Chris.

On your case, @TheMournful, looking at that screenshot seems to be the mining. Is all that a single huge region?
In that case the performance will be affected too. I believe devs mentioned once that we need to split mining regions just as we split the ones on building foundations. In the meantime, making smaller mining regions should help.

1 Like

Okay. Whats the new reachability service?
And i guess the wait was because this topic got forgotten or something?
But atleast i got an reply. =3

Well, it’s long to explain, but here’s some introduction (we call it topology service, more recently) : Stonehearth Dev Stream 256: Topology service and state machines!

1 Like

Yes @Relyss, i can confirm the mining area was really huge. :merry:

1 Like

also i noticed the night is lagging the most of the game… can play daytime nice with smooth fps but when it gets night my game is lagging hard, im sure its because all of the lights :slight_smile: