Limiting the Frame Rate

Get help using Construct 2

Post » Thu May 09, 2013 11:41 pm

Has anyone figured out how to limit the frame rate yet?

Yes, I know all the reasons why I shouldn't but it is going to be used for an effect.

Thank you,
Stephen
B
50
S
14
G
12
Posts: 813
Reputation: 16,764

Post » Thu May 09, 2013 11:58 pm

Haven't tried this myself, but if you're trying to limit the frame rate for effect purposes, then you might be able to accomplish a psudo-limited with the timescale option. Like:

If you're trying to halve the frame. Have a counter that changes from 1 to 0 (Or vise versa) every frame.

Set the time scale to 2 on 1's and 0 on 0's.

Basically, nothing happens on half the frames and twice as much happens on the others. Provided you've been using dt in the correct places.

You may be able to find a way to limit event sheets to every other frame doing something similar, but this I wouldn't recommend. In fact, I wouldn't recommend any of this to be honest.
-----
The other option I can think of would be even more unstable, but you could make "cpu stressor" that would start adding junk to a scene if the frame rate was too high and delete it if it got too low.

EDIT: Just realized halfway through putting together a quick example of the first, that it would be frame skipping not limiting. Anyway, here you go: https://dl.dropboxusercontent.com/u/10316081/Construct/FrameSkip/frameskip.capxYarfapet2013-05-10 00:11:19
B
51
S
10
G
7
Posts: 184
Reputation: 6,825

Post » Fri May 10, 2013 12:18 am

If you're going to slow down things, as long as your game is framerate independent you can reduce the timescale to slow things down.

https://www.scirra.com/tutorials/67/delta-time-and-framerate-independenceThndr2013-05-10 00:18:29
B
15
S
4
G
4
Posts: 294
Reputation: 3,225


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, anty21ro, badmoodtaylor and 15 guests