Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Godot 4.0 (GDExtension) #121

Closed
3 of 15 tasks
bitbrain opened this issue Jul 18, 2022 · 9 comments · Fixed by #123
Closed
3 of 15 tasks

Upgrade to Godot 4.0 (GDExtension) #121

bitbrain opened this issue Jul 18, 2022 · 9 comments · Fixed by #123
Labels
godot4 This pull request or feature is meant for Godot 4

Comments

@bitbrain
Copy link
Contributor

bitbrain commented Jul 18, 2022

fmod-gdextension-logo

This ticket is to track anything we might need to consider when upgrading to 4.0. A few initial thoughts:

  • surely, we want to keep the 3.x compability - perhaps we might want to introduce a complete new repository for this (as 3.x is built on gdnative, while the 4.x version should utilise the GDExtension system)
  • by using GDExtension, we might be able to finally tackle FMOD web support (HTML5) #50 as with gdnative this is rather difficult (due to its inflexibility)
  • we might want to try to "just update" this repository first to 4.x to see what happens or what breaks and document it as some form of "PoC PR"
  • how are we going to maintain both 3.x and 4.x in parallel? We might need to consider some sort of cherrypick mechanism like Godot has (they do it via labels and cherry-pick squash commits onto their branches)

Any feedback or ideas welcome how we can ideally introduce FMOD support for Godot 4!

TODOs

@piiertho
Copy link
Member

Hello ! This ticket is definitely a good idea.
I think we should stay with this repo for now, as we rely on godot-cpp.
I would do what we do on godot Kotlin repository: stay with master bind to current official version, and create a 4.0-adaptation branch to work and PR from for 4.0 work.
When we want to add a feature to both 3.x and 4.0, we would first do it on master, and then rebase the 4.0-adaptation branch.
By doing this way, we will keep a linear history.

@bitbrain
Copy link
Contributor Author

@piiertho I will have a dabble at this as well, simply because I am planning to upgrade my game to Godot 4 and this plugin is the biggest blocker at the moment (Dialogic 2 is currently actively migrated to Godot 4 already)

In case you are curious what I am building with FMOD (all ingame sounds + NPC voices come from this plugin)

@bitbrain
Copy link
Contributor Author

bitbrain commented Jul 27, 2022

Started off with something very basic: https://github.com/utopia-rise/fmod-gdnative/compare/godot-4.0-adaption

Looks like includes need adjustments for sure:

fmod-gdnative\src\godot_fmod.h(4): fatal error C1083: Cannot open include file: 'Godot.hpp': No such file or directory

This tutorial suggests that now includes look more like this:

#include <classes/control.hpp>
#include <classes/global_constants.hpp>
#include <classes/viewport.hpp>
#include <core/binder_common.hpp>

Also, gdscript syntax changed completely. I am also not sure yet how we are going to "ship" the addon, as it seems to be in the format of something along the lines of fmod.gdextension with some *.dll files on the side. Can we just use it as an addon? Will this work? or do *.gdextension files need to go into the root directory of any Godot project?

I'll have a play!

@bitbrain
Copy link
Contributor Author

Made already some decent progress on #123 but there is still some way to go (see TODOs). Eventually, once the PR gets merged into the godot-4.x branch we might want to consider asking some non-technical questions:

  • when should we do the "official switch" to the Godot 4 branch as the default one? (so the current master becomes godot-3.x and is probably just maintenance then?)
  • should we consider renaming this repository once we do the switch? fmod-gdnative makes sense for Godot 3 but something like fmod-gdextension might be a better name for Godot 4 once we do the swap

@bitbrain bitbrain linked a pull request Aug 15, 2022 that will close this issue
19 tasks
@bitbrain bitbrain added the godot4 This pull request or feature is meant for Godot 4 label Aug 15, 2022
@bitbrain
Copy link
Contributor Author

Another name idea for this repo could be simply godot-fmod

@CedNaru CedNaru pinned this issue Jan 3, 2023
@SeanLatimer
Copy link

I had a poke at the godot-4.x branch recently and found an issue with exported projects where calls to Fmod.load_file_as_sound (possibly load_file_as_music too) cause an access violation. With those components removed, the demo project does export and play the other sounds from banks correctly.

@nickpolet
Copy link

Has there been much update to this? Really hoping that a stable godot 4.x fmod plugin makes it's way to the asset store eventually. Once you've seen what fmod can do, it's tricky going back to godot's default audio system.

@3ter
Copy link

3ter commented May 18, 2024

This issue should be at least renamed, shouldn't it? To avoid confusion in what versions of Godot are supported. Especially as it's pinned.

@piiertho
Copy link
Member

This issue should be at least renamed, shouldn't it? To avoid confusion in what versions of Godot are supported. Especially as it's pinned.

You're right, this issue is completed for a while, we support 4.x now

@piiertho piiertho unpinned this issue May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
godot4 This pull request or feature is meant for Godot 4
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants