Speed, delta time and movement
- by munchor
player.vx = scroll_speed * dt
/* Update positions */
player.x += player.vx
player.y += player.vy
I have a delta time in miliseconds, and I was wondering how I can use it properly. I tried the above, but that makes the player go fast when the computer is fast, and the player go slow when the computer is slow. The same thing happens with jumping. The player can jump really high when the computer is faster.
This is sort of unfair, I think, because.
Should I be doing this someway else? Thanks.