您好,
我对 Action Game Maker 的发布感到非常兴奋。我使用 Godot 制作游戏,当我看到 Action Game Maker 基于 Godot 构建时,我非常感兴趣。我已经尝试了演示版,对结果非常满意。
我遇到的一个问题是,GDExtensions 目前在 Action Game Maker 中似乎无法使用。
core\extension\gdextension.cpp:970 - GDExtension 仅兼容 Godot 4.1.0 或更高版本:res://spine_godot_extension.gdextension
资源加载失败:res://spine_godot_extension.gdextension。请确保通过在编辑器中至少打开一次项目来导入资源。
core\extension\gdextension.cpp:970 - GDExtension 仅兼容 Godot 4.2.0 或更高版本:res://addons/effekseer/effekseer.gdextension
我想请问,未来 Action Game Maker 是否会支持 GDExtensions?因为有许多强大的插件,我认为它们将为 Action Game Maker 带来裨益。
2 个赞
Baz
2025 年6 月 9 日 22:56
2
大家好!我在早期的一封信中发现了以下内容:
由于 ACTION GAME MAKER 的附加功能未开源,任何需要重新编译 Godot 的插件或功能变更均不支持与 ACTION GAME MAKER 配合使用。
据我了解,GDExtensions 需要重新编译,因此我认为它们无法与 AGMaker 一起使用。
1 个赞
我在 Godot 引擎文档中查找了一些信息,并找到了这个链接:What is GDExtension? — Godot Engine (stable) documentation in English
一般来说,如果您构建了自定义版本的 Godot,应从中生成一个 extension_api.json 文件用于您的 GDExtensions,因为它可能与官方 Godot 构建存在一些差异。
理论上,如果我们能在安装中包含该 extension_api.json 文件,则有可能编译一个面向 Action Game Maker 的开源 GDExtension。Godot 在其 GitHub 上提供的文件如下:
{
"header": {
"version_major": 4,
"version_minor": 6,
"version_patch": 0,
"version_status": "stable",
"version_build": "official",
"version_full_name": "Godot Engine v4.6.stable.official",
"precision": "single"
},
"builtin_class_sizes": [
{
"build_configuration": "float_32",
"sizes": [
{
"name": "Nil",
"size": 0
},
{
"name": "bool",
このファイルは切り詰められています。 オリジナルを表示
3 个赞
你可以通过将 agm.windows.editor.x86_64.exe 拖入 PowerShell 或命令提示符,并添加 --dump-extension-api 参数来导出 extension_api.json。
参见构建 C++ 绑定
我稍后会将其与 Godot 4.3.0 进行比较,但重要的是头部信息。
"header": {
"version_major": 1,
"version_minor": 0,
"version_patch": 1,
"version_status": "rc",
"version_build": "agmaker",
"version_full_name": "Action Game Maker v1.0.1.rc.agmaker"
},
还有一些其他新增内容。我统计到 game_object 有 12 个。
是的,说实话,我一直在尝试看看是否可能使用该方法重新编译一个 GDExtensions 插件,以适配 Action Game Maker。不幸的是,我遇到了一些错误,我不确定是因为我没有正确设置构建环境,还是存在其他问题导致无法正确构建。
编辑:另外,Godot 文档中并未提及这一点,但在 header-cpp 的 README 中,实际上有两个可用的命令:
--dump-extension-api 可生成 extension_api.json 文件
&
--dump-gdextension-interface 可生成 gdextension_interface.h 头文件。
1 个赞
我知道我的构建环境是有效的。
使用转储的 JSON 和 C++ 头文件时,我遇到了以下错误。
正在尝试让 Git 插件正常工作。
open_menu.hpp 看起来是 AGM 新增的。我怀疑 GGG 不会发布它。但我不认为这实际上是个问题。
gen\include\godot_cpp\classes\open_menu.hpp(55): error C2653: 'actg': 不是类或命名空间名称
gen\include\godot_cpp\classes\open_menu.hpp(55): error C2061: 语法错误: 标识符 'MenuSceneDirectionType'
gen\include\godot_cpp\classes\open_menu.hpp(56): error C2653: 'actg': 不是类或命名空间名称
gen\include\godot_cpp\classes\open_menu.hpp(56): error C3646: 'get_direction_type': 未知的重写说明符
gen\include\godot_cpp\classes\open_menu.hpp(56): error C2059: 语法错误: '('
gen\include\godot_cpp\classes\open_menu.hpp(56): error C2238: ';' 之前出现意外的标记
gen\src\classes\open_menu.cpp(66): error C2653: 'actg': 不是类或命名空间名称
gen\src\classes\open_menu.cpp(66): error C2065: 'MenuSceneDirectionType': 未声明的标识符
gen\src\classes\open_menu.cpp(66): error C2146: 语法错误: 标识符 'direction_type' 之前缺少 ')'
gen\src\classes\open_menu.cpp(66): error C2143: 语法错误: '{' 之前缺少 ';'
gen\src\classes\open_menu.cpp(66): error C2447: '{': 缺少函数头(旧式形式列表?)
gen\src\classes\open_menu.cpp(72): error C2653: 'actg': 不是类或命名空间名称
gen\src\classes\open_menu.cpp(72): error C2039: 'get_direction_type': 不是 'godot::OpenMenu' 的成员
gen\include\godot_cpp\classes\open_menu.hpp(46): note: 参见 'godot::OpenMenu' 的声明
gen\src\classes\open_menu.cpp(72): error C4430: 缺少类型说明符 - 假定为 int。注意:C++ 不支持默认 int
gen\src\classes\open_menu.cpp(72): error C2146: 语法错误: 标识符 'get_direction_type' 之前缺少 ';'
gen\src\classes\open_menu.cpp(72): error C2143: 语法错误: '{' 之前缺少 ';'
gen\src\classes\open_menu.cpp(72): error C2447: '{': 缺少函数头(旧式形式列表?)
1 个赞
还有一个问题,我认为这是核心问题。这需要 GGG 的协助。/core/extension/gdextension.cpp 中的底层代码表明,由于 GGG 设置 AGM 版本号的方式,任何 GDExtension 都无法正常工作。
gdextension 文件要求 compatibility_minimum="4.1.0" 或更高版本。如果引擎未检测到该值,会立即拒绝该 GDExtension。
但是,如果 compatibility_minimum 高于 version.py 中设置的 MAJOR_VERSION ,GDExtension 也会被拒绝。
AGM 的技术版本为 1.0.1,低于 compatibility_minimum。
但我们无法将 compatibility_minimum 设置为低于 4.1.0,否则会被拒绝。
if version > 4.1.0 && version < 1.0.1:
加载 GDExtension
else:
"不行"
}
if (parts[i] >= 0) {
compatibility_minimum[i] = parts[i];
}
}
} else {
ERR_PRINT("GDExtension configuration file must contain a \"configuration/compatibility_minimum\" key: " + p_path);
return ERR_INVALID_DATA;
}
if (compatibility_minimum[0] < 4 || (compatibility_minimum[0] == 4 && compatibility_minimum[1] == 0)) {
ERR_PRINT(vformat("GDExtension's compatibility_minimum (%d.%d.%d) must be at least 4.1.0: %s", compatibility_minimum[0], compatibility_minimum[1], compatibility_minimum[2], p_path));
return ERR_INVALID_DATA;
}
bool compatible = true;
// Check version lexicographically.
if (VERSION_MAJOR != compatibility_minimum[0]) {
compatible = VERSION_MAJOR > compatibility_minimum[0];
} else if (VERSION_MINOR != compatibility_minimum[1]) {
compatible = VERSION_MINOR > compatibility_minimum[1];
我的项目运行的是自定义引擎构建版本,但我们从未过多地修改过版本设置。我会尝试复现版本设置方案,如果这导致在我的环境中原本能正常工作的 GDExtension 失效,我将进一步排查。
根据我与一些人的交流,主要观点似乎是:AGM 类没有暴露那些专属于 Godot 的唯一类。问题可能出在 _bind_methods() 中未使用 VARIANT_ENUM_CAST(CoolEnum::Foo) 和 BIND_ENUM_CONSTANT(Foo::Val);,导致这些枚举未出现在转储的 JSON 文件中的 global_enums 里。
由于它们不存在,因此在解析这些错误时导致了失败。
以下是我遇到的错误:
In file included from godot-cpp\gen\src\classes\add_scene_effect.cpp:33:
godot-cpp\gen\include/godot_cpp/classes/add_scene_effect.hpp:54:30: error: 'actg' has not been declared
54 | void set_effect_type(actg::FilterType p_effect_type);
| ^~~~
godot-cpp\gen\include/godot_cpp/classes/add_scene_effect.hpp:54:47: error: expected ',' or '...' before 'p_effect_type'
54 | void set_effect_type(actg::FilterType p_effect_type);
| ^~~~~~~~~~~~~
godot-cpp\gen\include/godot_cpp/classes/add_scene_effect.hpp:55:9: error: 'actg' does not name a type
55 | actg::FilterType get_effect_type() const;
| ^~~~
godot-cpp\gen\src\classes\add_scene_effect.cpp:43:6: error: variable or field 'set_effect_type' declared void
43 | void AddSceneEffect::set_effect_type(actg::FilterType p_effect_type) {
| ^~~~~~~~~~~~~~
godot-cpp\gen\src\classes\add_scene_effect.cpp:43:38: error: 'actg' has not been declared
43 | void AddSceneEffect::set_effect_type(actg::FilterType p_effect_type) {
| ^~~~
godot-cpp\gen\src\classes\add_scene_effect.cpp:51:1: error: 'actg' does not name a type
51 | actg::FilterType AddSceneEffect::get_effect_type() const {
| ^~~~
他们说,或许 可以通过在 global_enums 中手动输入每个缺失的类来“欺骗”系统。
测试了错误版本的构建。
Godot 确实不喜欢你大幅修改 Engine 的 version.py 或其他地方的版本号。
我尝试了一个 4.4.1-stable 自定义构建,将其设置为 1.0.0,现在一个新的测试项目在尝试为 icon.svg 添加 .uid 时陷入循环,并且失败。
是的,GDExtension 加载被 core\extension\gdextension_library_loader.cpp:318 阻止了。
我需要阅读更多的引擎代码,我从未有过理由去梳理构建过程如何设置 version_generated.gen.h。对于一个想要拥有自己版本号但保持对正常 Godot GDExtensions 和资产库 ( godotengine.org (官方) ) 检查支持的引擎分支来说,最佳的长期解决方案是什么?
编辑:已解决循环问题。它读取 project.godot 并看到 config/features=PackedStringArray("1.0",这导致弹出窗口出现。但当它加载项目时,它知道引擎版本低于 4.4,因此不生成 .uid,再次看到 1.0 功能标签。不确定源代码中何处执行此检查,但对于替代版本号的分支来说,这也可能很重要。
1 个赞
Justus
2025 年6 月 17 日 14:06
11
@shadoWarbird @Brasten
我注意到在这个补丁中,开发者进行了一些工作以尝试修复版本问题。能否请您再试一次,看看问题是否仍然存在?
ACTION GAME MAKER v1.0.6 更新说明
此问题未在 1.0.6 中修复。兼容性检查仍然存在。
core\extension\gdextension.cpp:972 - GDExtension 仅与 Godot 版本 4.2.0 或更高版本兼容:res://addons/godot-git-plugin/git_plugin.gdextension
即使更改或移除 .gdextension 插件定义文件中的 compatibility_minimum。
compatibility_minimum = "1.0.6"
godot-cpp\src\godot.cpp:283 - 无法使用旧版本的 Godot (1.0.6) 加载为 Godot 4.2.0 构建的 GDExtension
core\extension\gdextension.cpp:951 - GDExtension 配置文件必须包含 "configuration/compatibility_minimum" 键:res://addons/godot-git-plugin/git_plugin.gdextension
我未提及此问题,因为这会引入另一组 MIT 致谢,但不同的 Fork 确实解决了这个问题……
摘要
Blazium Fork 确实创建了一种解决方法。它在 Version.py 和 version_generated.gen.h 生成中添加了完整的额外“外部”版本配置。外部版本用于在控制台和各种 GUI 位置(如右下角)中引用,而实际的 Godot 引擎版本则用于检查兼容性。
不幸的是,这对我来说似乎也不起作用。
res://addons/effekseer/src/EffekseerEffectImportPlugin.gd:53 - 解析错误:在当前作用域中未声明标识符 "EffekseerEffect"。
modules\gdscript\gdscript.cpp:2936 - 加载脚本 "res://addons/effekseer/src/EffekseerEffectImportPlugin.gd" 失败,错误为“解析错误”。(用户)
res://addons/effekseer/plugin.gd:26 - 无效调用。基类 'GDScript' 中不存在函数 'new'。
res://addons/pixelpart/src/PixelpartEffectResourceImportPlugin.gd:49 - 解析错误:在当前作用域中未声明标识符 "PixelpartEffectResource"。
modules\gdscript\gdscript.cpp:2936 - 加载脚本 "res://addons/pixelpart/src/PixelpartEffectResourceImportPlugin.gd" 失败,错误为“解析错误”。(用户)
res://addons/pixelpart/plugin.gd:12 - 无效调用。基类 'GDScript' 中不存在函数 'new'。
core\extension\gdextension.cpp:951 - GDExtension 配置文件必须包含 "configuration/compatibility_minimum" 键:res://addons/effekseer/effekseer.gdextension
加载资源失败:res://addons/effekseer/effekseer.gdextension。请确保至少一次在编辑器中打开项目以导入资源。
core\extension\gdextension.cpp:972 - GDExtension 仅兼容 Godot 4.1.0 或更高版本:res://addons/pixelpart/pixelpart-plugin.gdextension
加载资源失败:res://addons/pixelpart/pixelpart-plugin.gdextension。请确保至少一次在编辑器中打开项目以导入资源。
core\extension\gdextension.cpp:951 - GDExtension 配置文件必须包含 "configuration/compatibility_minimum" 键:res://addons/spine-godot-extension/spine_godot_extension.gdextension
加载资源失败:res://addons/spine-godot-extension/spine_godot_extension.gdextension。请确保至少一次在编辑器中打开项目以导入资源。
core\extension\gdextension.cpp:951 - GDExtension 配置文件必须包含 "configuration/compatibility_minimum" 键:res://addons/effekseer/effekseer.gdextension
加载资源失败:res://addons/effekseer/effekseer.gdextension。请确保至少一次在编辑器中打开项目以导入资源。
core\extension\gdextension.cpp:972 - GDExtension 仅兼容 Godot 4.1.0 或更高版本:res://addons/pixelpart/pixelpart-plugin.gdextension
加载资源失败:res://addons/pixelpart/pixelpart-plugin.gdextension。请确保至少一次在编辑器中打开项目以导入资源。
core\extension\gdextension.cpp:951 - GDExtension 配置文件必须包含 "configuration/compatibility_minimum" 键:res://addons/spine-godot-extension/spine_godot_extension.gdextension
加载资源失败:res://addons/spine-godot-extension/spine_godot_extension.gdextension。请确保至少一次在编辑器中打开项目以导入资源。
core\extension\gdextension.cpp:951 - GDExtension 配置文件必须包含 "configuration/compatibility_minimum" 键:res://addons/effekseer/effekseer.gdextension
加载资源失败:res://addons/effekseer/effekseer.gdextension。请确保至少一次在编辑器中打开项目以导入资源。
core\extension\gdextension.cpp:972 - GDExtension 仅兼容 Godot 4.1.0 或更高版本:res://addons/pixelpart/pixelpart-plugin.gdextension
加载资源失败:res://addons/pixelpart/pixelpart-plugin.gdextension。请确保至少一次在编辑器中打开项目以导入资源。
core\extension\gdextension.cpp:951 - GDExtension 配置文件必须包含 "configuration/compatibility_minimum" 键:res://addons/spine-godot-extension/spine_godot_extension.gdextension
加载资源失败:res://addons/spine-godot-extension/spine_godot_extension.gdextension。请确保至少一次在编辑器中打开项目以导入资源。
我要说的是,这些错误似乎与之前不同。我查看了 GDExtension.cpp 文件,发现其中有 20 处 compatibility_minimum 和 10 处 compatibility_maximum,因此可能需要在多个位置进行修改。它们似乎都位于第 929 到 988 行之间,因此至少在该部分是集中的。
我还尝试使用转储的 JSON 和头文件重新编译源代码,但仍然存在问题。
Justus
2025 年6 月 18 日 05:53
14
明白了。@Brasten @shadoWarbird 我已报告此问题。希望他们能先解决版本问题。
Justus
2025 年6 月 19 日 09:22
15
1.0.7 之后,AGM 恢复了 Godot 的版本控制模式,并维护了一个独立的版本号。让我们看看进展如何。@shadoWarbird @Brasten
目前为止有一个成功。
无需重新编译,Terrain3D 1.0.0 Release v1.0.0-stable · TokisanGames/Terrain3D · GitHub
虽然对 AGM 没有直接用处,但某些类型的 2D 游戏可以在 Subviewport 中利用 3D 背景元素。
Effekseer 已加载,但我不熟悉它,因此无法判断它是否正常工作。
https://github.com/effekseer/EffekseerForGodot4/releases/tag/1.70e.9
除非您从 GDExtension 访问 AGM 功能,否则我认为它们不需要重新编译。Orchestrator 则需要重新编译。4.3 目标版本会导致 AGM 拒绝加载。但由于它正在尝试读取类和方法以创建 Visual Scripting 节点,我并不感到惊讶。
2 个赞
Justus
2025 年6 月 19 日 15:48
17
非常感谢您的确认!这是迄今为止首个确认可在 AGM 上运行的 GDExtension。我很高兴我们迈出了这一步。
我成功让 Spine2D 和 Pixelpart 在 Windows 上运行并导出:
我在加载 effekseer 时遇到了问题,但据我了解,它在 Godot 4.3 中完全无法工作,需要 Godot 4.4 才能运行。
至少根据我的经验,如果它在 Godot 4.3 中可用,那么在 AGM 中也能正常工作。
1 个赞
Baz
2025 年6 月 19 日 20:36
19
幸运的是,将 AGMaker 升级到 Godot 4.4 已在路线图之中!
2 个赞
你好!我最近回来尝试看看 GDExtension 的支持情况,我觉得它可能又出问题了。
ERROR: 尝试获取不存在的接口函数: 'get_godot_version2'。
ERROR: godot-cpp\\src\\godot.cpp:150 - 无法加载 GDExtension 接口函数 get_godot_version2()
ERROR: core\\extension\\gdextension_library_loader.cpp:233 - GDExtension 初始化函数 'spine_godot_library_init' 返回错误。
ERROR: core\\extension\\gdextension_library_loader.cpp:233 - GDExtension 初始化函数 'effekseer_library_init' 返回错误。
看起来 GDExtension 的检查再次无法正确检测 Godot 的版本了。