Framerate Independence

2025/12/27

Type
Learning Resource
Format
Glossary Article
Version
General
Subject Tags
Code
Assets
All else
Copyright 2016-2026, GDQuest
Created
2026/02/16
Updated
2025/12/27

Framerate Independence

Framerate independence is a concept in game development where the game's behavior is consistent regardless of the frame rate. This is important because different hardware can run the game at different speeds, and the game should behave the same way on all devices.

How can framerate be a problem?

To make the calculations easier, let's pretend our game runs at 1 frame per second.

We have this pixel, moving toward the right:

🮄

The calculation for its movement is simple. Every frame, the game calls this hypothetical advance() function, which adds 1 pixel to its position.

func advance():
  position.x += 1

One second later, it is here:

🠦🮄

And so on. Now, let's take this game, and run it on a much faster computer, which runs at a whopping 2 frames per second. Now, each second, the game runs advance twice! On this computer, a second later, our pixel is here:

🠦🠦🮄

It's going faster! Old games worked this way: that's why a lot of older games run too fast to play on modern computers without artificially slowing the processor.

Now let's look at what happens if we introduce a frame_rate variable:

var frame_rate = 1

func advance():
  position.x += 1 / frame_rate

On the first computer, frame_rate is equal to 1, so the result doesn't change. On the faster computer, running at 2 FPS, it's 2, so the pixel moves at 1 / 2 pixels per frame: it'll take 2 frames to cover one pixel.

Now, the game runs at the same speed regardless of the hardware! There's only one complication: if the frame rate drops, then this value will become incorrect. For that reason, Godot determines that value every frame, and gives it as a parameter to _physics_process() and _process().

Why is it called a "delta"?

"Delta" is often used in mathematics to represent a difference between two values. In this case, it represents the difference in time between the current frame and the previous frame.

The delta time is the time that passed since the last frame. If the game runs at 60 FPS, the delta time is 1/60 seconds, or about 0.0166666666666667 seconds.

If the game runs at 2 FPS, the delta time is 1/2 seconds, or 0.5 seconds.

Multiplying by this delta value is similar to dividing by the frame rate.

So, by multiplying by the delta time, you're effectively dividing by the frame rate.

Become an Indie Gamedev with GDQuest!

Don't stop here. Step-by-step tutorials are fun but they only take you so far.

Try one of our proven study programs to become an independent Gamedev truly capable of realizing the games you’ve always wanted to make.

Nathan

Founder and teacher at GDQuest
  • Starter Kit
  • Learn Gamedev from Zero
Check out GDSchool

You're welcome in our little community

Get help from peers and pros on GDQuest's Discord server!

20,000 membersJoin Server

Contribute to GDQuest's Free Library

There are multiple ways you can join our effort to create free and open source gamedev resources that are accessible to everyone!