this post was submitted on 01 Oct 2024
2 points (100.0% liked)

Godot: The open source game engine

21 readers
1 users here now

A community for discussion and support in development with the Godot game engine.

founded 1 year ago
MODERATORS
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/godot by /u/WestZookeepergame954 on 2024-10-01 08:50:42+00:00.


Up until now, if you wanted adaptive music in your game, you had to either build your own system or rely on third-party programs like Fmod or Wwise. But with the release of Godot 4.3, that's no longer necessary! The new interactive audio system is now built directly into the engine—and it works great!

There are still a few bugs that I expect will be ironed out in version 4.4, but overall, this is a huge addition that could be a game changer in the world of game engines.

I’ve created two small demo scenes to showcase some of the new features, and both are available on GitHub:

1. Vertical layering: Using AudioStreamSynchronized, I adjusted the volume of each music layer based on the player’s position.

2. Segments and transitions: usingAudioStreamInteractive, I started with an intro and then transitioned into the base loop.

I used transition segments to smoothly move between music loops (each in a different key, which is why the transition was necessary).

The transitions are quantized to change only at the start of a musical bar (which is why it might take time before the transition starts), but you could also quantize to the nearest beat or cancel quantize altogether.

Currently, the documentation on how to switch clips in code is a bit sparse. But I found this helpful line in the docs' comments section:

AudioStreamPlayer["parameters/switch_to_clip"] = &clip_name

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here