See all glossary terms

Script

In games, a script is a file that contains code to control the behavior of a game object. You can use scripts to respond to player input, control the movement of a character, and implement other game mechanics.
In Godot, we can attach scripts to node. This is the most common way to use them. Each script can directly access and modify the properties of the node it's attached to, and runs code at various points in the game's lifecycle, like when the node is "ready" (using the _ready() function) or each frame (using the _process() or _physics_process() function).
Godot 4 has two officially supported languages for writing scripts: GDScript and C#. GDScript is an accessible language designed specifically for Godot, while C# is a popular general-purpose language used in many other game engines. The two languages offer different tradeoffs.
You can learn more about the different options Godot supports for programming in this video:

See Also

Related terms in the Glossary