How to set 30 fps in my game?

Get help using Construct 2

Post » Sat Jan 13, 2018 8:03 pm

Hello Friends;
How to set 30 fps in my game?
B
46
S
11
G
1
Posts: 47
Reputation: 5,495

Post » Sat Jan 13, 2018 11:49 pm

Short answer - not possible.
B
17
S
9
G
125
Posts: 1,737
Reputation: 66,795

Post » Sun Jan 14, 2018 9:21 pm

The long answer is you SORT OF can, but it might not be worth it, anyway.

You could put all your events in a group, then add an event outside the group to toggle the group active every tick.

But the behaviors will still run as if it were 60fps, which could cause a lot of unwanted results. You could add events that set movement-related behaviors enabled or not enabled every other tick, and if you double all your behavior variables (max speed, acceleration, etc.), it will be almost the same as a game running at 30fps.

Even then, though, you could have some unintended consequences. This method essentially makes the behaviors act as if the "off" tick takes as long as the "on" tick, and if that's not true, you could have problems.

Finally, all this only affects your game logic. Graphics will still redraw at 60fps, unless you're doing event-controlled rendering, like with R0j0hound's Paster plugin.

The only real reason to make a 30fps game is to save computer resources, and trying to get 30fps in Construct 2 probably won't save much processing power. Construct 2 will always try to run at 60fps, so unless you put in a lot of planning, you'll have one tick of next to nothing happening, followed by one tick of the entire event sheet trying to run. With the movement timing problems that are also likely to occur, getting 30fps in Construct 2 is probably more trouble than it's worth.
Eh, Steve!
B
116
S
54
G
13
Posts: 114
Reputation: 16,185

Post » Mon Jan 15, 2018 2:20 pm

I've found a solution to use at least preview mode;
is to use afterburn + rivaturner + Nw.js
The result can be seen in this video that I recorded:
https://www.youtube.com/watch?v=HTU1YE47nvg&t=41s
*But the ideal would be to set fps in the game!
B
46
S
11
G
1
Posts: 47
Reputation: 5,495

Post » Mon Jan 15, 2018 2:48 pm

Please read the previous comment, calebbennetts explained it very well.
All you can do is skip some frames or artificially slow down the game, but it's not the same as locking fps at 30.
B
17
S
9
G
125
Posts: 1,737
Reputation: 66,795

Post » Mon Jan 15, 2018 2:55 pm

@dop2000 Apparently in preview mode it worked, gpu renders only the amount of frames that I want
B
46
S
11
G
1
Posts: 47
Reputation: 5,495

Post » Mon Jan 15, 2018 3:01 pm

Double the timescale. Same effect.
Image ImageImage
B
173
S
50
G
194
Posts: 8,562
Reputation: 121,360

Post » Mon Jan 15, 2018 3:27 pm

It only worked because you are using a third party tool (rivatuner).
B
17
S
9
G
125
Posts: 1,737
Reputation: 66,795

Post » Mon Jan 15, 2018 7:17 pm

There's a Chrome issue for this: https://bugs.chromium.org/p/chromium/issues/detail?id=485600

Star the issue to vote on it and follow any updates.
Scirra Founder
B
408
S
242
G
92
Posts: 24,888
Reputation: 198,582

Post » Sun Jan 28, 2018 8:22 pm

Thanks friends, I apparently succeeded using some binaries and .bat:

I found the solution in NW.js, I was also able to change the monitor's native resolution and turn off V-sync;

References:

* The Big NW.js
updated-11-12-2017-the-big-nw-js-roundup-tips-amp-tricks_t184449

* --limit-fps = 30
https://www.scirra.com/tutorials/9624/l ... -to-60-fps

* NW.js Flag list
https://peter.sh/experiments/chromium-c ... ound-color

* Change monitor resolution - QRes.exe
http://www.softpedia.com/get/Multimedia ... QRes.shtml
B
46
S
11
G
1
Posts: 47
Reputation: 5,495


Return to How do I....?

Who is online

Users browsing this forum: nintendogeek01 and 21 guests