Anyone experiencing slowdown after long playsessions?

  • 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

  • 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 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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.

  • 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?

  • 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.

  • Is there any documentation for how shaders can affect performance long term?

  • 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).

  • 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.

  • You'll need to actually test things out for yourself instead of speculating. I doubt you'll receive any concrete info from this forum regarding your issue you're having since nobody can test it for you. Have you tested your game on different hardware?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)