Questions tagged [deltatime]
The deltatime tag has no summary.
                26 questions
            
            
            
                1
            
            vote
        
        
            
                1
            
            answer
        
        
            
                100
            
            views
        
        
            
            
            
        Objects move with different speed on different devices
                    I was making a 2d top-down game, but when I tested it on two devices (Samsung M31 and Samsung S25) there was a problem with player speed - it was faster on S25 and slower on M31. I tried using some ...
                
            
       
        
            
                0
            
            votes
        
        
            
                0
            
            answers
        
        
            
                90
            
            views
        
        
            
        How can I accurately calculate deltatime in SDL2/3?
                    I have looked up ways to calculate DeltaTime in the past, but the 'solutions' seem to have my program be slightly jittery or not move things correctly. As far as I know, you would calculate it by ...
                
            
       
        
            
                0
            
            votes
        
        
            
                0
            
            answers
        
        
            
                54
            
            views
        
        
            
        What are some methods of adding smooth, frame indpendent, camera recoil/punch?
                    I've run into a bit of a brick wall on this topic. I've only been able to achieve either only frame independent recoil, or smooth recoil. But not the other.
I think the main source of the problem is ...
                
            
       
        
            
                2
            
            votes
        
        
            
                1
            
            answer
        
        
            
                275
            
            views
        
        
            
            
            
        What kind of delta time system is better?
                    I'm implementing a timestep system and my code currently looks like this (C#, but that's irrelevant to the question):
...
                
            
       
        
            
                1
            
            vote
        
        
            
                2
            
            answers
        
        
            
                126
            
            views
        
        
            
        Inconsistent Movement Behaviour between built Game and Playmode
                    I'm using a simple MonoBehaviour that causes GameObjects to change their position based on a ...
                
            
       
        
            
                0
            
            votes
        
        
            
                0
            
            answers
        
        
            
                146
            
            views
        
        
            
        delta_time with the new move_and_collide() function in GameMaker
                    Is this implementation of delta time in recent Game Maker reliable?
var dt = delta_time / 1000000
move_and_collide(spd_h * dt, spd_v * dt,obj_world.solid_tiles);
...
                
            
       
        
            
                0
            
            votes
        
        
            
                0
            
            answers
        
        
            
                91
            
            views
        
        
            
            
        custom metronome is not consistent
                    In Unity 2022.3.12f1, I made a metronome. Here is a minimal working example:
...
                
            
       
        
            
                0
            
            votes
        
        
            
                0
            
            answers
        
        
            
                99
            
            views
        
        
            
            
        How to calculate velocity based on force at an angle
                    I have a 2D top-down jetboat that is moving (has a x, y velocity). I apply the velocity by multiplying against the delta time <...
                
            
       
        
            
                1
            
            vote
        
        
            
                1
            
            answer
        
        
            
                353
            
            views
        
        
            
            
            
        How to pause or slow down/speed up Time.deltaTime when it is inside the Update() method?
                    My player is able to dive for a limited amount of seconds (let's say 10 seconds) while swimming. When he's not diving his breath gauge fills up again to a max of 10 seconds:
...
                
            
       
        
            
                1
            
            vote
        
        
            
                1
            
            answer
        
        
            
                110
            
            views
        
        
            
        What if I use delta time to just regulate framerate but not individual entities?
                    What if, instead of multiplying all my values that change each frame by delta time, I just increased one number in increments multiplied by delta time, and used that number to advance to the next ...
                
            
       
        
            
                1
            
            vote
        
        
            
                1
            
            answer
        
        
            
                115
            
            views
        
        
            
            
            
        Character walks too fast when browser's hardware acceleration is turned off
                    I have posted a project on itch.io (here). My character walks with the speed I intended when Chrome's hardware acceleration is turned on but walks much faster when it is turned off. First, my friend ...
                
            
       
        
            
                1
            
            vote
        
        
            
                0
            
            answers
        
        
            
                214
            
            views
        
        
            
        What is deltaTime calculated between?
                    I watched a recent YouTube video about deltaTime and at around 3:50 the author talks about how it is calculated. He goes on to claim that it is NOT
The time elapsed between the frame currently being ...
                
            
       
        
            
                0
            
            votes
        
        
            
                3
            
            answers
        
        
            
                505
            
            views
        
        
            
            
        Coroutine delay isn't consistent on different framerates
                    My problem:
I am using a coroutine to add a typewriter effect to my texts, but the delay (using yield return new WaitForSeconds();) isn't consistent on different ...
                
            
       
        
            
                0
            
            votes
        
        
            
                1
            
            answer
        
        
            
                390
            
            views
        
        
            
            
            
        Frame duration varies by a millisecond every few frames
                    When I run the program at 60 fps, I get 0.016 seconds per frame most of the time, then 0.017 s once every few frames. A similar thing happens for 30 fps, varying between 0.033 and 0.034 seconds per ...
                
            
       
        
            
                1
            
            vote
        
        
            
                0
            
            answers
        
        
            
                135
            
            views
        
        
            
            
        Variable Timestepping & Unexpected Jerkiness/Stutter in a Simple Test Case Scenario
                    I have been bashing my head of an extremely simple case in my C++ game and would like some help. I have been researching about game loops, variable & fixed timestepping, rendering interpolation, ...