Is there a way to cap fps to 30?

Discussion and feedback on Construct 2

Post » Wed Mar 30, 2016 10:11 pm

I think that would improve performance on some weaker rigs, can i do it with C2?
B
63
S
22
G
4
Posts: 357
Reputation: 6,503

Post » Wed Mar 30, 2016 10:16 pm

Start of layout, system set timescale to 0.5
Image ImageImage
B
168
S
50
G
163
Posts: 8,224
Reputation: 105,067

Post » Wed Mar 30, 2016 10:24 pm

But i don't want the whole game to slow down xD
B
63
S
22
G
4
Posts: 357
Reputation: 6,503

Post » Wed Mar 30, 2016 10:34 pm

As close you can get.
Limiting the amount of frames drawn will only help the gpu.
The biggest bottleneck is cpu.
Image ImageImage
B
168
S
50
G
163
Posts: 8,224
Reputation: 105,067

Post » Thu Mar 31, 2016 3:47 am

viewtopic.php?f=146&t=168890&p=1016456

I recently asked the same thing.

It turns out it's an engine limitation due to requiring browser rendering engines which implement vsync, so the game runs at whatever speed the display refresh is at.

So for the meantime, cannot be done.

Basically just know the limits, when you make bigger games, the CPU becomes the bottleneck as its processing all your JS code 60 times per second. Optimize, and more optimizations!

How I approached my game is to limit cpuutilization to ~50% max (it measures CPU usage for the main game logic thread, single threaded bound). On my Intel i5-3570K, that means I am reaching 50% of the main thread. I can push it higher, going to 99% and the game starts to slow down. But 50% is a good target, because it means other CPUs that are much weaker, will be capable of sustaining 60 fps. I ended up with players on C2D PCs from 2006 with crap Intel graphics able to run the game fluid. :)
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,614

Post » Thu Mar 31, 2016 6:43 am

Silverforce wrote:How I approached my game is to limit cpuutilization to ~50% max (it measures CPU usage for the main game logic thread, single threaded bound). On my Intel i5-3570K, that means I am reaching 50% of the main thread. I can push it higher, going to 99% and the game starts to slow down. But 50% is a good target, because it means other CPUs that are much weaker, will be capable of sustaining 60 fps. I ended up with players on C2D PCs from 2006 with crap Intel graphics able to run the game fluid. :)

That's a great idea, thanks.
B
127
S
33
G
17
Posts: 1,551
Reputation: 20,463

Post » Thu Mar 31, 2016 10:54 am

This would need support from the browser - star this issue to vote/follow updates on it.
Scirra Founder
B
387
S
230
G
87
Posts: 24,249
Reputation: 192,240

Post » Thu Mar 31, 2016 12:51 pm

Thanks for the clafirifcation, i'm very optimistic, as the technology is evolving very fast!
B
63
S
22
G
4
Posts: 357
Reputation: 6,503


Return to Construct 2 General

Who is online

Users browsing this forum: Cliffu and 12 guests