Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Crypthor

Game Speed Adjustement ...

This topic is 6685 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, please tell me i''m right or wrong ? I need to adjust speed of movement in 3d world, but FPS must run as quick as possible ! So: ( here is main loop ) while ( !quit ) { QueryPerformaceCounter( &StTime ); // something like that ... ... keybaord hook some code rendering QueryPerformanceConter( &EndTime ); SpeedAdjustment = ( EndTime.QuadPart - StTime.QuadPart ) * Some Constant; } void PlayerMove( void ) { ... ... // move forward for example. x += sin( some angle )*cos( some angle ) * 0.05f * SpeedAdjustment; ... ... } Here is the right way to do that ? Please help. Thanks. ( any "c" code will be good for me

Share this post


Link to post
Share on other sites
Advertisement
Yes that is the right way (I hope so, because i am using nearly the same code )

What code do you need, you know the QueryPerformanceCounter and so on ???
Or do you need the code for your "keyboard hook", "some code" and "rendering"

Lars

Share this post


Link to post
Share on other sites
Thanks for answer!

Source Code i need in case if i''m wrong.
So my Engine called "PI", is working nice, so as KeybHook.
But next problem was in SpeedAdjustemnts, this aglorythm was taken from somewhere ( i don''t remember where ).
So i''m was not so sure about it.

Thanks anyway!

Cr.

Share this post


Link to post
Share on other sites
Thanks for answer!

Source Code i need in case if i''m wrong.
So my Engine called "PI", is working nice, so as KeybHook.
But next problem was in SpeedAdjustemnts, this aglorythm was taken from somewhere ( i don''t remember where ).
So i''m was not so sure about it.

Thanks anyway!

Cr.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!