utopia-rise / fmod-gdextension

FMOD Studio GDExtension bindings for the Godot game engine
MIT License
439 stars 48 forks source link

Upgrade to Godot 4.0 (GDExtension) #121

Closed bitbrain closed 4 months ago

bitbrain commented 2 years ago

fmod-gdextension-logo

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

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

TODOs

piiertho commented 2 years ago

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 commented 2 years ago

@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 commented 2 years ago

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 commented 2 years ago

Made already some decent progress on https://github.com/utopia-rise/fmod-gdnative/pull/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:

bitbrain commented 2 years ago

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

SeanLatimer commented 1 year ago

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 commented 1 year ago

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 commented 4 months ago

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 commented 4 months ago

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