Skip to main content

Questions tagged [deltatime]

Filter by
Sorted by
Tagged with
0 votes
0 answers
36 views

I'm trying to create a 2D side-scrolling player controller like in Terraria, but I can't get the delta time right. If I set my laptop's mode to battery saver, my character jitters (from dt jitters), ...
Acerx.AMJ's user avatar
2 votes
4 answers
245 views

So I was implementing deltatime adjustment into a game when I thought of this problem. Consider a control case, with no adjustment for framerate: Here, our character jumps up to a max height of 12.5 ...
Sad Robot's user avatar
1 vote
1 answer
107 views

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 ...
andrew's user avatar
  • 31
0 votes
0 answers
109 views

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 ...
Moss's user avatar
  • 1
0 votes
0 answers
54 views

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 ...
Pen's user avatar
  • 13
2 votes
1 answer
302 views

I'm implementing a timestep system and my code currently looks like this (C#, but that's irrelevant to the question): ...
SK19's user avatar
  • 123
1 vote
2 answers
129 views

I'm using a simple MonoBehaviour that causes GameObjects to change their position based on a ...
DemonicTree's user avatar
0 votes
0 answers
146 views

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); ...
Bernardo Becker's user avatar
0 votes
0 answers
91 views

In Unity 2022.3.12f1, I made a metronome. Here is a minimal working example: ...
jules's user avatar
  • 1
0 votes
0 answers
99 views

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 <...
fresh's user avatar
  • 1
1 vote
1 answer
374 views

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: ...
Tomo's user avatar
  • 133
1 vote
1 answer
111 views

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 ...
biscuit's user avatar
  • 13
1 vote
1 answer
116 views

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 ...
vmrfreitas's user avatar
1 vote
0 answers
216 views

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 ...
Vilx-'s user avatar
  • 177
0 votes
3 answers
520 views

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 ...
DemonicTree's user avatar
0 votes
1 answer
395 views

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 ...
Domonicx's user avatar
1 vote
0 answers
135 views

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, ...
desade's user avatar
  • 19
0 votes
1 answer
2k views

I recently wrote a program where I needed to limit the fps. After some searching I found a way via pygame built-in methods pygame.time.Clock() and ...
anathrax's user avatar
1 vote
2 answers
801 views

In my simulation, if an object is inside another object, it imparts a force proportional to the distance inside the object (basically a separation force). I am having an issue though where the ...
Ryan Peschel's user avatar
1 vote
1 answer
1k views

When the character dies, an animation plays, and then the scene resets. What I want is that nothing moves/animates except the character and the life bar so I use ...
Arian_ki's user avatar
  • 691
0 votes
1 answer
942 views

I'm using glfw's glfwGetTime() function to calculate my time between frames i.e deltaT but when I multiply my desired movement ...
Andrew Graham's user avatar
0 votes
1 answer
339 views

I record object data (position,rotation) for objects in a scene and store it to a file. At some stage the player can load this file and "play back" the recording to watch themselves. ...
Charl Cillie's user avatar
1 vote
1 answer
424 views

I had an old pure Java 2D top-down game that I'm trying to reformat a bit. Before, I had a bit of a messy game loop that didn't use delta timing for any movements or animations. Now, I'm trying to ...
ElliottV4's user avatar
0 votes
1 answer
291 views

I have a gameloop for a simulation I'm making, I noticed that the simulation is going very slow, When i checked the DeltaTime it was very small, I set the target fps to be 1 (deltatime should be 1 in ...
Hamza Nasab's user avatar
1 vote
1 answer
5k views

I have tried achieving a good delta time and fps counter over the last few days, read and watched a lot about it, but still can't seem to get it to work. Here is an example: ...
Yamiko Hikari's user avatar
0 votes
1 answer
2k views

I have a need to pause my game and the simplest and most clean way that I know of (other than completely designing my own time system) is by using ...
caleidon's user avatar
  • 591
-1 votes
1 answer
124 views

I'm Universo and for the longest time had coding issues around the concept of time-based sprite animation basically, do not know how to implement it and any code or explanation simple or complex that ...
Dominic Hughes's user avatar
0 votes
2 answers
2k views

I just came across the unity blog and found that unity 2020.2 trying to fix Time.deltaTime which is good for more smooth movement (correct me if I am wrong). But when I am reading the blog I found ...
Muhammad Faizan Khan's user avatar