See all glossary terms

State

We call the state of a program a snapshot of all the data loaded in the computer's memory that belongs to the program. It's the sum of all the values assigned to all the variables in the program.
It can also mean a group of variables; for example, the "player's state" is the group of all variables that describe the player's position, health, and so on.
NOTE:
In the context of a Finite State Machine, a state is a specific condition or situation in which a system can be.
Imagine a very simple program with a single variable that never changes its value. The program's state is always a single piece of data, 1.
var initial_value := 1
Let's add a line that changes the value of the variable. At the beginning, the state is 1, but after the _ready() function is executed, it becomes 2.
var initial_value := 1

func _ready() -> void:
    initial_value = 2
In a real program, the state is much more complex. In a Godot game, there may be hundreds or thousands of nodes, each with dozens properties like their position, rotation, material, and so on.
A snapshot of all those values at a given point in time is the game's state at that time. A part of this could be written to disk; we refer to this as serializable state.