Should you make use of delta time for framerate independent code?

Having used Unity, Unreal etc, I’m used to multiplying delta time for some code that runs in Update loop, e.g., movement.
However, in many online tutorials for MonoGame and XNA, people seem to not mind delta time, and iirc XNA does run in a fixed frame rate on PC: 60 fps and on Windows Phone: 30 fps.
I’m developing a PC and Android/iOS game, should I ignore delta time or use it?
How do frame rates differ from PC/Mobile/Consoles?

It’s good practice to make your game dependent on delta time rather than frames. This keeps the game logic running at a constant pace when frame drops occur and it lets you unlock frame rate to profile your game at a high level. You can get elapsed time since the last frame from GameTime (passed to your Game1.Update method) by using GameTime.ElapsedGameTime.TotalSeconds (or TotalMilliSeconds if you prefer that).

2 Likes