Game So Slow - Unplayable

Normally this would be a performance issue, but at this point, I’m going to call it a bug, Basically, the more I’ve played, the slower the game has gotten. Now it’s to the point that only 6 in game days passed within a 9 hour period (I fell asleep with it running). Also, I may not have the best rig, but I know it can perform far better than this.

Previously, I had trapped the Goblins off until they left on their own. That was the beginning of the slowdown.

Save Game (6.3 MB)

System Information:

That CPU is going to throttle your game pretty hard. Once you break ~20 hearthlings most people tend to see a bit of a slow down, where hearthlings get a little more sluggish to jump on tasks. It takes a pretty solid processor to play comfortably with more than 35.

A quad core at 3.4 isn’t solid enough? And even so, I’ve got barely over 20, like maybe two.

being an alpha game, Stonehearth tends to throw a lot of invisible “micro errors” (call them non-critical glitches, read errors, math errors or whatever, but they’re a combination of anything which confuses the game without breaking it totally); and over time these build up and cause the game to stall on many calculations.

For example, trapping the goblins into their camp causes a lot of never-ending pathfinding queries to build up. The goblins don’t stop looking for a way out just because they can’t find one, so the game spends more and more time trying to find one for them (i.e. checking every possible tile within their limit before it gives up, throws a flag to try again, and has another go a few moments later.)

There are some key things you can do to improve your performance, such as getting items into chests (so they don’t have to be rendered, meaning less shadows to calculate) and keeping your animal and hearthling populations down to just what you need… but no matter how efficiently you run your town, the “micro errors” will build up over time.

So, the best thing to do is simply take regular breaks, shutting the game down fully at each break, to allow your computer’s memory and CPU to “clean itself up.” The game will get rid of a lot of unnecessary, unanswered (and often unanswerable) queries and calculations, and create new ones next time it spins up the relevant entity’s AI; so all those “hey, I can’t find the door!” type of outstanding queries will be cleared up; so the game has more time in each tick cycle to work on other things.

The same is true for most simulation games; the longer you play the more garbage piles up. Usually this garbage is collected and got rid of by the game, but sometimes it can’t do that (e.g. an ongoing pathfinding query)… as easy as it is to get lost in a game like Stonehearth for hours, taking regular breaks really does improve your experience across the board :slight_smile:


Don’t take this as 100% reflective of in game differences, but here’s a rough comparison between your CPU and mine, though mine is also overclocked a fair bit further. Certainly, my system isn’t stressed to to max or anything when I’m playing, but it stonehearth uses a fair amount of computer resources (between 40-60% of my CPU). It has a lot more to do with efficiency, IPC, and features like hyperthreading, plus having additional threads in general, than raw cores/clocks.

I’m not surprised you would start to bump into problems even if everything was totally ironed out. It’s regrettable, but your hardware may be beginning to show its age.

Ok…but you’ve got an i7, which would be the equivalent of an 8 core, not a 4 core.

I’ll agree it’s getting old. But as an industry standard, unless you have a “gaming” computer, you’ve pretty much got a quad core, which would be an i5 in intel terms. To expect EVERY player of this game to have an i7 equivalent or better would be like when the first Crysis came out, and it took a computer at Nasa to run it on top settings.

Not quite. A 4 core/8 thread machine isn’t the same as an 8 core machine. It’s in between the performance of a 4/4 and a true 8 core machine.

However, the point I was making is that because Stonehearth is both in development and largely CPU bound, and I see a performance impact at a certain point on my machine, it isn’t too big of a surprise that you would also see a performance hit at a lower threshold.

Furthermore, as I mentioned, it’s not just a matter of cores/threads. My machine does more per clock (rated in Instructions Per Clock, IPC), is clocked higher (4.7 on mine, but that’s not necessarily a standard for my chip either).

An i5-6500 would handle stonehearth great. Even a i5-4690k would probably do fine. That takes us back to 2014. Building a computer every couple of years isn’t an unreasonable time frame, especially for an enthusiast, so I don’t think it’s unreasonable for the stonehearth team to look ahead to when their game is released (which certainly isn’t now, and is probably being measured in years), so using a two year old i7 as a performance benchmark to aim for might not be as unreasonable as it sounds. Hell, if we go back to 2012 we can look at the i5-3570k, or the more popular i7-3770k. Buyers on a budget sometimes pick those up today and overclock the stuffing out of them, and they would (I suspect) do pretty well up to ~30 hearthlings.

1 Like

I have been curious on this aspect as to why they haven’t dumped more onto the graphics processor. IMO, it seems like at least 20% of the load could be shifted over. But I’m not a programmer, so my opinion isn’t worth much.

My very surface level understanding/explanation goes something like this:

The CPU does all the math, calculating where the hearthlings need to be and where stuff needs to fall, logically. If you’re in combat, then it also has to figure out who hits who first, how much damage that does, and run all the individual hearthling AIs so that different people can focus on different tasks. Your GPU can’t really help with that, since it’s basically only good at drawing pictures.

What your GPU can do is make things look nicer. It allows for more stuff to be happening on screen at the same time: weather effects, shadows, and figuring out how shadows should look when light is being cast from different sources. If you have a town with several hundred lights put down, then you’ll really feel the impact when night rolls around and all the lamps turn on. Even with a 1070, my game stutters for a second when the sun goes down.

Since the GPU isn’t great at physically putting things into the map, it’s hard to put the load like the AI, the object physics, or randomly generated events anywhere but on the CPU. Hence, we see such an impact with how things are calculated. It’s a little like how Minecraft is so RAM hungry: each block has to be stored in RAM, so when you load ~100 chunks all at once, you’re talking about millions of individual blocks it has to keep track of all at the same time. Nothing handles that job as well as RAM, so that’s where the load sits.

To add to @Aethrios there

I’m no engineer or programmer, but from what i understand (and a handy explenation i heard somewhere)

the CPU is like a high-functioning mathematician, and a GPU is like a huuuge group of little children doing math, the idea is that complex tasks are dealt with the CPU and simple tasks like geometry and physics(the simplified version of it) are dealt with the GPU because it’s not that hard to calculate a polygon, and the CPU can do it, but there a Lot of them, and i Mean a LOT of them, and having thousands of simple CPU’s(GPU) do it is much more efficient and fast, that’s the reason CPU rendering is possible, they do the same task, but it’s underpowered for the CPU and the GPU can do much more in the same time

But saying that, i suppose some taks can be transfered to the GPU, but i don’t think it’s idea? If we get physics, i guess the GPU would play some roles there, but i can’t think of any as of yet

Besides, i’m not even a programmer or developer, i could be wrong at anything

I think the GPU could be used for a lot of things but it really depends on how the engine itself visualises the world. If it had a massive 3 dimensional matrix that represented the world which it then did operations to whenever something happened, the GPU could be used quite extensively.
Whenever a hearthling needed to find an item the GPU could be used to fourier transform the matrix and find all of the item the hearthling was looking for. It would be possible to transform it again to find the closest item.
It could also be used to work out where encounters should spawn and all other location finding tasks.

But seeing as I don’t know how the engine works, I’m just speculating.

1 Like