Browser Updates Compromising Performance?

  • Hello,

    I have a game I released on itch a few months ago. At the time the game ran very well. Now I notice if I play the game I get significant FPS slowdown after about 10 mins with it. This wasn't an issue before and I haven't updated the game since I released it. I see the slowdown on both my work machine and also my home machine.

    https://mgfm.itch.io/darbohra

    Has anyone else noticed similar things happening? I have another game Brute which I released on Steam which works well but when I made a browser version I found similar behavior where after a few mins the game would run slower and slower, as if there's a memory leak. The Steam desktop version runs fine. This is the same with Darbohra linked above.

    Is it possible that browser updates can effect the performance of a game?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Can't help you. The link you provided promptly crashed trying to load with a google sad face trying to load it into Chrome. Reloading the page, it politely told me it wasn't designed to run on my device.

  • What device are you running? I'm just using Chrome here on a PC.

  • Just chrome on a pc.

    And, for whatever reason, it crashes on my desktop but runs on the laptop. Both are using the same version of Chrome.

  • And on the laptop, I played for a good bit and didn't see any perceptible speed decrease or increase in memory use.

  • Hmm, maybe it’s my version of Chrome, thanks for testing.

    Mick

  • CrudeMik

    I would run the game in debug mode and see if you are adding more and more objects (bullets, or enemies, or loot, etc.) I bet something is building up in the background that isn't visually obvious.

  • Quite possibly though, why would this show up in the browser for me now and not when I made the game several months ago when i was testing this same itch build to death.

    Thanks for the reply :)

  • It might depend on how long you play, what other tabs are open, what extensions are active, what order things happen in the game. It could be that some change in Chrome made the issue more obvious now for some reason, or something else on your computer changed.

    pretty much every time I have looked into an issue like this, it was because I (or someone else) forgot to destroy explosion instances, or millions of bullets were flying off to infinity, or particle instances were adding up, or some condition was true that continuously spawned an object, and the increased number of objects was bogging down collision checks, etc...

  • If you're running Chrome, hit f12 while viewing your project. In particular, check the 'performance' tab. Chrome can profile your game and give you a chart showing it's memory usage. If you click on the memory tab, it'll actually tell you whether your project using more or less memory over a set time period.

  • So I realised my Chrome was out of date, I updated it and it runs perfectly fine now. Did some debugging and can't find any performance issues with it in editor or through chrome.

  • Good to hear. I double checked this morning on the desktop and it's still crashing with a google sad face. Because it's running in an iframe it wasn't giving any errors so, I tried reloading it as full screen and got this error:

    Uncaught (in promise) DOMException

    Some quick googling tells me that this may be related to the audio and the fact that it's running in an iframe and you're forcing it to auto play that audio. Google changed the way it worked last year:

    https://developers.google.com/web/updates/2017/09/autoplay-policy-changes

    Now, why this works on my laptop and not the desktop, I have no idea. I did test it in Edge on the desktop and it loaded just fine so I'm guessing it's not a hardware issue.

    One thing I've done in my code to combat this is to put a 'click to play' on my loader screen. Chrome is now requiring interaction from the user before playing audio.

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