Interface

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

Interface

Because most programming is text-based, names are the main way we interact with external code. To use code written elsewhere, we need to know which keywords we can use and how to use them.

At a high level, an interface is a contract that defines the ways in which an object can be used. When we say that an object implements an interface, it means we know in advance the methods and properties the object has and how to use them. We don't need to know how the object works inside. This is the essence of .

GDScript doesn't have interfaces enforced by the language like Java or C#. Instead, GDScript uses duck typing: if an object has the methods and properties we expect, we can use it as if it implements an interface. This is a more flexible approach, but it also means we need to be more careful when using external code: since the engine doesn't check the interface for us, it is more error-prone.

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!