Difference between revisions of "Application:setFps"

From GiderosMobile
Line 2: Line 2:
 
'''Available since:''' Gideros 2012.2.2<br/>
 
'''Available since:''' Gideros 2012.2.2<br/>
 
=== Description ===
 
=== Description ===
 +
<translate><br />
 +
Sets the frame rate of the application. Accepted values are [[[30` and `60]]].<br />
 
<br />
 
<br />
Sets the frame rate of the application. Accepted values are `30` and `60`.<br />
+
You can also use setFps(-60) or setFps(-30) to maintain an apparent frame rate of 60 or 30 fps by skipping frames if the system notices it is running slow. So for example, it updates the game logic 60 times per second but redraws the screen 30 times. The game is playable but will not be so smooth on slow devices. (currently available on WinRT)</translate>
<br />
 
You can also use setFps(-60) or setFps(-30) to maintain an apparent frame rate of 60 or 30 fps by skipping frames if the system notices it is running slow. So for example, it updates the game logic 60 times per second but redraws the screen 30 times. The game is playable but will not be so smooth on slow devices. (currently available on WinRT)
 
 
<source lang="lua">
 
<source lang="lua">
 
  Application:setFps(fps)
 
  Application:setFps(fps)
 
</source>
 
</source>
 
=== Parameters ===
 
=== Parameters ===
'''fps''': (number) the new frame rate of the application <br/>
+
'''fps''': (number) <translate>the new frame rate of the application</translate> <br/>

Revision as of 13:34, 23 August 2018

Available since: Gideros 2012.2.2

Description


Sets the frame rate of the application. Accepted values are [[[30` and `60]]].

You can also use setFps(-60) or setFps(-30) to maintain an apparent frame rate of 60 or 30 fps by skipping frames if the system notices it is running slow. So for example, it updates the game logic 60 times per second but redraws the screen 30 times. The game is playable but will not be so smooth on slow devices. (currently available on WinRT)

 Application:setFps(fps)

Parameters

fps: (number) the new frame rate of the application