This library helps you mainting a constant speed (FPS) in your game.
File: |
Speed.lib |
Version: |
1.0 |
Author: |
Marcus Johansson |
This library contains two functions for maintaining a constant speed in games. Unless a game loop is timed, the speed will depend on the user's system.
Name |
Parameters |
Brief description |
|
procedure |
maxFPS |
Hold a maximum number of frames per second. |
|
function |
fps |
Same as 'SPD_HoldFrame' but returns false if the game is running to slow. |
procedure SPD_HoldFrame ( maxFPS )Call the procedure at the end of your game loop, and it will limit the speed by waiting.
[ Back ] |
function SPD_HoldFrameDraw ( fps )This function works like 'SPD_HoldFrame' but returns false if the program is running too slow. In that case you can skip drawing the next frame and only update the logic.
Return value [ Back ] |
Generated with NLDoc 20140630.