简介
GDScript is a high level, dynamically typed programming language used to create content. It uses a syntax similar to Python (blocks are indent-based and many keywords are similar). Its goal is to be optimized for and tightly integrated with Godot Engine, allowing great flexibility for content creation and integration.
GDScript 是一种用于创建内容的高级动态类型化编程语言。它使用类似于 Python 的语法 (块基于索引, 许多关键字相似)。它的目标是针对 godot 引擎进行优化与集成, 从而为内容创建提供极大的灵活性。
In the early days, the engine used the Lua scripting language. Lua is fast, but creating bindings to an object oriented system (by using fallbacks) was complex and slow and took an enormous amount of code. After some experiments with Python, it also proved difficult to embed.
在早期, 引擎使用 Lua 脚本语言,它速度很快, 但创建面向对象的系统的绑定 (通过使用回退) 既复杂又缓慢, 并且需要大量的代码。在用 Python 进行了一些实验后, 它也被证明难以嵌入。
The last third party scripting language that was used for shipped games was Squirrel, but it was dropped as well. At that point, it became evident that a custom scripting language could more optimally make use of Godot’s particular architecture
最后一种第三方脚本语言是 Squirrel,但它也被移除了。在这一点上,很明显为godtot定制脚本语言,才可以更好地发挥Godot的特殊架构。
Godot embeds scripts in nodes. Most languages are not designed with this in mind.
Godot uses several built-in da