Future Support for GDExtension?

Hello,

I’m super excited about the release of Action Game Maker. I use Godot for making games and I was very interested when I saw Action Game Maker would be based off Godot. I’ve tried the demo out and I’ve been very pleased with the results.

One issue I have is that GDExtensions do not currently appear to work in 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

I was wondering if in the future Action Game Maker will support GDExtensions as there are many powerful plugins that I think would benefit into Action Game Maker?

1 Like

Hey there! I found this in one of the early producer letters:

As ACTION GAME MAKER’s additional functions are closed source, any plug-in or function changes that require a recompile of Godot are not supported for use with ACTION GAME MAKER.

From what I understand, GDExtensions need to recompile, so I don’t think they are useable with AGMaker.

I did some looking on the godot engine documentation and I found this link: What is GDExtension? — Godot Engine (stable) documentation in English

Generally speaking, if you build a custom version of Godot, you should generate an extension_api.json from it for your GDExtensions, because it may have some differences from official Godot builds.

It may be theoretically possible to compile an open-source GDExtension targeting Action Game Maker if we had that extension_api.json file included somewhere with the installation. This is the one Godot has on their github:

2 Likes

That is interesting!

Could be something to look into down the road, thanks for the info.

1 Like

You can dump the extension_api.json by dragging the agm.windows.editor.x86_64.exe into PowerShell or Command Prompt and adding --dump-extension-api .

Per Building the C++ bindings

I’ll see about comparing it later vs Godot 4.3.0 but the important note is the header.

"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"
	},

There are some other additions. I have 12 counts for game_object.

Yeah, truth be told I’ve been trying to see if it was possible to recompile one of the GDExtensions plugins to target action game maker using that method. Unfortunately, I’ve been running into errors and I don’t know if it’s because I don’t have the right build environment set up for it or if there’s some other issues preventing it from building correctly.

Edit: Also, this wasn’t mentioned in the godot docs but in a readme for header-cpp there is actually two commands you can use:
--dump-extension-api which nets you the extension_api.json
&
--dump-gdextension-interface which nets you a gdextension_interface.h header file.

I know my build environment is valid.

The errors I get with the dumped json and c++ header.

Trying to get the Git plug-in working

open_menu.hpp looks like it’s new to AGM. I doubt we’ll get GGG to release that. But I don’t think it’s actually a problem.

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?)

There’s another problem that I think is the core issue. That will need GGG’s help. The underlying code in /core/extension/gdextension.cpp reads like it is going to stop any GDExtensions from working with the way GGG setup the AGM Version numbering.

The gdextension file requires a compatibility_minimum="4.1.0" or higher. If the engine doesn’t see that, it rejects the GDExtension immediately.

But if the compatibility_minimum is higher than the MAJOR_VERSION set in version.py , the GD Extension will be rejected.

AGM is technically version 1.0.1 , lower than the compatibility_minimum.

But we can’t set compatibility_minimum below 4.1.0 without it being rejected.

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

My work runs a custom engine build, but we’ve never messed with the versioning that much. I’ll see about replicating the Versioning setup and if it breaks GDExtensions I know work on my setup.

From some people I talked to, the main theory seems to be that the AGM classes don’t expose the unique classes that are exclusive from Godot. Something about not using
VARIANT_ENUM_CAST(CoolEnum::Foo) + BIND_ENUM_CONSTANT(Foo::Val); in _bind_methods() keeps it from appearing in the global_enums in the dumped json file.

And since it’s not there, it’s causing failures in resolving those errors.
These were my errors:

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 {
      | ^~~~

They said it might be possible to trick it by manually typing in each of the missing classes in the global_enums.

Tested wrong version build.

Godot really does not like it when you majorly mess with the Engine version.py , or the version numbering elsewhere.

I tried a 4.4.1-stable custom build setting it to 1.0.0 , and now a new test project is looping trying add a .uid for the icon.svg. And failing to do so.

Yes, the GDExtension loading is stopped by core\extension\gdextension_library_loader.cpp:318 .

I need to do more engine code reading, I’ve never had a reason to map out how the build process sets the version_generated.gen.h . And what would be the best long term solution for an engine fork that wanted its own version numbering, but maintains support/connection to normal Godot GDExtensions and Asset Library ( godotengine.org (Official) ) checks.

edit: Figured out the looping. It reads the project.godot and sees config/features=PackedStringArray("1.0" , which causes the pop-up to appear. But when it loads the project it knows it’s lower Engine version than 4.4, so it doesn’t generate .uids, and again sees the 1.0 feature tag. Not sure where in source it’s doing the check, but also probably important for alternatively versioned forks.

1 Like

@shadoWarbird @Brasten
I noticed in this patch the dev did some work try to fix version issue. Could you please try it again to see whether issue is still there?
ACTION GAME MAKER v1.0.6 Patch Notes

  • 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 Likes

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 Like

Luckily upgrading AGMaker to Godot 4.4 is on the roadmap!

2 Likes