Interface
2025/12/27
- Type
- Learning Resource
- Format
- Glossary Article
- Version
- General
- Subject Tags
- Created
- Updated
- 2026/02/16
- 2025/12/27
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.
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.
Get help from peers and pros on GDQuest's Discord server!
20,000 membersJoin ServerThere are multiple ways you can join our effort to create free and open source gamedev resources that are accessible to everyone!
Sponsor this library by learning gamedev with us onGDSchool
Learn MoreImprove and build on assets or suggest edits onGithub
Contributeshare this page and talk about GDQUest onRedditYoutubeTwitter…