How do I lock frame rate

0 favourites
From the Asset Store
Selection frame like in RTS games, works both on mobile and desktop devices.
  • It needs support from the browser to do it properly. Star this issue for support in Chrome: https://bugs.chromium.org/p/chromium/issues/detail?id=522983

    I would *strongly* discourage you from spin-looping with an event. This is the very most obnoxious waste of battery life, spins up fans loudly on laptops, and will bog down the whole system unnecessarily.

    BTW, even if properly supported, it wouldn't target specific framerates like 15 FPS - it would be "quarter v-sync mode" instead. If you're on an 80 Hz display it would go 20 FPS instead of 15, which is probably better anyway, since if the framerate isn't an integer fraction of the refresh rate you'll get an uneven refresh pattern which usually looks pretty bad.

  • hmm well what I'm trying to accomplish is choppyish movement, kinda like a grid.

    I know I can wrap all my movement code in a wait statement but this wouldn't work with behaviors like path finding

    also how do I star the issue?

  • I can't help but feel that there may be another way to do what you want, since capping to a lower framerate is either impossible or very difficult to accomplish without an enormous amount of nonsense. What exactly do you mean by "choppyish movement, kinda like a grid"? Exactly why do you need the game to look 15fps? Do you have any example videos of something you'd like it to look like? I'm wondering if we might be able to come up with some kind of completely different method that doesn't involve framerates at all.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I recommend you just roll up your sleeves and do the work of remaking the behaviors you need as events, with the every x seconds condition.

    That said, a workaround is to use an invisible placeholder sprite (seems to apply to a lot of problems). Have this invisible sprite run behaviors as normal, smoothly. Set your visible sprite to the placeholders sprite's position every 0.25 seconds.

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