Indentation

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

Indentation

An indentation, or indent for short, is the added spaces or tabs between the margin and the start of a line of code.

In GDScript and other programming languages like Python, indents tell the computer where blocks of code start and end.

Without indents, the computer would not know where the code of a function ends, for example.

The amount and type of indentation used depends on the programming language. In GDScript, one indent is composed of either four space characters or one tab character.

While GDScript supports both tabs and spaces for indentation, you cannot mix tabs and space characters within a single GDScript file.

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!