framerate below 60

0 favourites
  • 14 posts
From the Asset Store
Set of 60 cursors. All icons are of a high quality. A good choice for RPG game.
  • How do i set the frame rate below 60? like 30, for example.

    thx

  • Put in your program big bad loops that slows the runtime ?

    On a more serious note, why would you do so ? It will lag on the screen.

  • Some people will not be able to run my game at 60fps. Then, to avoid slowdowns, I want to set the fps at 30 by default.

    is this possible?

  • If you program your game to where all time dependent actions - movement, timers, etc. - use delta time, you shouldn't have any issues. That will ensure that your game runs at the same speed regardless of frame rate.

    If that's not acceptable, I don't believe there's a way to lock the framerate.

  • The best practice in this field is to make your game framerate independant, as you cannot manage every type of computer. This tutorial can show you how to do it.

    This way, people with low config won't suffer from it playing your game, and people with higher will enjoy it too.

    If you still want to slow down the rendering, I'm not sure there is a way. It would be in the project properties I think, and I can't see anything like this.

    Edit : ninja'd ^^

  • hehe thnks every1 ^^

    I have to learn much more about dt... so, let's read :)

  • Bumping this. Is there really NO way to lower the framerate, and cap it?

    I need this for aesthetic and design reasons. If you try to emulate a system you need to frameskip and emulate choppiness too.

    This is quite important to me =\

  • notnsane The feature was added to a beta version of construct a few releases ago, and then removed because it wasn't really helping like people thought it would. I'm sure if you really need it someone on here still has a copy of the beta and would probably send it to you.

  • impossible to slow the FPS processing. Ashley can't/won't apply an advanced FPS controller. Ashley has a strong opinion that there should never be a reason to slow the renderer, but there may be limitations within the browser environment itself.

    The best you can do is swap the your own logic of thinking to do this. Instead of running your game logic update nativly you can in stead update your game logic using X seconds.

    so if you know that 60fps is apx every 0.16 seconds. Then

    On Every 0.32 seconds(every 30fps)

    -- do logic

    however this will require you to do a lot of custom logic and redifine the numerous behaviours move X persecond values.

    so then you could do something along the lines

    var fps_slow = 0.32

    Every fps_slow + (numberofsprites on scree / 40)

    that way you can try to mimic the slower aspects of having more objects on the screen.

    The other option as some one mentioned. Use a loop to lock the. personally though I don't like that and it feels sloppy.

    Burvey

    It wasn't working the way expected because it was a quick hacky version. Ashley mentioned that he feels it's not worth writing a more complicated FPS controller.

  • There's actually a simpler method to fake reducing the framerate. Set the 'clear background' property to no, then add to a variable 1 each tick. When the variable is above the desired threshold (5 for example to make the effect obvious), make all the layers visible for one tick.

    Every tick

    • add 1 to variable

    If variable = 5

    • make all layers visible
    • set variable to 0

    Else

    • make all layers invisible

    Using this method, you don't have to recode anything, but this will only work on platforms that don't automatically clear the screen regardless of c2's setting, though (I seem to recall there is a platform that ignores it), and needs the background to be completely obscured otherwise you'll get smearing effects.

    Also, jayderyu - don't use a condition checking if a variable equals a float/decimal - use integers instead. Because of rounding errors, floats cannot be relied on to be exact, they are very often off by a tiny amount and so the condition won't run.

  • Yeah, so if there wasn't any native option I was thinking about somehow refreshing the screen way slower =P

    Will test soon(tm). Thanks for the logic ;)

  • Wow, nice trick Arima, works well. Thanks a lot

    Not sure if I actually want to use it in my oldschool looking game, but I just put those events in a group and decide to turn it on or off

  • On a side not C2's runtime will only redraw the screen if something visually changes. So you can carefully setup your events so things only change every 1/30 seconds. Of course as jayderyu mentioned it wouldn't really work with behaviors.

    EDIT:

    To add on to Arima's method you can use events like this:

    Every 1/30 seconds

    • make all layers visible

    Else

    • make all layers invisible
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ah yes indeed, even better. I idn't know you could attach an 'else' to this kind or event

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