Modifying multiplying calculation to use delta time
- by Bart van Heukelom
function(deltaTime) {
x = x * 0.9;
}
This function is called in a game loop. First assume that it's running at a constant 30 FPS, so deltaTime is always 1/30.
Now the game is changed so deltaTime isn't always 1/30 but becomes variable. How can I incorporate deltaTime in the calculation of x to keep the "effect per second" the same?