Game stuttering

Discussion and feedback on Construct 2

Post » Tue Jan 15, 2013 10:56 pm

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.
B
25
S
5
G
3
Posts: 446
Reputation: 5,633

Post » Tue Jan 15, 2013 11:26 pm

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 ?Tokinsom2013-01-15 23:28:17
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024

Post » Tue Jan 15, 2013 11:43 pm

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.farflamex2013-01-15 23:44:13
B
25
S
5
G
3
Posts: 446
Reputation: 5,633

Post » Wed Jan 16, 2013 10:00 am

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 :(
B
25
S
5
G
3
Posts: 446
Reputation: 5,633

Post » Wed Jan 16, 2013 2:27 pm

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?
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Wed Jan 16, 2013 5:15 pm

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?
B
25
S
5
G
3
Posts: 446
Reputation: 5,633

Post » Wed Jan 16, 2013 6:26 pm

@farflamex

yes, you can download old versions of C2 here:
https://www.scirra.com/construct2/releases
B
106
S
35
G
37
Posts: 798
Reputation: 25,215

Post » Wed Jan 16, 2013 6:50 pm

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?
B
25
S
5
G
3
Posts: 446
Reputation: 5,633

Post » Wed Jan 16, 2013 8:19 pm

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.Tokinsom2013-01-16 20:44:17
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024

Post » Wed Jan 16, 2013 8:37 pm

You should back up your project before doing so, though, and probably only do so for testing purposes.
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,432

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 15 guests