[suggestion] option to let dt get larger than 0.1

0 favourites
  • 11 posts
From the Asset Store
Who wants to be a Millionaire Clone. An educational coding source
  • Hey

    As the title says, would be good if there was an option in project properties that you could allow C2 to let dt get larger than 0.1 (below 10FPS)

    This is important to games that you don't want to ppl cheat by lowering their overall FPS and make the game run slow for a specific purpose, in my case my game have player turns, so let's say the turn have 30 seconds and someone with a very low fps like 5 is playing, their turn will have more than 30 seconds, would be unfair.

    Again, my suggestion is only to add the option, if the developer want to activate it then he may have the choice.

  • 30 seconds is 30 seconds, how lowering FPS would impact on that ?

    Instead your player would just have less effective time (frames) to perform its actions.

    That's the interest of dt, to make up for the difference of FPS between computers.

  • 30 seconds is 30 seconds, how lowering FPS would impact on that ?

    Instead your player would just have less effective time (frames) to perform its actions.

    That's the interest of dt, to make up for the difference of FPS between computers.

    scirra.com/tutorials/67/delta-time-and-framerate-independence/page-1

    read the part of 'Minimum framerate' ;)

    you can also test for yourself, if you have a mobile that isn't powerful enough you can preview your game on the mobile and if it runs below 10fps then the time will take longer to complete a 'real' 30 seconds.

  • > 30 seconds is 30 seconds, how lowering FPS would impact on that ?

    > Instead your player would just have less effective time (frames) to perform its actions.

    >

    > That's the interest of dt, to make up for the difference of FPS between computers.

    >

    http://www.scirra.com/tutorials/67/delta-time-and-framerate-independence/page-1

    read the part of 'Minimum framerate' ;)

    you can also test for yourself, if you have a mobile that isn't powerful enough you can preview your game on the mobile and if it runs below 10fps then the time will take longer to complete a 'real' 30 seconds.

    Wow, you are absolutely correct!

    We do in fact need a way to unlock dt so it can be bigger than 0.1!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I don't have a mobile to test this.

    But wouldn't the use of the condition "every X seconds" still work in that case ?

    If you want your turn to be 30 seconds long, use a "Every 30 seconds" event.

    At worst try "Every 1 second" to add 1 to a global variable. When its value is equal 30, you have your 30 seconds. (or whatever time you want/need)

    Once again I can't test this by myself to see if a "bloated" mobile acts as I would expect or as you described.

    You could also use your own manual dt, testing the FPS value each tick, and "creating" your own dt variable to add to the timer.

    There are some workarounds possible I hope.

    Ashley, your thoughts ?

  • I don't have a mobile to test this.

    But wouldn't the use of the condition "every X seconds" still work in that case ?

    If you want your turn to be 30 seconds long, use a "Every 30 seconds" event.

    At worst try "Every 1 second" to add 1 to a global variable. When its value is equal 30, you have your 30 seconds. (or whatever time you want/need)

    Once again I can't test this by myself to see if a "bloated" mobile acts as I would expect or as you described.

    You could also use your own manual dt, testing the FPS value each tick, and "creating" your own dt variable to add to the timer.

    There are some workarounds possible I hope.

    Ashley, your thoughts ?

    Nope it wont work because the game will run in 'slow motion' below 10FPS, so if you use an action like every 10 seconds, it will trigger after more than 10 seconds because the dt can't get bigger than 0.1(10FPS)

    Please take a look at the link I sent above that explains the minimum framerate and you will understand ;)

    You also suggested to use every 1 second to add 1 value to a global variable. Also that won't work because it wont trigger at 1 second the action, because the game is running in slowmotion the action will trigger after more than 1 second and then the global variable wont increase every second.

    Hope you understand ;)

  • Games with values of dt above 0.1 tend to become unstable. Everything is stepping so far often collisions are missed and the player can effectively teleport around.

    So how does it help prevent cheating to allow this? It seems like it will make cheating worse. Set your FPS to 1 while running towards a wall and you can teleport through it. However with the current design, you would probably still bump in to it.

    A better way to handle this would be to require a minimum FPS of 15 or something, and don't allow scores to be registered for them. Or keep separate scoreboards for slow devices and fast devices based on average FPS - you don't want to annoy or blame users who just legitimately have very slow systems.

  • Hmm.. you gave a good idea, check if the player runs above 10FPS, if not, the game is closed, or something like that.

    might try that.

    Still, I think it is a nice idea to add the option, so it's the developer choice if he want to allow DT to become higher than 0.1 or not. For games that doesn't involve movements and are time-based with static sprites that would be very welcome.

    I don't know if it would be hard to you to add that option, if it's an easy thing to implement, then why not?

    thanks ;)

  • You can use the wallclocktime expression to measure the time passed. It's unaffected by the fps.

    global number end_time

    start of layout:

    -set end_time to wallclocktime+30

    end_time <= wallclocktime

    • do stuff
  • I don't think there's a convincing use case for allowing dt to go above 0.1. Most games become unstable and unplayable. Why would it be welcome in certain games?

  • Ashley

    Well as I said games that are time-based and doesn't use a lot of movements, many static sprites, etc. Games that you need to make sure the time is exact for everyone.. that depend's on the game type.. in my case for example I think that would be welcome.

    Another thing, how to solve the problem to make the game keep always running? Because when the windows lose focus the game stop. Would be good if there was an option to allow the game always run..

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