How do I lock game framerate?

0 favourites
  • 5 posts
From the Asset Store
20 high quality click sounds, ready to improve your game's UI instantly
  • 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?

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • maybe try using deltatime

  • 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.

    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)

  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)