Introduction of GDScriptGDScript is a dynamically typed and a high-level programming language. It is used to create content. It is optimized and tightly integrated with Godot Engine, allowing great flexibility for content creation and integration. HistoryIn our early days, the engine used the Lua scripting language. Lua is fast, but creating bindings to any object-oriented system (by using fallbacks) was complicated and slow and took a significant amount of code. After some experiments with Python, it also proved difficult to embed. The last third party scripting language that was used for shipped games was a squirrel, but it was dropped. At the point, it became evident that a custom scripting language could more optimally make use of Godot's particular architecture:
The result of the considerations is GDScript. The language and interpreter for GDScript ended up smaller than the binding code for Lua and squirrel, during the same functionality. ExampleSome people can look at the syntax, so here is a simple example of how GDScript looks. If we have previous experience with statically typed languages such as C, C++, or C# but never used a dynamically typed one before, it is advised you read this tutorial: LanguageIn the following, an overview is given to GDScript. Details, such as which methods are available to arrays or other objects, should be looked up in the linked class descriptions. IdentifiersThe identifiers that restrict itself to alphabetic characters (a to z and A to Z), digits (0 to 9), and _ qualifies as an identifier. Additionally, identifiers may not begin with a number. Identifiers are always case-sensitive (foo is different from FOO). Next TopicKeywords |