Godot 4 courses Launching in Early Access starting Jan 30
you can now pre-order
godot 4 courses
Save up to 25%

Scripting Languages

By: Nathan Lovato - March 21, 2021

Godot offers five officially supported scripting languages:

  1. GDScript, a language specific to Godot, is tightly integrated into it, built by and for game developers.
  2. C#, a general programming language popularised in the game development world by Unity.
  3. Visual script, a node-based programming language where you connect boxes.
  4. C, the procedural programming language on which operating systems are built.
  5. C++, and object-oriented language in which Godot is built as well as many game engines.

I won’t repeat everything that’s in the video here, where you will find details about each language option, what scripting is, and answers to popular questions like “which language should I learn first?” or “Why did the Godot developers create their own language, GDScript?”

Instead, I will add some information.

GDScript and domain-specific languages

Godot’s GDScript is what we call a domain-specific language (DSL). Those are languages built for a specific purpose.

In this case, gameplay programming.

The Unreal Engine always came with such languages, like Kismet and Blueprints in recent versions. Still, they also used to have written languages, and they pitched an upcoming one for the Unreal Engine’s latest version.

The idea is that big game engines like Unity, Unreal, or Godot use a backend language that allows developers to maximize performance. Godot, like Unreal, is written in C++.

However, these languages are a bit inconvenient when it comes to prototyping and iterative work like we do when creating games.

When you write C++ code, you have to be careful with the syntax, you often need to write many instructions, and you have to recompile your program every time you make a change.

All of which slows you down.

So typically, we use what we call a front-end language for rapid prototyping and development.

Backend stands for the underlying, somewhat invisible technology that constitutes your program’s foundations. In contrast, front-end refers to your program’s visible part, like the user interface and other interactions that the user can see.

Godot historically had only GDScript as a front-end language option. The other four came over the years.

Why would engine developers create a specific language?

There are several reasons:

  1. You can tune the language and syntax to increase the users' productivity. You see many domain-specific languages in contexts like web frameworks and other specific environments for this reason.
  2. You can integrate it tightly with your technology. GDScript gets extra completion and insights or features like hot-reloading (updating the code live as you play the game) in Godot as it is part of it.
  3. It doesn’t necessarily take more time than reusing an existing language.

That’s what happened for Godot, which first used Python and Lua, before its open-source release.

The developers experienced limitations using those languages that took a lot of efforts to work around. In the end, maintaining Python’s integration would take as much time as coding a custom language. So they designed GDScript.

There are more community-supported languages

The technology Godot uses to provide C, C++, and C# support allows the community to offer more languages.

There were users interested in languages like Rust, so they built Rust support for Godot.

Another user is working on JavaScript and TypeScript support.

And yet another one on Python support.

There are more projects like these, still not all centralized in one place as far as I know.

Mind these are all “advanced” options as they are not officially supported and the setup requires compiling some code.

If you ever go with a community-supported language like this, be sure to test it, and ensure they support your shipping platforms.

In the next lesson, you will get to create your first script using the GDScript programming language, which we will use for the rest of the series.

Made by

Nathan Lovato

GDQuest founder. Courteous designer with a taste for Free Software. I promote sharing and collaboration.