How do I lock frame rate

Just started using Construct 2? Post your questions here

Post » Sun Mar 13, 2016 11:36 pm

how do I lock my framerate to 15 fps?
yes I want the jerky feel
B
14
S
6
G
1
Posts: 150
Reputation: 1,987

Post » Sun Mar 13, 2016 11:41 pm

There is no way to lower the framerate. It always runs at 60 FPS.
ImageImageImage
B
31
S
19
G
82
Posts: 1,037
Reputation: 46,203

Post » Mon Mar 14, 2016 12:21 am

Short answer:
You can't.

Long answer:
C2 is synced to the screen refresh rate, typically 60fps, and there isn't a way to change it. If you want to get creative you could only move objects every 1/15th of a second to get that effect, but you can't use any movement behaviors.
B
94
S
33
G
117
Posts: 5,387
Reputation: 75,335

Post » Mon Mar 14, 2016 12:23 am

wait I won't be able to use movement behaviors if I run everything into a wait command?
B
14
S
6
G
1
Posts: 150
Reputation: 1,987

Post » Mon Mar 14, 2016 2:40 am

You could randomise timescale every few seconds.
Image ImageImage
B
172
S
50
G
182
Posts: 8,432
Reputation: 115,083

Post » Mon Mar 14, 2016 2:50 am

I don't know how a wait command can be used. Another idea occurred to me, just make a repeat loop to eat up time.

global number time_eater=0

system: compare fps>15
--- add 10000 to time_eater
else
--- subtract 10000 from time_eater

repeat time_eater times
---
B
94
S
33
G
117
Posts: 5,387
Reputation: 75,335

Post » Wed Mar 16, 2016 9:21 am

What about the system action 'set time scale' ? Set it to zero every so many times/second for a given time should emulate the requested effect? Behaviours get there dt from the time scale action.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Wed Apr 06, 2016 12:22 am

thankyou guys
B
14
S
6
G
1
Posts: 150
Reputation: 1,987

Post » Sat Apr 09, 2016 8:43 pm

R0J0hound wrote:I don't know how a wait command can be used. Another idea occurred to me, just make a repeat loop to eat up time.

global number time_eater=0

system: compare fps>15
--- add 10000 to time_eater
else
--- subtract 10000 from time_eater

repeat time_eater times
---


this doesn't work it seems to just slow down every n amount of seconds

99Instances2Go wrote:What about the system action 'set time scale' ? Set it to zero every so many times/second for a given time should emulate the requested effect? Behaviours get there dt from the time scale action.


I suspect this only modifies behaviors correct?
B
14
S
6
G
1
Posts: 150
Reputation: 1,987

Post » Sun Apr 10, 2016 10:12 am

I made an example to look if 30 FPS will save CPU Usage on mobil. Now it locks at 15 not 30 FPS.
Hold mouse button to spawn some sprite, then double click on the blue square for 15FPS, double click again for 60FPS. It only execute in 15FPS the subevents under every x second event.
Have a look:
https://drive.google.com/file/d/0B5FlDY ... sp=sharing
B
24
S
3
G
1
Posts: 454
Reputation: 2,171

Next

Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests