FrameTime mystery
Ok I''m writting my first pong clone and I have added a PerformaceCounter timer and am using the FrameTime to scale the paddle movement but the paddle seems to move faster when it''s going in the up direction. To test this even further I held down both up and down at the same time and the paddle moved upward at about half of it''s full speed when theoretically it should stay still since i update frametime every frame.
if (sysw_keys[VK_UP])
{
BluePaddleY = BluePaddleY - 200 * tm_FrameTime;
}
if (sysw_keys[VK_DOWN])
{
BluePaddleY = BluePaddleY + 200 * tm_FrameTime;
}
"Don''t make me come down there..." -GOD
"Don't make me come down there..." -GOD
Hi!
Post a little more code....The stuff you have already posted is perfectly correct.
Greets, XBTC!
Post a little more code....The stuff you have already posted is perfectly correct.
Greets, XBTC!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement