- This wiki is out of date, use the continuation of this wiki instead
Set fps
From FenixWiki
(Difference between revisions)
Revision as of 19:57, 26 June 2007 (edit) Sandman (Talk | contribs) m ← Previous diff |
Current revision (00:36, 19 December 2007) (edit) (undo) Sandman (Talk | contribs) m |
||
(3 intermediate revisions not shown.) | |||
Line 5: | Line 5: | ||
'''INT''' set_fps ( <'''INT''' fps> , <'''INT''' skip> ) | '''INT''' set_fps ( <'''INT''' fps> , <'''INT''' skip> ) | ||
- | Sets the [[framerate]] | + | Sets the frames per second ([[framerate]]) your program aims to display. The more frames per second, the faster your program runs. Some computers might not be able to display the amount of frames you specified, and will show a lower fps. Therefore, it is important you choose a fps that is reasonable and can also be displayed by the somewhat slower computers. If you don't use this function then the default fps will be used (25 fps). |
== Parameters == | == Parameters == | ||
{| | {| | ||
- | | '''INT''' fps || - Frames per second to use. | + | | '''INT''' fps || - Frames per second to use. The default is 25. |
|- | |- | ||
- | | '''INT''' skip || - Frames the program is allowed to skip if it's running low on processor time. | + | | '''INT''' skip || - Frames the program is allowed to skip to keep up with the specified framerate if it's running low on processor time. The default is 0. |
|} | |} | ||
Line 18: | Line 18: | ||
== Notes == | == Notes == | ||
+ | If you use Set_fps(0,0), then your program will run at the maximum speed your computer can possibly handle. | ||
+ | |||
It is said, the frame skipping does not work satisfactory in Fenix 0.83b. | It is said, the frame skipping does not work satisfactory in Fenix 0.83b. | ||
The current FPS is in the [[global variable]] [[fps]]. | The current FPS is in the [[global variable]] [[fps]]. | ||
+ | |||
+ | == Errors == | ||
+ | None. | ||
+ | |||
+ | == Example == | ||
+ | <pre> | ||
+ | Program test; | ||
+ | Begin | ||
+ | Set_fps(60,0); | ||
+ | Loop | ||
+ | Frame; | ||
+ | End | ||
+ | End | ||
+ | </pre> | ||
+ | |||
+ | {{Funcbox | ||
+ | | category=Programinteraction | ||
+ | }} |
Current revision
Contents |
[edit] Definition
INT set_fps ( <INT fps> , <INT skip> )
Sets the frames per second (framerate) your program aims to display. The more frames per second, the faster your program runs. Some computers might not be able to display the amount of frames you specified, and will show a lower fps. Therefore, it is important you choose a fps that is reasonable and can also be displayed by the somewhat slower computers. If you don't use this function then the default fps will be used (25 fps).
[edit] Parameters
INT fps | - Frames per second to use. The default is 25. |
INT skip | - Frames the program is allowed to skip to keep up with the specified framerate if it's running low on processor time. The default is 0. |
[edit] Returns
INT : The FPS entered.
[edit] Notes
If you use Set_fps(0,0), then your program will run at the maximum speed your computer can possibly handle.
It is said, the frame skipping does not work satisfactory in Fenix 0.83b.
The current FPS is in the global variable fps.
[edit] Errors
None.
[edit] Example
Program test; Begin Set_fps(60,0); Loop Frame; End End
Programinteraction Functions | |
• Exit() • Getenv() • Key() • Move_window() • Set_fps() • Set_icon() • Set_mode() • Set_title() • |