Good Practice regarding Music?

Hi all,

I was wondering if there is ever a reason to not use an autoload to handle music in your game? SFX is different, because of the number of different effects and positioning, so it makes sense for each scene to handle their effects themselves, but to make music flow effectively, I feel like you should always use an autoload. You can easily control which music file you want to play and have complete control to make sure music doesn’t play over each other. Does anyone agree or disagree?

I agree, I’ve been playing around with static functions and variables along side class_names. It’s almost the same thing, but you don’t actually have to register an auto load. Not sure of draw backs.

Yes, I agree. :smiley: I can’t think of any drawbacks with my current knowledge.

That’s how I do it, I have a very limited number of autoloads, but the overarching main one that handles save and exit functions also handles the function to start, stop, pause, and queue music.

I somehow started thinking about this again. I guess it may depend on how music is used. If it’s a different song per level, area, sequenced with cutscenes, having a Singleton my not be really practical.

You may want a global volume option but a dedicated music audio bus can take care of that. And a music class that can force music volume during a cutscenes.

I think it could be practical to keep music player class in every applicable scene used…

I was wondering if there is ever a reason not to use autoload to handle music in your game? SFX is different because of the number of different effects and positioning, so it makes sense for each scene to handle their effects themselves, but to make music flow effectively, I feel like you should always use an autoload. You can easily control which music file you want to play and have complete control to make sure music doesn’t play over each other. Does anyone agree or disagree?

What are your thoughts on this approach to handling music in games? refer: Audio - Godot Forumclick here