Delta Time System General Discussion

Hi, I started a discussion about the delta time system in my profile.
Was such good discussion that the best way was to create a topic for that.

To take a better advantage on this, I´m creating this topic so we can group all the information.

So if you have any good article, GML implementation, extension or questions related to it, post it here.

I´m pasting the past conversation that started this topic.
 
Felipe Rybakovas After read a lot about the subject (Forums, Tutorials, Wiki) I really Cant decide if I should go or not with DELTA TIME in Studio 1.4. Help?
Today at 12:36 PMEditDeleteReport
Comment

  1. Felipe Rybakovas
    I mean... Even though it would have better control of the FPS and the Game in general(And also performance boost)... I Would need to work a lot with the current engine state to make it run correctly. This time spent on it is well worth ?

    I'm almost refactoring the entire project so... Maybe this is the time to ask this...
    Today at 12:40 PM Edit Delete Report

  2. Felipe Rybakovas The game is an isometric ARPG with Twin-Stick controls and currently the game is running 60fps on the majority of machines specs...
    Today at 12:41 PM Edit Delete Report


  3. Fel666
    Idk. All my projects start with delta time because I love it
    Today at 12:46 PM Delete Report
    Like

  4. Felipe Rybakovas Can you explain the majority of the pain points to implement that on 1.4 studio ? Like for example... Most difficult in-built engine functions to be tweaked for delta time... Thanks in advance!
    Today at 12:49 PM Edit Delete Report


  5. Fel666 just dont use vspeed, hespeed, etc.
    Also dont need to always use delta_time variable.
    I like to store start time, subtract it from current time and use that to lerp between two values.

    really its all about starting with a good base. Retrofiting a game for delta time is a nightmare.
    Today at 12:50 PM Delete Report
    Like
    Blackened likes this.

  6. Felipe Rybakovas Yes, I can imagine how much.

    But the idea came by because I decided to refactor the entire project. The project started as a prototype to GML learning... so you can imagine the mess that it's.

    Now that I've more knowledge on how to use properly the engine and have the final version of the design, this idea on use the delta time come again...
    Today at 12:54 PM Edit Delete Report


  7. Felipe Rybakovas But when I started to read about... In resume I saw that mostly of what gamemaker gives to you use, you will need to ignore and built your own using delta time (since the engine is related to the steps system)... So this is my worry here... How much time I would spent just to have the delta time system right to the game.
    Today at 12:56 PM Edit Delete Report


  8. Felipe Rybakovas @Fel666 , you would recommend the TMC Mojo Delta Time extension??? If it would save me time to code this I think I would take it
    Today at 1:07 PM Edit Delete Report


  9. Jobo
    If your minimum spec machine runs it at 55+ FPS targeting 60 then it's not super important... If you're targeting mobile devices you'll surely need it regardless of what you've tested on. It's nice to see cost-benefit analysis being applied here - people too often forget about that, and it's one of the most important skills to have in the games industry.
    Today at 1:09 PM Delete Report
    Unlike
    You and Blackened like this.

  10. Fel666 I never tired TMC mojo delta time. And I have no idea what it could do without it removing all flexibility...
    Today at 1:10 PM Delete Report
    Unlike
    You like this.

  11. Felipe Rybakovas @Jobo , thanks for the simple opinion. Im not really aiming the mobile and even though I suffered a little bit to achieve the 1080p60fps, now this is stable(even for IntelHD4000 graphics specs machines ), but I'm worried if the project progress when content start to come in bulk.
    Today at 1:12 PM Edit Delete Report


  12. Felipe Rybakovas The other thing that really pick my attention here it's that I was planning to have some kind of bullet time effect. But in the end, implement delta time just for that dont see reasonable
    Today at 1:13 PM Edit Delete Report


  13. Felipe Rybakovas Thanks for your opinion on the subject @Fel666 ! =)
    Today at 1:15 PM Edit Delete Report


  14. Jobo If you want to do time effects (slow down, speed up) then that's essentially delta time anyway - then you might as well bite the bullet and do it. Then your time effect is just a multiplier on the delta time. Want the game half the pace? Half delta time. Twice as fast? Double delta time. That will be the best option in the long run.
    Today at 1:28 PM Delete Report
    Like


  15. jo-thijs
    If you're not using delta time, you should still ignore the movement and half the collision system GameMaker provides in favor of your own.
    I usually advocate against using delta time systems, but in your case it might be the better option.
    ARPG's go pretty well with delta time.
    Your bullet view feature will get implemented easily.
    turning back from delta time is easier than the other way around.
    Today at 1:47 PM Delete Report
    Like


  16. jo-thijs Just be sure to not have too much duplicate code.
    Organize these systems in scripts.
    Try delta time for a bit and see if it works out and keep a backup for in the other case.
    Today at 1:48 PM Delete Report
    Like


  17. Fel666 btw, if you are making an action game, I suggest using a fixed step delta timing solution, Where you basically still slice up your game in steps, but every frame, you see how many of those steps will fit. I like to have around 300 steps per second. (If you need it butter smooth you can still interpolate or extrapolate).
    Today at 1:57 PM Delete Report
    Like


  18. Fel666 Advantage of using the fixed step delta timing is that you get far better stability, your game really will play the same at any frame rate (ignoring input lag). Also much easier to resolve collisions, etc.
    Today at 1:58 PM Delete Report
    Like


  19. jo-thijs @Felipe Rybakovas, I forgot to say, I found it is often a pain point when using delta time systems to get collisions right and movement consistent.
    For example, updating speed and then updating position without factoring in the change in speed over an interval will cause inconsistencies.
    Today at 2:22 PM Delete Report
    Like


  20. jo-thijs @Fel666, do you actually attept to calculate 300 individual steps per second or do you just kind of discretise the delta_time values, calculating all passed steps inbetween frames at once?
    Today at 2:23 PM Delete Report
    Like


  21. Fel666 I calculate individual steps. I havent really tried this in gamemaker, but its what i use in other frameworks, especially when using frameworks like box 2d or bullet physics to ensure super stable simulations.
    Today at 2:26 PM Delete Report
    Like


  22. jo-thijs That sounds like it would work well with a bunch of projects, but it also sounds like it'd be calculatory intensive.
    Today at 2:30 PM Delete Report
    Like


  23. Fel666 meh, computers are faster than you realize. (well, java and esp. c++ is at least. Never really tried in in GM).
    But it really should be ok. I rarely run into those sorts of performance issues in GM, mostly more complex algorithms like path finding are the issue,
    Today at 2:32 PM Delete Report
    Like


  24. Felipe Rybakovas Wow, Such great discussion here guys, amazing! =)
    Today at 2:41 PM Edit Delete Report


  25. Felipe Rybakovas @Jobo , the bullet time effect in fact was just an idea for future magic or skill, but not really is one core mechanic in the game... Maybe was not worthy only for that, That is what I meant...
    But for sure if implemented I could think in use that in some specific scenario, for example, time control into a rogue like game... More or less prince of persia but with permadeath with not use it wisely
    Today at 2:43 PM Edit Delete Report


  26. Felipe Rybakovas @jo-thijs and @Fel666 , thanks for the tips! You guys know where I can find some information about how implement those topics in GML ? I'm more worried about collisions. Also I was question myself if AI using state machines could be affected by using delta time
    Today at 2:48 PM Edit Delete Report


  27. Nocturne
    Damn guys, how many times do I have to say MAKE A TOPIC FOR QUESTIONS LIKE THIS before you actually listen? This is a GREAT topic and completely lost to 99.99% of our members because none of you thought to follow the forum rules.
    Today at 3:18 PM Delete Report
    Like


  28. Felipe Rybakovas i'm Very sorry @Nocturne ! I asked here because I did read many topics about the subject, so I thought that would be more of the same ... I was expecting less depth discussion than this.
    Today at 3:48 PM Edit Delete Report


  29. Felipe Rybakovas Shoud I create a topic and pass the conversation there ?
    Today at 3:53 PM Edit Delete Report


  30. jo-thijs That would probably be best, yes.
    32 minutes ago Delete Report
 
Top