Speed, delta time and movement
Posted
by
munchor
on Game Development
See other posts from Game Development
or by munchor
Published on 2012-09-11T23:13:29Z
Indexed on
2012/09/12
3:49 UTC
Read the original article
Hit count: 519
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.
© Game Development or respective owner