help me with my time deltas (please)

This forum is currently in read-only mode.
From the Asset Store
An educational game for Times Table. An easy to use template for developers to build larger games
  • Surely you don't want to fake slowing down the more objects you have? That's one of the reasons to use TimeDelta in the first place... I'm sure the original question was about slow-motion effects or something!

    actually yes, it makes the hail of bullets easier to navigate.

    you'd have to play one of these games to see what they do..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Been awhile! Time to push my usual grumpy agenda.

    Issues with time delta are, in most cases relatively small. The issue arises at the lower end of the framerate - basically when the frame rate drops from 1-10 under legitimately strenuous conditions. I did a number of posts with examples of this as tested on older machines.

    Currently if you want to make a game that requires exactness there is no perfect answer. I tried to beg up and down for a method that would separate logic updates from graphical updates to insure total consistency at the expense of more processor load (Which in my case I deemed to be fully worthwhile and probably wouid also be good for danmaku shooters and fighting games). Ashley wouldn't do it, citing it as wasteful (is not ;_;) but I believe also because it would stop people form using Delta time. And lets be honest, for most games, Delta Time is what the best choice is and for most people a method like mine would more be a cop-out than a legitimate consideration. We got delta time override which is nice but I think undersupported (I would reaaally still like to be able to check a monitors refresh rate, display FPS(I could of sworn you could but I can't find it right now) and stuff. And being able to change the override indpendant of time scale would be nice too).

    But enough crying about the stuff I wish I had (and still wish I had, to Ashley's chagrin! )

    Anyways, I think a good way to get around your issue would be say.... Not directly use timedelta in your math. Do something like, at the start of every tick, set "global variable whatever" to timedelta. What you can also do in that check is set a minimal 'FPS' speed. If the FPS falls below that number, timedelta won't decrease further. Well it will, but not the actual value you're using. So the game will start slowing time down. If you also set that value to "Timedelta * Timescale" you get all the benefits but also control over minimal frame rate -- and since all the major inconsistencies in game play you might experience only happen on extremely low FPSs, this won't be a problem.

    Also a note about extremely low FPS issues.While a game might run above the threshhold the issue is the tendency for a strained computer to have hangups (run mostly 30 fps, occasionally drop super low for a second etc etc). So realistically speaking anywhere from 20-30 FPS this is a possibility if it happens at the right time. So as long as your 'minimal FPS' is above 30, you should be good. I'd say 60 is a bit too strict. But conversely under this sort of setup you can allow the player the option to choose!

    I'm thinking of using this my self, since the variance at higher FPS is pretty negligible -- within.. oh, 3 pixels at worst? Realistically more like 1.

    Edit: ack. I just realized this wouldn't work for me because I'm dependant on the exact timing of animations. Boo hiss. But it may still work for you!

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