Script

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

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 nodes. 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 programming languages Godot supports in this video:

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!