在 GDevelop 中使用 JavaScript

GDevelop支持JavaScript来创建游戏或扩展游戏引擎。

JavaScript 可用于游戏的部分编写并与事件一同使用。

在游戏中添加JavaScript代码块

GDevelop支持在游戏事件的任何一点添加JavaScript代码块。这是实现复杂算法或从开源库重用函数的好方法。事件和代码块可以无缝混合在一起 - 因此您可以使用JavaScript实现部分甚至整个游戏!

The JavaScript editor is based on the super powerful Monaco Editor, extracted from Visual Studio Code. Intellisense autocompletions are provided and the editor supports advanced features like multi-selection for faster coding.

进一步了解 JavaScript 的使用

Extend your game or GDevelop with JavaScript extensions

GDevelop is modular and can be extended to suit your needs. In particular, all features available to games (objects, behaviors, events) are based on the extension system. You can quickly create new extensions for your game or contribute to existing ones as GDevelop is open-source.

Learn how to write JavaScript powered extensions and read the game engine reference documentation.

Finally, note that in most cases you don't even need to quit GDevelop to write an extension in JavaScript, as most extensions can be built in the editor, directly in your game project.

在GDevelop中使用Dark主题。代码编辑器还捆绑了几个漂亮的主题!