Low FPS in C2 games is more crippling than it should be?

Discussion and feedback on Construct 2

Post » Sat Sep 27, 2014 12:21 am

Hey all,

So something I've been noticing in my game is that when C2 is reporting framerates lower than 60fps, the game becomes crippled extremely quickly. Any framerate below 45fps severely hampers gameplay, and 30fps is completely unplayable.

Why the heck is this? Plenty of games pull off ~30fps completely fine, but for some reason, C2 games simply cannot cope. Is this a HTML5 thing?

I wish I could provide a more concrete example but since there's no way to manually throttle FPS in C2 I don't see a way to do it.

Am I the only one who notices this? Can anyone else with a fast-paced game confirm this?
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,679

Post » Sat Sep 27, 2014 12:39 am

Yeah, same here. On my PC and on my galaxy S3 (via crosswalk), when game run between 40-60fps it runs perfectly fine and smooth. But below that it's usually unplayable, it basically turn into a stop-motion animation with zero interaction from a player :/
ImageImageImageImage
B
157
S
65
G
41
Posts: 2,594
Reputation: 34,748

Post » Sat Sep 27, 2014 12:45 am

I noticed any fps below 45 causes the dt to produce less smootth results. I have no idea why that happens. dt is just a difference between last time and this time in a usable form. I have no problem in Unity's dt or using JS or Java custom dt. But C2's just goes herky jerky. I'm wondering if the dt is linked to the browser refresh hz.

I don't have excellent examples.
B
90
S
18
G
9
Posts: 2,455
Reputation: 15,013

Post » Sat Sep 27, 2014 5:31 am

I think you should be able to dynamically throttle the refresh rate by checking the fps and running a loop checking collisions x number of times, increasing x until you get to the fps you want.
Moderator
B
94
S
33
G
33
Posts: 3,006
Reputation: 27,744

Post » Sat Sep 27, 2014 1:26 pm

@Arima yeah, that could work, but by the replies on this thread it seems like it is a well-acknowledged problem. Do you get this issue in your games?
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,679

Post » Sat Sep 27, 2014 1:28 pm

I wonder if this has any relation to the fact C2 is locked to 60 as an upper limit?
B
57
S
19
G
9
Posts: 639
Reputation: 9,533

Post » Sat Sep 27, 2014 2:01 pm

I know this issue very well.
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
86
S
28
G
21
Posts: 1,981
Reputation: 19,316

Post » Sat Sep 27, 2014 2:08 pm

@Ashley reckon we could get a comment on this? Is this something fixable?
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,679

Post » Sat Sep 27, 2014 2:44 pm

I haven't noticed it myself, but I don't run many benchmarks that come in under 45 FPS. I'd guess it's to do with how browsers schedule requestAnimationFrame when frames take longer than 16ms to process. Then you get in to a difficult problem of trying to synchronise frames which take, say, 22ms to process, against 16ms screen redraws. I guess in some cases the browser will do it badly and produce irregular frame updates. Regular frame updates look OK, such as 30 fps done by draw - skip - draw - skip - draw - skip. But if it falls to something irregular and it's doing something like draw - skip - draw - draw - skip - draw - skip - skip - draw, then I guess that could look really bad (since it's visually unpredictable so it's harder to follow with your eye).

This probably varies from browser to browser and could depend on the OS/underlying graphics API too. Is it the same across Chrome/Firefox/IE/Safari on Windows/Mac/Linux/mobile?
Scirra Founder
B
387
S
230
G
88
Posts: 24,251
Reputation: 192,464

Post » Sat Sep 27, 2014 9:35 pm

OK, so I've gone and created a test project using @Arima's suggestion.

Initially I just did the collision check method as Arima said, but when I tested it I noticed that at 30fps the game was pretty much fine.

So, I tried creating lag by a different method (rendering lots of 1% opacity rectangles) and immediately the difference was super obvious. There's significant input delay when the lag is on the GPU side.

Can anyone confirm? (Capx attached)
You do not have the required permissions to view the files attached to this post.
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,679

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 2 guests