Game stuttering

0 favourites
  • 12 posts
From the Asset Store
Easily generate many levels from a set of pre-built scenes (Construct 3 template)
  • I first noticed this a few days ago when testing on Firefox, but put it down to the FF GC which people have mentioned. I did some optimising anyway even though it was running smoothly at 60fps in Chrome. In particular I removed about 500 objects, but those were on seperate screens anyway and that didn't change anything.

    Since then, I've put more objects in my game and I'm now up to around 1300 objects in total. The majority of these are still on the seperate screens - information screens which run at 60fps and don't require decent fps anyway because they're static. But now my game is starting to stutter on Chrome too (on the arcade screen which only has about 200 objects showing at most) and runs around 55 to 59 fps. The stutter appears to be exactly once per second.

    I've tried testing my latest code additions and disabling them, but it still stutters. The slowest of them takes 0.004 seconds to process but I've set that to process only once per 10 seconds, so it can't be that. I did think that my optimising might be causing this, because I set loads of calculations and other stuff to process once per second, so there's no calculations them BAM, everything calculates on the same pass. But I've changed these to 1.2 seconds, 1.3 seconds or more, to try to get them to process at different times. Still no difference.

    I've also tried disabling each group one by one, but nothing is making a difference. I did disable almost every group and it started to run smoothly again but obviously I can't delete 75% of my game.

    Is there anything else that could be causing this sort of stuttering? Could those 1000 off-screen objects be a problem, even though they're on invisible layers? Is there anything else internal to C2 that might cause this sort of thing?

    I'm afraid I can't supply a capx because my game is over half done and I really don't want to show it yet.

  • I imagine 1000+ objects will cause some slow down on-screen or not.

    Still, something definitely changed recently. I'm not sure if it's r115 or a chrome update (if you're having problems in FF I guess that's not it) or what but my chrome fps counter is showing around 59.6 +/- 6.5 when previewing a blank .capx whereas my game with ~500 objects in a layout used to show around 61.0 +/- 2.5!! Any idea what's going on Ashley ?

  • That's a very good point which I forgot to mention. I upgraded to r115 yesterday and it was yesterday that it started happening.

    And now you mention it, I think I saw a message in the corner of my Chrome today saying that it had auto-updated.

  • I've tried removing all of the objects that I recently added to my game, knocking it back down to 500 objects, along with all of the extra bits of code I've added recently which are all in seperate groups, and the game still stutters quite badly.

    Unfortunately I don't know how to get r114 working now because my game is saved in r115 and won't load back in to r114.

    But something does seem to have changed. Between the update and the Chrome update, I seem to have picked up some very noticeable stuttering :(

  • I don't think we made any major changes that could cause this in r115, so I would guess it's mostly to do with the browser. Have you tried IE9 or IE10? Does it still stutter? What about other computers?

  • I've found IE9 to be really bad, not only does it run very slowly (like 30fps) but it seems to be running in the wrong resolution. Unfortunately I don't have another computer as good as this one to test on. I guess it could be something in the background interfering, like a virus scanner? When it first started, the drive was whirring away for no apparent reason, so maybe something else is happening.

    On the upside, I tried to think of a way of getting rid of some of my objects and managed to trim 300 without affecting my game - infact I think it's probably improved it, so some good will come of this :)

    Is there a way of downgrading to r114 just to test?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • farflamex

    yes, you can download old versions of C2 here:

    scirra.com/construct2/releases

  • I know you can download them, but it won't let me load the game in because it's been saved with r115. Is there a way to get it to load in to r114?

  • Open your .caproj with notepad++ and change

    <saved-with-version>11500</saved-with-version>

    to

    <saved-with-version>11400</saved-with-version>

    Anyway, I don't know about you but testing a blank .capx on numerous machines here resulted in the same ~59 +/- ~6.4 as opposed to the usual ~61 +/- ~2 Weird thing is that the fps starts where it used to be (+/- ~2) and then shoots up to +/- ~6.4 a second or two after.

    I'm trying to find some old chrome builds but it's not easy. I got what I thought was the 2nd latest build but the fps counter is completely different than it's been the past year so..err..

    I'd test this on other browsers but performance is 10x as bad anyway so it's kind of useless.

  • You should back up your project before doing so, though, and probably only do so for testing purposes.

  • Ok, I tried it in r114 and it's still stuttering, so at least it's not that. The Chrome update seems like a possibility, otherwise it's just a coincidence that it started on the same day as the update.

  • The stuttering has mysteriously gone away today. No idea why, if anything, I've added stuff to my game since yesterday, so it looks like it's nothing to do with C2 but something to do with my PC.

    To Tokimson, I found that a blank project ran at a steady 60fps. I tested it yesterday while my game was stuttering, but it ran at 60fps and never changed. So I dunno what's causing that on yours.

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