GDExtensionへの今後のサポートはありますか?

こんにちは、

Action Game Maker のリリースを心から楽しみにしています。私はゲーム制作に Godot を使用しており、Action Game Maker が Godot ベースであると知ったとき、非常に興味を持ちました。デモを試してみましたが、その結果には非常に満足しています。

一つ問題があります。現在、GDExtensions は Action Game Maker では動作していないようです。

 core\extension\gdextension.cpp:970 - GDExtension only compatible with Godot version 4.1.0 or later: res://spine_godot_extension.gdextension

  Failed loading resource: res://spine_godot_extension.gdextension. Make sure resources have been imported by opening the project in the editor at least once.

  core\extension\gdextension.cpp:970 - GDExtension only compatible with Godot version 4.2.0 or later: res://addons/effekseer/effekseer.gdextension

将来、Action Game Maker が GDExtensions をサポートするかどうかお伺いしたいです。多くの強力なプラグインがあり、それらが Action Game Maker に役立つと考えているためです。

「いいね!」 1

こんにちは!早期のプロデューサーレターで見つけたものをご紹介します:

ACTION GAME MAKER の追加機能はクローズドソースであるため、Godot の再コンパイルを必要とするプラグインや機能の変更は、ACTION GAME MAKER との併用がサポートされていません。

私の理解では、GDExtensions は再コンパイルが必要となるため、AGMaker とは使用できないと考えています。

Godot エンジンのドキュメントを調べてみたところ、以下のリンクを見つけました:What is GDExtension? — Godot Engine (stable) documentation in English

一般的に、Godot のカスタムバージョンをビルドする場合は、公式の Godot ビルドと一部異なる可能性があるため、GDExtensions 用にそのバージョンから extension_api.json を生成すべきです。

もしインストール時に extension_api.json ファイルがどこかに含まれていれば、Action Game Maker を対象としたオープンソースの GDExtension をコンパイルすることは理論上可能かもしれません。Godot が GitHub に公開しているファイルは以下の通りです:

「いいね!」 2

それは興味深いですね!

将来的に検討する価値がありそうです。情報ありがとうございます。

「いいね!」 1

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 には実際には以下の 2 つのコマンドを使用できます:
--dump-extension-api これにより extension_api.json が取得できます
&
--dump-gdextension-interface これにより gdextension_interface.h ヘッダーファイルが取得できます。

ビルド環境は有効であることを確認しています。

ダンプされた JSON と C++ ヘッダーで発生するエラーは以下の通りです。

Git プラグインの動作を確認しようとしています。

open_menu.hpp は AGM にとって新しいもののようです。GGG がこれをリリースするとは思いませんが、実際には問題ではないと考えています。

gen\include\godot_cpp\classes\open_menu.hpp(55): error C2653: 'actg': is not a class or namespace name
gen\include\godot_cpp\classes\open_menu.hpp(55): error C2061: syntax error: identifier 'MenuSceneDirectionType'
gen\include\godot_cpp\classes\open_menu.hpp(56): error C2653: 'actg': is not a class or namespace name
gen\include\godot_cpp\classes\open_menu.hpp(56): error C3646: 'get_direction_type': unknown override specifier
gen\include\godot_cpp\classes\open_menu.hpp(56): error C2059: syntax error: '('
gen\include\godot_cpp\classes\open_menu.hpp(56): error C2238: unexpected token(s) preceding ';'
gen\src\classes\open_menu.cpp(66): error C2653: 'actg': is not a class or namespace name
gen\src\classes\open_menu.cpp(66): error C2065: 'MenuSceneDirectionType': undeclared identifier
gen\src\classes\open_menu.cpp(66): error C2146: syntax error: missing ')' before identifier 'direction_type'
gen\src\classes\open_menu.cpp(66): error C2143: syntax error: missing ';' before '{'
gen\src\classes\open_menu.cpp(66): error C2447: '{': missing function header (old-style formal list?)
gen\src\classes\open_menu.cpp(72): error C2653: 'actg': is not a class or namespace name
gen\src\classes\open_menu.cpp(72): error C2039: 'get_direction_type': is not a member of 'godot::OpenMenu'
gen\include\godot_cpp\classes\open_menu.hpp(46): note: see declaration of 'godot::OpenMenu'
gen\src\classes\open_menu.cpp(72): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
gen\src\classes\open_menu.cpp(72): error C2146: syntax error: missing ';' before identifier 'get_direction_type'
gen\src\classes\open_menu.cpp(72): error C2143: syntax error: missing ';' before '{'
gen\src\classes\open_menu.cpp(72): error C2447: '{': missing function header (old-style formal list?)

別の問題があり、それが根本的な原因だと考えています。これには GGG の支援が必要です。/core/extension/gdextension.cpp の基盤となるコードは、GGG が AGM のバージョン番号を設定した方法により、すべての GDExtension が機能しなくなるように書かれているようです。

gdextension ファイルには compatibility_minimum="4.1.0" 以上の指定が必要です。エンジンがこれを確認できない場合、GDExtension は即座に拒否されます。

しかし、compatibility_minimumversion.py に設定された MAJOR_VERSION よりも高い場合、GDExtension は拒否されます。

AGM は技術的にはバージョン 1.0.1 であり、compatibility_minimum よりも低くなっています。

しかし、compatibility_minimum を 4.1.0 未満に設定すると拒否されてしまうため、それを下げることはできません。

if version > 4.1.0 && version < 1.0.1:
    load GDExtension
else:
    "nope"

私の作業ではカスタムエンジンビルドを使用していますが、バージョン管理をこれほど深くいじったことはありません。バージョン管理の設定を再現し、私の環境で動作している 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 に設定してテストしましたが、新しいテストプロジェクトがアイコン.svg の .uid を追加しようとループし、失敗しています。

はい、GDExtension の読み込みは core\extension\gdextension_library_loader.cpp:318 で停止されています。

エンジンコードをさらに読む必要があります。ビルドプロセスが version_generated.gen.h をどのように設定するかをマッピングしたことはなく、また、独自のバージョン番号を持ちつつ、通常の Godot GDExtension やアセットライブラリ ( godotengine.org (公式) ) のチェックとのサポート/接続を維持したいエンジンフォークにとって、最善の長期的な解決策は何でしょうか。

編集:ループの原因を特定しました。project.godot を読み込み、config/features=PackedStringArray("1.0" を検出すると、ポップアップが表示されます。しかし、プロジェクトを読み込む際、エンジンバージョンが 4.4 よりも低いことを知っているため、.uid を生成せず、再び 1.0 の機能タグを確認します。ソースコードのどこでチェックが行われているかは不明ですが、バージョンが異なるフォークにおいても重要である可能性が高いです。

「いいね!」 1

@shadoWarbird @Brasten
今回のパッチで、開発者がバージョン問題の修正に取り組んだことに気づきました。もう一度試して、問題がまだ残っているか確認していただけませんか?
ACTION GAME MAKER v1.0.6 パッチノート

  • Resolved issues caused by version restrictions in third-party tools.

This was not fixed in 1.0.6. The compatibility check remains.

core\extension\gdextension.cpp:972 - GDExtension only compatible with Godot version 4.2.0 or later: res://addons/godot-git-plugin/git_plugin.gdextension

Even with changing or removing compatibility_miniumum the .gdextension plugin definition file.

compatibility_minimum = "1.0.6"

godot-cpp\src\godot.cpp:283 - Cannot load a GDExtension built for Godot 4.2.0 using an older version of Godot (1.0.6)

core\extension\gdextension.cpp:951 - GDExtension configuration file must contain a "configuration/compatibility_minimum" key: res://addons/godot-git-plugin/git_plugin.gdextension

I didn’t mention it because it would be mixing in another set of MIT credits but a different Fork did solve this…

Summary

The Blazium Fork did create a way to address this. It adds a whole extra “external” version configurations to the Version.py and version_generated.gen.h generation. The external version is what gets referenced in the Console and various gui places (like bottom right). While the actual Godot engine version is used to check compatibility.

Unfortunately, it does not seem to work for me either.

  res://addons/effekseer/src/EffekseerEffectImportPlugin.gd:53 - Parse Error: Identifier "EffekseerEffect" not declared in the current scope.
  modules\gdscript\gdscript.cpp:2936 - Failed to load script "res://addons/effekseer/src/EffekseerEffectImportPlugin.gd" with error "Parse error". (User)
  res://addons/effekseer/plugin.gd:26 - Invalid call. Nonexistent function 'new' in base 'GDScript'.
  res://addons/pixelpart/src/PixelpartEffectResourceImportPlugin.gd:49 - Parse Error: Identifier "PixelpartEffectResource" not declared in the current scope.
  modules\gdscript\gdscript.cpp:2936 - Failed to load script "res://addons/pixelpart/src/PixelpartEffectResourceImportPlugin.gd" with error "Parse error". (User)
  res://addons/pixelpart/plugin.gd:12 - Invalid call. Nonexistent function 'new' in base 'GDScript'.
  core\extension\gdextension.cpp:951 - GDExtension configuration file must contain a "configuration/compatibility_minimum" key: res://addons/effekseer/effekseer.gdextension
  Failed loading resource: res://addons/effekseer/effekseer.gdextension. Make sure resources have been imported by opening the project in the editor at least once.
  core\extension\gdextension.cpp:972 - GDExtension only compatible with Godot version 4.1.0 or later: res://addons/pixelpart/pixelpart-plugin.gdextension
  Failed loading resource: res://addons/pixelpart/pixelpart-plugin.gdextension. Make sure resources have been imported by opening the project in the editor at least once.
  core\extension\gdextension.cpp:951 - GDExtension configuration file must contain a "configuration/compatibility_minimum" key: res://addons/spine-godot-extension/spine_godot_extension.gdextension
  Failed loading resource: res://addons/spine-godot-extension/spine_godot_extension.gdextension. Make sure resources have been imported by opening the project in the editor at least once.
  core\extension\gdextension.cpp:951 - GDExtension configuration file must contain a "configuration/compatibility_minimum" key: res://addons/effekseer/effekseer.gdextension
  Failed loading resource: res://addons/effekseer/effekseer.gdextension. Make sure resources have been imported by opening the project in the editor at least once.
  core\extension\gdextension.cpp:972 - GDExtension only compatible with Godot version 4.1.0 or later: res://addons/pixelpart/pixelpart-plugin.gdextension
  Failed loading resource: res://addons/pixelpart/pixelpart-plugin.gdextension. Make sure resources have been imported by opening the project in the editor at least once.
  core\extension\gdextension.cpp:951 - GDExtension configuration file must contain a "configuration/compatibility_minimum" key: res://addons/spine-godot-extension/spine_godot_extension.gdextension
  Failed loading resource: res://addons/spine-godot-extension/spine_godot_extension.gdextension. Make sure resources have been imported by opening the project in the editor at least once.
  core\extension\gdextension.cpp:951 - GDExtension configuration file must contain a "configuration/compatibility_minimum" key: res://addons/effekseer/effekseer.gdextension
  Failed loading resource: res://addons/effekseer/effekseer.gdextension. Make sure resources have been imported by opening the project in the editor at least once.
  core\extension\gdextension.cpp:972 - GDExtension only compatible with Godot version 4.1.0 or later: res://addons/pixelpart/pixelpart-plugin.gdextension
  Failed loading resource: res://addons/pixelpart/pixelpart-plugin.gdextension. Make sure resources have been imported by opening the project in the editor at least once.
  core\extension\gdextension.cpp:951 - GDExtension configuration file must contain a "configuration/compatibility_minimum" key: res://addons/spine-godot-extension/spine_godot_extension.gdextension
  Failed loading resource: res://addons/spine-godot-extension/spine_godot_extension.gdextension. Make sure resources have been imported by opening the project in the editor at least once.

I will say that the errors do seem to be different from before. I peeked in the GDExtension.cpp file and it had 20 instances of compatibility_minimum and 10 instances of compatibility_maximum so it may need to be changed in multiple places. They all seem to be between lines 929-988, so it’s at least condensed in that section.

I also tried a source recompile using the dumped jsons and header and still had issues.

Got it. @Brasten @shadoWarbird I have report this issue. Hope they could resolve the version issue first.

After 1.0.7, AGM reverted to Godot’s versioning mode and also maintained a separate version number. Let’s see if things have progressed. @shadoWarbird @Brasten

One success so far.

No Recompile needed, Terrain3D 1.0.0 Release v1.0.0-stable · TokisanGames/Terrain3D · GitHub

Not directly AGM useful but there are some styles of 2D game that can make use of 3D background elements in a Subviewport.

Effekseer loads, but I’m not familiar with it so can’t tell if it’s working.

https://github.com/effekseer/EffekseerForGodot4/releases/tag/1.70e.9

Unless you’re accessing AGM features from the GDExtension I don’t think they’ll need to be recompiled. Orchestrator will need to be. The 4.3 target version makes AGM to refuse to load. But since it’s trying to read Classes and Methods to make Visual Scripting nodes, I’m not surprised.

「いいね!」 2

Thank you very much for your confirmation! This is the first GDExtension confirmed to run on AGM so far. I’m glad we’ve taken this step.

I got both Spine2D and Pixelpart to run and export on Windows:

I had trouble getting effekseer to load but from what I understand it doesn’t work in Godot 4.3 at all and needs Godot 4.4 to work.

At least in my experience, if it works in Godot 4.3, then it works in AGM now.

「いいね!」 1

Luckily upgrading AGMaker to Godot 4.4 is on the roadmap!

「いいね!」 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のバージョンを再び検出できていないようです。