I just realized why my little snippet didn't fit so well into the conversation of basing things off player velocity. I used a playerSpeedConstant rather than velocity. Seems obvious, but sometimes I miss the obvious, smile.
So here it is again:
float distanceTravelledThisFrame = secondsElapsedSinceLastFrame * playerVelocity;
In this way velocity is measured in distance units per second.
The default distance unit in DirectX is meters so your character moves at X meters per second. I should also note that the secondsElapsedSinceLastFrame variable is a float or double and usually around 1 60th of a second, not multiple seconds.

Ian Reed

On 8/1/2013 5:10 AM, Ryan Strunk wrote:
Hi Cara,
I'm curious about the frame rate concept. I assume this would be based on
the time of your game loop? If your game loop is instructed to wait 5
milliseconds at the end to save processing power, then the movement rate
would, in essence, be triggered every 5 milliseconds? For faster characters,
you would just give them greater velocities?
Thanks much,
Ryan



---
Gamers mailing list __ [email protected]
If you want to leave the list, send E-mail to [email protected].
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/[email protected].
If you have any questions or concerns regarding the management of the list,
please send E-mail to [email protected].

Reply via email to