Anyone experiencing slowdown after long playsessions?

Discussion and feedback on Construct 2

Post » Tue Jul 07, 2015 2:49 pm

I am doing playtesting throughout the entire game I'm making. All layouts play smooth when I go straight to it from the main menu, however I've noticed slowdowns (or more like choppyness) when I play the game for more than 40 minutes (give or take 10 min), and play through it all chronologically. The first thing one would think is "oh it's obviously a memory leak", but I don't see any more memory use than normal in my task manager. I rarely stay on the same layout for more than 2-3 minutes at a time, and nothing carries over to the next layout apart from assets that's common between the two. I also tried making hotkeyes for every level and teleport quickly between them to quickly make sure all the assets in the game have been loaded in at some point, still runs smooth. It only really seems to happen after long playsessions.

The worst part is that this seems to be happening completely at random. I've had playsessions on the same computer with the same builds where the slowdown occur. It feels very choppy, almost like an unstable vsync of sorts. Can anyone relate? I'm using the latest stable release of C2 with Node Webkit.

Thanks
B
29
S
9
Posts: 355
Reputation: 2,936

Post » Tue Jul 07, 2015 10:03 pm

Difficult one to analyze :/. I've had occasional choppiness in chrome which (when not caused by old versions of chrome or my events) has turned out to be hidden windows processes causing my game to jank. To test against that, shut down all other programs (even restart your computer, maybe), disconnect it from the internet - and get playing again.... If it happens again then it might be worth taking some objective observations - level name / time in level / what was going on in the game. If you've got a lot of data manipulation going on then a perfect storm of array data management could be causing it, and if you can identify common areas or times then you might be able to identify what the cause is... I don't think I can think of anything else to try...
I only occasionally visit - I'm learning C# for Unity, but c2 is still a respectable game engine imo....
B
73
S
19
G
66
Posts: 2,198
Reputation: 42,188

Post » Sat Oct 24, 2015 7:36 pm

I noticed it is caused by (auto)saving in my game: the more frequent the saves, the sooner the slowdown happens. If i disable the autosaves it seems to never happen.

Seems like at every save the game accumulates some "garbage" which becomes harder and harder to handle as it sedimentates.
B
63
S
22
G
4
Posts: 357
Reputation: 6,503

Post » Sat Oct 24, 2015 7:48 pm

@Danwood Hmm interesting. By auto-save do you mean Localstorage? I recently implemented Klang's save file system, and it definetely stutters. However I'm pretty sure I remember this stuttering being a problem for me long before the save files were implemented.
B
29
S
9
Posts: 355
Reputation: 2,936

Post » Sat Oct 24, 2015 7:55 pm

Do you use any global layers with shaders?
I personally would try removing all shaders in the game to see if it makes a difference.
B
41
S
19
G
65
Posts: 1,085
Reputation: 37,842

Post » Sat Oct 24, 2015 7:59 pm

@Prominent I use a couple layout shaders/effects yes. I can try removing them, but it doesn't make sense to me why there's no issues from the beginning if it could be traced to shaders?
B
29
S
9
Posts: 355
Reputation: 2,936

Post » Sat Oct 24, 2015 8:28 pm

I don't know either, but that is what I would test, especially if the layers are global. Try turning all the shaders off and see if it still gets slow after playing a while.

edit: if there's no slowdowns after testing, try re-enabling one shader at a time and test after each one is enabled until you get the slowdown.
B
41
S
19
G
65
Posts: 1,085
Reputation: 37,842

Post » Sat Oct 24, 2015 9:09 pm

Is there any documentation for how shaders can affect performance long term?
B
29
S
9
Posts: 355
Reputation: 2,936

Post » Sat Oct 24, 2015 10:01 pm

There should not be an increasing slowdown caused by effects over time. If it exists, it is clearly a bug. (even though it seems.. unlikely, the way shaders work).
B
72
S
28
G
32
Posts: 477
Reputation: 19,640

Post » Sat Oct 24, 2015 10:54 pm

Not to mention that the jankyness only occurs on certain versions of Node webkit. If it was the effects it would be a problem all around.
B
29
S
9
Posts: 355
Reputation: 2,936

Next

Return to Construct 2 General

Who is online

Users browsing this forum: Brendan2007 and 2 guests