Phaser home
Phaser AE
Open source
Phaser 4
Download
Learn
Editor
Tools
Docs
Examples
News
Log in
Examples
/
Time
/
Timestep
Phaser 4.1.0
Phaser 4 examples
Timestep
5
examples
Examples
5
Delta History
Displays the history of delta time values from the game loop and demonstrates how to use delta time for smooth, frame-independent movement.
Frame Independent Movement
Demonstrates how to use the delta time value in the update loop along with Phaser.Math.GetSpeed to ensure game objects move at a consistent speed regardless of the frame rate.
Split Timestep
Demonstrates how to run a secondary, fixed-rate TimeStep loop alongside the main game loop to compare movement at different update frequencies.
Ticker Loop
Demonstrates how to access delta time and total elapsed time from the game loop to achieve frame-independent movement.
World Time and Delta
Displays the accumulated game time and the time elapsed since the last frame (delta) using the parameters provided to the Scene update method.