How do I lock game framerate?

Get help using Construct 2

Post » Sun Oct 25, 2015 12:51 pm

So I've finished one of my games and it's been playing fine for most people. However, since I've recently temporarily switched back to my 120hz monitor, I decided to try my game whilst using it - and it's unplayable. Half of the things in-game are at double speed, and another half are not. There's some timed points where you literally no longer have enough time to complete, which results in the game being impossible about half way through.

So, my question: Is there any way to lock the framerate within Construct 2 for exporting projects? If not, how would I go about fixing this for different refresh rates?
B
3
Posts: 6
Reputation: 187

Post » Sun Oct 25, 2015 1:35 pm

Not sure exactly what you are looking for but this might be helpful:
https://www.scirra.com/tutorials/67/del ... dependence

There is a target frame rate setting too, but I dont think that will lock your frame-rate.

Be verry careful when you do this. Especially if you are thinking of selling on steam. There are verry high profile people who will trash your game if it is not to their expectations:
http://store.steampowered.com/curator/9 ... te-Police/

I subscribe to them, and they let me know right before I buy a game if it is frame-rate locked.
B
29
S
8
G
4
Posts: 767
Reputation: 5,985

Post » Sun Oct 25, 2015 7:21 pm

maybe try using deltatime
B
28
S
6
G
2
Posts: 86
Reputation: 3,267

Post » Sun Oct 25, 2015 8:13 pm

Thanks for both of your replies, I looked into how Delta Time worked and came up with a different solution - I changed most "every tick" events to "every 0.0167 seconds", which is near enough 60fps translated for any refresh rate. This is nice because I can now do the same to my older games, which I had designed whilst only using a 120hz monitor, and are most likely partially in slow-motion for 60hz monitors.

jojoe wrote:Be verry careful when you do this. Especially if you are thinking of selling on steam. There are verry high profile people who will trash your game if it is not to their expectations:
http://store.steampowered.com/curator/9 ... te-Police/


Don't worry, I'm not this stupid. I don't sell anything on Steam that I make and if I did, that's the last thing I'd do. I can't play FPS games in anything under 100fps on a 120hz+ monitor, and I hate games that are even locked to 60fps for the most part. (I used to watch TB too ;D)
B
3
Posts: 6
Reputation: 187

Post » Mon Oct 26, 2015 12:38 pm

Technically, that is the wrong solution: you should make sure delta-time (dt) is used correctly everywhere in the game. That has many other benefits including ensuring gameplay is consistent on slower machines that can't reach 60 FPS, and is also necessary for timescaling to work. Also the game will be silky smooth on 120 Hz monitors, instead of faking a 60 FPS update on a monitor which is capable of better.
Scirra Founder
B
395
S
232
G
88
Posts: 24,371
Reputation: 193,762


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, David181 and 10 guests