help me with my time deltas (please)

For questions about using Classic.

Post » Tue Oct 07, 2008 5:43 pm

[quote="work3":1vfhxpdm]hmm, well, I guess that's like some who likes britney spears listening to some death metal and asking how anyone can listen to that, it's preference.[/quote:1vfhxpdm]
This is Pacman

And this is Pacman: Extreme!

See the difference? :wink:
Posts: 719
Reputation: 2,938

Post » Wed Oct 08, 2008 4:00 pm

[quote="Ashley":3iiijrh4]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![/quote:3iiijrh4]

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..
Posts: 219
Reputation: 3,603

Post » Fri Oct 10, 2008 3:46 am

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! :P)

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!
Posts: 239
Reputation: 2,428


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest