Phaser API Documentation

  Version: 
setFPS(framerate)

Description:

Sets the frame rate to run the simulation at.

The frame rate value is used to simulate a fixed update time step. This fixed time step allows for a straightforward implementation of a deterministic game state.

This frame rate is independent of the frequency at which the game is rendering. The higher you set the fps, the more physics simulation steps will occur per game step. Conversely, the lower you set it, the less will take place.

You can optionally advance the simulation directly yourself by calling the step method.

Parameters:

name type description
framerate number

The frame rate to advance the simulation at.

Returns:
Description:

This World object.

Since: 3.10.0