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


This topic is 5775 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

the best way would be when you post the timer code (i hope only a few lines) and then please tell me where to put it in

The best way would not be to copy and paste someone else''s code. Look in the MSDN for information about timers, and you''ll learn how they work.

Frame limiting is a bit naughty though - you may be better off looking into QueryPerformanceCounter (google it if you are unfamiliar with it).

- Pete

Share this post

Link to post
Share on other sites
I presume your building a frame limter (this attempts to maintain the framerate consitency between your machine and faster ones).

Have you remembered to include the ''while'' clause from the WinMain loop, this is what actually controls the framerate.

p.s. if your running your program on a slower machine than the one you built it on the frame limiter wont work.

To compensate:

1) Re-compile your work on the slowest machine (and set the frame delay accordingly, the frame rate will be the same on the faster machine as with the slower machine)
2)Design the program to increase the players movement if a slower processor has been detected.

Share this post

Link to post
Share on other sites