[0.7.7] Huge occasional FPS drops. {Unseen piles of auto-miner resources.}

Random Unit

Well-Known Member
Sep 18, 2017
12
21
210
Hi, guys! I've installed this awesome game about a week ago so I don't know if previous versions were suffering from this bug, or is it fresh, but here it is:

I have some decent PC, which quite meets minimum specs for the game (Intel Core2 Duo E8400@3MHz, 4 Gb RAM, AMD Radeon HD 6570 1Gb), so I play on minimum graphics settings and get quite smooth gameplay at around 25 FPS with some stutterings when there are some huge mechs around. But sometimes I get absolutely random heavy drops to 5-6FPS, making the game absolutely unplayable. As long as I was experiencing these drops, I couldn't find any connection between them and game events. These drops were random as by occurences as by lasting: they could disappear in a couple of seconds or they could become permanent, forcing me to leave the game.
I am not quite sure, what exactly causes this bug to appear, but I'm pretty sure it somehow affiliated with .NET Framework, because when I've uninstalled .NET Framework 4.7 and installed v4.0, the lag has disappeared totally.

Thanks!

P.S. Sorry for my poor english. I hope I could describe the problem well enough.
 

Zed

Well-Known Member
Dec 23, 2016
1,256
1,188
515
40
An interesting discovery and certainly worth investigating further; It might have been the case that the clean reinstall of the framework cleared out the multiple patches (similar to java builds sitting next to eachother, causing a program to attempt to use more than one and causing a problem.)

While I am merely a fellow player and not a developer useful information might be to provide an output_log file from your TerraTech "WinData" sub-directory along with more which operating system your machine is currently using. I know from my own personal experience I used to experience such slowdowns before upgrading the memory in my laptop (Win 7 64bit) from 8GB to 16 along with other tweaks such as muting all sound and reducing draw distance to 50% while also playing @ 1280x720 instead of 1920x1080.

Another suggestion I would have is after creating a restore point on your computer would be to try updating Microsoft.net Framework back to 4.7 and seeing if the Lag returns if you would be willing.
 
  • Like
Reactions: Adriano

Boomik

...
Apr 2, 2017
3,527
2,651
670
Stalk me not
Hadn't Terrtech always been poorly optimized and lag a lot? On my beast (ish) computer it still randomly lags every once in a while.
 

harpo99999

Ah kick till it starts
Aug 14, 2014
2,210
1,121
570
australia
I have had several programs(that I routinely use and need to use) CRASH when I installed the dotnet 4.7 'update', and upon removing the dotnet 4.7 and re-installing the dotnet 4.62 everything worked again, so I refuses to install the dotnet 4.7 as it has caused many problems for me
 

Random Unit

Well-Known Member
Sep 18, 2017
12
21
210
Ok, two news:
  1. The bad one is that .NET framework wasn't the cause, because after some playing the lag has returned. I've even uninstalled .NET Framework completely and the game still lags as before, so I feel kinda stupid right now and really sorry about this mislead(
  2. The good one is that I think I've found some connection between lags and distance between my mech and my base. As long as I stay at my base the lag is almost unbearable. But when i drive away from the base for some distance, the lag totally disappear. I've been driving my mech for about 5 minutes in one direction and then 5 minutes back to my base without any lag - just insignificant stutterings. And right when I've returned to my base, the lag returned too. At first I was thinking that some of the structures at my base was the cause and I've started demolishing my buildings one by one by pressing RMB and choosing "send blocks to inventory", until nothing left except my mech, trading station and the lag. So I'm starting to think that maybe structures, when they're being demolished, aren't completely gone? Maybe there are some kind of "ghosts" being left that doesn't interfere with the game world, but still functioning in the background and though eating CPU? And maybe it is somehow affiliated with "Undo" button, appearing when I send something to inventory? Because I was kinda building and demolishing quite a lot at this place and I haven't been noticing these lags for a quite time after the first game's launch. As far as I can remember, the lag began to pop after I've settled down and began constructing and demolishing.
Here is the package, it contains the output log and two saves, called "Before Destroy" and "After destroy". The second one has been made when I've destroyed everything at the base and made 10 minutes promenade, mentioned above. The first one has been made right before that.

https://yadi.sk/d/x8HIUFsy3N2AwA
 
Last edited:
  • Like
Reactions: Adriano and Zed

Boomik

...
Apr 2, 2017
3,527
2,651
670
Stalk me not
Ok, two news:
  1. The bad one is that .NET framework wasn't the cause, because after some playing the lag has returned. I've even uninstalled .NET Framework completely and the game still lags as before, so I feel kinda stupid right now and really sorry about this mislead(
  2. The good one is that I think I've found some connection between lags and distance between my mech and my base. As long as I stay at my base the lag is almost unbearable. But when i drive away from the base for some distance, the lag totally disappear. I've been driving my mech for about 5 minutes in one direction and then 5 minutes back to my base without any lag - just insignificant stutterings. And right when I've returned to my base, the lag returned too. At first I was thinking that some of the structures at my base was the cause and I've started demolishing my buildings one by one by pressing RMB and choosing "send blocks to inventory", until nothing left except my mech, trading station and the lag. So I'm starting to think that maybe structures, when they're being demolished, aren't completely gone? Maybe there are some kind of "ghosts" being left that doesn't interfere with the game world, but still functioning in the background and though eating CPU? And maybe it is somehow affiliated with "Undo" button, appearing when I send something to inventory? Because I was kinda building and demolishing quite a lot at this place and I haven't been noticing these lags for a quite time after the first game's launch. As far as I can remember, the lag began to pop after I've settled down and began constructing and demolishing.
Here is the package, it contains the output log and two saves, called "Before Destroy" and "After destroy". The second one has been made when I've destroyed everything at the base and made 10 minutes promenade, mentioned above. The first one has been made right before that.

https://yadi.sk/d/x8HIUFsy3N2AwA
Having large amounts of large techs causes lag because the game is currently poorly optimized. Right now, your best bet is to not have a massive permanent base and drop down small bases wherever you move if you need to.
 

Random Unit

Well-Known Member
Sep 18, 2017
12
21
210
Having large amounts of large techs causes lag because the game is currently poorly optimized.
What are you talking about? There are no large amounts of large techs. There are only my tech and trading station. Do you even read my posts?
 

ZeroGravitas

Breaker of Games
Jun 29, 2017
3,938
5,751
675
37
UK
www.youtube.com
.NET Framework
I didn't think/realise it was needed/asociated with the Unity engine that TerraTech runs on...? Anyway, a side-track, I think. But thank you for making the effort to use the forum, @Random Unit.:) Interesting to see what problems people are having. And well done sharing your saves.

I took a look into your world, and found what I was expecting (in both "before" and "after" files):


It's been a common problem: Piles of loose resource chunks on the ground, from auto-miners that had been left running for a long while. They were each just about close enough to remain loaded in while at your base. (Tech/chunk/world tile unload happens at around 600 meters away.)

The same amount of resources held in collectors or silos on fixed anchored techs will decrease frame-rate far less, as there have been optimisations for those. Best still to brick them into compressed blocks and throw then in your SCU, of course.

For reference your base was not too big (if just what's shown below). The worst problems are with crafting bases that have a large conveyor system with lots of component factories, etc (when it's trying to craft) or just a lot of resources in silos.


There have sometimes been issues with solar panels on techs with rotating anchors. (And I'm sometimes suspicious of AI cabs on fixed anchored bases, but no evidence there, I know of.)

You know that you can add a player controlled cab to switch to the base techs and save a snapshot of them, right? (If you do want to try temporarily sending them to inventory, in future.)

For now, I suggest you clean up the resource chunks and see how the performance goes. I didn't get too much slowdown from this on my (more powerful) machine (just enough to notice), so I can't be sure. But good luck, and report back either way.;)
 
Last edited:

Random Unit

Well-Known Member
Sep 18, 2017
12
21
210
I was thinking about these resources causing this lag, but don't they suppose to lag all the time then? Remember: when I leave my base's area, lag disappears. Anyway, I'll check your suggestion tomorrow. And if these chunks are having an impact on PC's speed, maybe it would be the wise move to apply some sort of "living time" for them? I mean if resource chunk or the tech's part lies unpicked for about 3 days it would just disappear? Maybe there could be a checkbox in the game settings for decent PC users or something like that? Just a proposal.


You know that you can add a player controlled cab to switch to the base techs and save a snapshot of them, right? (If you do want to try temporarily sending them to inventory, in future.)
Yes I do, I do that regularly mostly when I build something to have a wider look from different points of view. Also, when i build new battery tower, i stick a cab to one of the anchor's sides, then switch to it and then continue to build everything else atop of an anchor - it gives me an opportunity to build really tall towers always watching at them from above)
 
  • Like
Reactions: ZeroGravitas

ZeroGravitas

Breaker of Games
Jun 29, 2017
3,938
5,751
675
37
UK
www.youtube.com
when I leave my base's area, lag disappears.
These two piles were in opposite directions, so which ever way you drive, one or the other will unload (I think). Or both, after a bit going away from both. (The base may contribute a little additional burden too.)
I mean if resource chunk or the tech's part lies unpicked for about 3 days it would just disappear?
This will happen, and fairly quickly, if the blocks or chunks are more than a certain distance from an (anchored?) player tech (~100m). But obviously you have the auto-miners there. And you wouldn't want your mined resources to all disappear, having taken about 25 seconds a piece to be extracted.

But this is a problem the devs are very aware of, and say they are actively trying to find a solution for,
 
  • Like
Reactions: Random Unit

GamerParrish

Well-Known Member
Aug 14, 2016
1,114
1,085
520
In a Tank Tinkering
Hi, guys! I've installed this awesome game about a week ago so I don't know if previous versions were suffering from this bug, or is it fresh, but here it is:

I have some decent PC, which quite meets minimum specs for the game (Intel Core2 Duo E8400@3MHz, 4 Gb RAM, AMD Radeon HD 6570 1Gb), so I play on minimum graphics settings and get quite smooth gameplay at around 25 FPS with some stutterings when there are some huge mechs around. But sometimes I get absolutely random heavy drops to 5-6FPS, making the game absolutely unplayable. As long as I was experiencing these drops, I couldn't find any connection between them and game events. These drops were random as by occurences as by lasting: they could disappear in a couple of seconds or they could become permanent, forcing me to leave the game.
I am not quite sure, what exactly causes this bug to appear, but I'm pretty sure it somehow affiliated with .NET Framework, because when I've uninstalled .NET Framework 4.7 and installed v4.0, the lag has disappeared totally.

Thanks!

P.S. Sorry for my poor english. I hope I could describe the problem well enough.
Yes, I understand. My PC specs are about a year ahead of yours, Intel Core2 Qaud, 6 GB RAM, NVIDIA GT 8800 500 mb. I have the same problem. When its gets late game just lower your resolution. Works for me! :3
 

Zed

Well-Known Member
Dec 23, 2016
1,256
1,188
515
40
Ok, two news:
  1. The bad one is that .NET framework wasn't the cause, because after some playing the lag has returned. I've even uninstalled .NET Framework completely and the game still lags as before, so I feel kinda stupid right now and really sorry about this mislead
Here is the package, it contains the output log and two saves, called "Before Destroy" and "After destroy". The second one has been made when I've destroyed everything at the base and made 10 minutes promenade, mentioned above. The first one has been made right before that.

https://yadi.sk/d/x8HIUFsy3N2AwA
Apologies that the suggestion of mine was not of help.

What are you talking about? There are no large amounts of large techs. There are only my tech and trading station. Do you even read my posts?
More Specifically, Large Techs and / or Large numbers of techs (blue blips on minimap) will generate lag as they remain loaded within the game engine as Unity is notoriously single-threaded.

I was thinking about these resources causing this lag, but don't they suppose to lag all the time then? Remember: when I leave my base's area, lag disappears. Anyway, I'll check your suggestion tomorrow. And if these chunks are having an impact on PC's speed, maybe it would be the wise move to apply some sort of "living time" for them? I mean if resource chunk or the tech's part lies unpicked for about 3 days it would just disappear? Maybe there could be a checkbox in the game settings for decent PC users or something like that? Just a proposal.
Once the techs / resources (in-game entities) are unloaded when the player is more than 500 / 750 meters away from them they merely become placemarkers and are not as large of a task for the CPU. Each resource on the ground is affected by gravity (collision with terrain)

Regarding "living time" within the output log there are usually many entries of "emergency kill volume" where the game engine goes around deleting excess entities (loose blocks / resources) to help improve performance.

The best tips I can offer you regarding improving performance would be to upgrade your system memory to at leaast 8GB of RAM and consider replacing your GPU with a more modern component which would have more complex shader instructions built into it. Beyond that setting graphics to simplest should resolve any issues with shadows and lowering the draw distance will take some of the burden off of the GPU along with lowering the ingame resolution.

Hopefully more optimization passes will be done soon.
 

Boomik

...
Apr 2, 2017
3,527
2,651
670
Stalk me not
I didn't think/realise it was needed/asociated with the Unity engine that TerraTech runs on...? Anyway, a side-track, I think. But thank you for making the effort to use the forum, @Random Unit.:) Interesting to see what problems people are having. And well done sharing your saves.

I took a look into your world, and found what I was expecting (in both "before" and "after" files):


It's been a common problem: Piles of loose resource chunks on the ground, from auto-miners that had been left running for a long while. They were each just about close enough to remain loaded in while at your base. (Tech/chunk/world tile unload happens at around 600 meters away.)

The same amount of resources held in collectors or silos on fixed anchored techs will decrease frame-rate far less, as there have been optimisations for those. Best still to brick them into compressed blocks and throw then in your SCU, of course.

For reference your base was not too big (if just what's shown below). The worst problems are with crafting bases that have a large conveyor system with lots of component factories, etc (when it's trying to craft) or just a lot of resources in silos.


There have sometimes been issues with solar panels on techs with rotating anchors. (And I'm sometimes suspicious of AI cabs on fixed anchored bases, but no evidence there, I know of.)

You know that you can add a player controlled cab to switch to the base techs and save a snapshot of them, right? (If you do want to try temporarily sending them to inventory, in future.)

For now, I suggest you clean up the resource chunks and see how the performance goes. I didn't get too much slowdown from this on my (more powerful) machine (just enough to notice), so I can't be sure. But good luck, and report back either way.;)
And that's why I never use autominers.
 

Adriano

PAYLOAD STUDIOS
May 16, 2016
2,588
1,332
570
38
@Random Unit The guys who posted on here have covered most of the prime reasons for frame rate drops in game. It's difficult to try and offer suggestions to improve it without looking at your save game or a snapshot of your base, but other possibilities might be crafting complex blocks on a large base, as well as having friendly AI turrets with lots of shield/repair bubbles on a rotating anchor.

Also, to clarify to in case people are unaware - TerraTech is not poorly optimised, it's more a case of it cannot be fully optimised until we finish adding content to the game. We try to optimise when we can, but doing a full sweep at this stage of development isn't worthwhile, as adding more content can potentially undo that work. Most games are optimised at the end of the development period. We're still in Early Access, and will be able to optimise the game once we get closer to 1.0

Finally, a pet peeve - what you guys are experiencing isn't "lag", it's a frame rate drop. Lag occurs when playing online, and you have a noticeable delay in what you try to do in game and the server registering those actions, usually due to internet issues. There is no online mode in TerraTech yet, so by default you're having an FPS issue ;)
 

Zed

Well-Known Member
Dec 23, 2016
1,256
1,188
515
40
@Random Unit The guys who posted on here have covered most of the prime reasons for frame rate drops in game. It's difficult to try and offer suggestions to improve it without looking at your save game or a snapshot of your base.
Ok, two news:
Here is the package, it contains the output log and two saves, called "Before Destroy" and "After destroy". The second one has been made when I've destroyed everything at the base and made 10 minutes promenade, mentioned above. The first one has been made right before that.

https://yadi.sk/d/x8HIUFsy3N2AwA
As a courtesy to aide facilitation I have accessed the Yandex hyperlink and included the three files contained therein as attachments to this post.
 

Attachments

ZeroGravitas

Breaker of Games
Jun 29, 2017
3,938
5,751
675
37
UK
www.youtube.com
Finally, a pet peeve - what you guys are experiencing isn't "lag", it's a frame rate drop.
Yes, I'm generally careful to say "FPS drop", or "hang", where appropriate, and OP titled thread correctly, to their credit.:)

But, to be fair, very low frame rate seems to come with substantial input lag and output delay, well beyond the amount of time between frames. Making it virtually impossible to edit a tech, at worst, since clicks don't land anywhere near where they are shown. (My experience from first 0.7.5.0 playthrough with large enemy groups firing, now ameliorated with the dev's removal of the worst offending enemies.)

TerraTech is not poorly optimised, it's more a case of it cannot be fully optimised until we finish adding content to the game.
So it's unoptimised. Or poorly optimised for good reason. Key point being only that it will definitely improve greatly at some point.

I do worry, though (from a fairly naive perspective), that it might be very difficult/impractical to 'optimise' certain things if the game's underlying framework hasn't been written with multi-threading, or such, in mind from the start. (Like trying to fix the foundations underneath a finished house.)

I mean, looking at CPU and GPU usage, it's never that TerraTech wantonly consumes all available processing power; it never appears to max out any thread/core and doesn't go over 50% total CPU usage. Hence I initially assumed it was using a very old version on Unity, without full threading support (which it isn't - it's bang up to date, which is great:)). It's just a bit puzzling, for us players, but I have to trust that Payload's clever coding people have this all in hand.
 

Random Unit

Well-Known Member
Sep 18, 2017
12
21
210
@ZeroGravitas So, I've cleaned up all the resource chunks as you suggested and have to admit it - you were right, the drops have completely disappeared. So I've decided to make some construction works and now I have some tiny refinery complex there


It seems that none of my suggestions were right, oh, well... Anyway I really appreciate all the feedbacks and I'm really glad to see that community here is so responsive.
@Adriano I wasn't blaming your game in poor optimization. It's kinda obvious, that the game which is still in development would be buggy. I just wanted to inform you that I have such problem, because that's the purpose of this board, right? Thanks for your feedback and thanks for this awesome game. Keep up the good work, guys, I really love what you're doing here)
 
Last edited:

ZeroGravitas

Breaker of Games
Jun 29, 2017
3,938
5,751
675
37
UK
www.youtube.com
So I've decided to make some construction works and now I have some tiny refinery complex there
Excellent; I'm glad to hear that's cleared up an issue for you. Keep in mind that your refineries will only function while the area is loaded in (i.e. when you would otherwise get the frame-rate drops). But the auto-miners continue to increment while unloaded, then spew out all the chunks they would have mined when they next come back. Hence it's possible you will find a mess when you return, and have some more temporary FPS degradation.

(Don't see your image, incidentally. Not sure if you attached or embedded it. 1MB limit on attachments. You should be able to edit your post to re-embed, etc.)
 

Random Unit

Well-Known Member
Sep 18, 2017
12
21
210
@ZeroGravitas I think I've fixed the image now. Also I occasionally get Cloudflare's "Bad Gateway" error when I'm using this forum - I know that It's offtop, but I just don't know where exactly should I report about forum problems.
 
  • Like
Reactions: ZeroGravitas

Adriano

PAYLOAD STUDIOS
May 16, 2016
2,588
1,332
570
38
So it's unoptimised. Or poorly optimised for good reason. Key point being only that it will definitely improve greatly at some point.
I prefer the term "partly optimised" ;) As for the rest of what you say regarding multi-threading etc, I'm afraid that's beyond my knowledge base, but like you I have faith in my super awesome workmates that they'll figure it out :)

@Adriano I wasn't blaming your game in poor optimization. It's kinda obvious, that the game which is still in development would be buggy. I just wanted to inform you that I have such problem, because that's the purpose of this board, right? Thanks for your feedback and thanks for this awesome game. Keep up the good work, guys, I really love what you're doing here)
I know that wasn't your intent mate, I just wanted to clarify. On occasion people make comparisons with our game and finished games - "My PC can play GTA V at 2 million FPS, so TerraTech should work too" - but it's not always that simple. And thanks for the kind words, means a lot to us all in the studio when we read that people enjoy our game so much :)

Also I occasionally get Cloudflare's "Bad Gateway" error when I'm using this forum - I know that It's offtop, but I just don't know where exactly should I report about forum problems.
This is a common problem. A lot of my time is spent replying to forum posts, so I get it a lot. It's not an issue on our end, we're waiting to see what can be done about it.