I have some question for my game formula.
Let say we have :
- Velocity : 5
- Friction : 0.9
- and Time : 0 (time increase by 1 for simplify)
Over the time velocity will decrease by the friction. (v = v . fr)
And for the decrease velocity at delta time is : (vt = fr^t . v)
As you can see on the image velocity(green line) is decrease over the time(yellow line).
Now i need a formula to find the red line or sum of velocity over the time.
Because if the velocity is constant or not reduce by friction i can just multiply it by the time. That why i belive there is somehow has a formula to solve this problem.
I really need this formula because with it i don't need to update my game object in every frame, i just use that formula to calc how much offset for the object move by delta time.