Locking FPS 
Author Message
 Locking FPS

How do I lock my frames per second to a certain value?


Sun, 10 Oct 2004 20:21:15 GMT  
 Locking FPS

Quote:
> How do I lock my frames per second to a certain value?

You could DoEvents or Sleep while you wait for a specific interval, in an
attempt to throttle your game loop to a specific fps.  This might not be the
best way to go though.  Syncing to the actual refresh rate of the monitor
might be a better approach.  If you use D3DSWAPEFFECT_COPY_VSYNC, the back
buffer will be flipped to the front buffer on VSYNC only.

Even though the following articles are written primarily for C++ developers,
they still provide valuable details:

<http://www.mvps.org/directx/articles/implementing_steady_motion.htm>

Applying a Throttle:
<http://www.mvps.org/directx/articles/writing_the_game_loop.htm>

(watch for line wrap in URLs)

--
Eric DeBrosse
http://www.blown.com/dx/
Microsoft Visual Basic DirectX MVP

The opinions expressed in this message are my own personal views and
do not reflect the official views of Microsoft Corporation. The MVP program
does not constitute employment or contractual obligation with Microsoft.



Mon, 11 Oct 2004 03:34:56 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. FPS

2. Animation Timing / animate mesh no matter what fps are

3. Low FPS count in D3D8

4. FPS DLL IO ISSUES

5. FPS Limiting

6. Capture 1 fps for fast motion video

7. HELP: Lock on Num Lock?

8. Custom Locking code for Database Locked in VB4 with Access 2.0 - HELPPPPPP

9. Shift Lock/Num Lock

10. VB4 Install locked up, Setup wiz locked up.

11. Locked textboxes are not fully locked !!

12. Add a new item also locked with optimistic locking

 

 
Powered by phpBB® Forum Software