Process function
2025/12/27
- Type
- Learning Resource
- Format
- Glossary Article
- Version
- General
- Subject Tags
- Created
- Updated
- 2026/02/16
- 2025/12/27
The _process() function is a special function in the Godot engine that is called every frame. In other words, it follows the game's framerate: if the game runs at 60 frames per second, _process() is called 60 times per second. If the game runs at 200 frames per second, _process() is called 200 times per second.
You can use it to perform tasks that need to happen repeatedly, like changing the position of a sprite, responding to player input, or playing animations.
This function takes a single function parameter called delta, a decimal number representing the time that passed since the last frame. You can use delta to make sure that your code is framerate-independent.
Here is an example of how to use the _process() function to move a sprite to the right. This assumes that the script is attached to a 2D :
extends Sprite2D
var velocity = Vector2(400, 0)
func _process(delta):
position += velocity * deltaEvery frame, this code adds a small value to the sprite's position (a fraction of the velocity value), making it move continuously.
Godot has two special functions that are called repeatedly in the game loop: _process() and _physics_process(). If you come from other engines, they are your update and physics update functions, respectively.
_process() is called every frame the engine calculates, while _physics_process() is called at a fixed rate and with a fixed delta value.
As its name suggests, _physics_process() is designed for physics-related code. By default, Godot calls it 60 times per second, with a fixed delta of a sixtieth of a second. This ensures that physics calculations are always consistent, even if the framerate drops. We need this because physics bugs can occur when the time between frames changes.
Have you ever seen a game freeze for a few seconds, then have the character suddenly jump forward and move through walls? That's what happens when the framerate drops and developers don't use a function like _physics_process() to handle physics.
So, you want to use _physics_process() for all physics-related code, and you can use _process() for everything else.
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.
Get help from peers and pros on GDQuest's Discord server!
20,000 membersJoin ServerThere are multiple ways you can join our effort to create free and open source gamedev resources that are accessible to everyone!
Sponsor this library by learning gamedev with us onGDSchool
Learn MoreImprove and build on assets or suggest edits onGithub
Contributeshare this page and talk about GDQUest onRedditYoutubeTwitter…