A Dino addon.
---
I'm really out of my depth on music in games, but I love the idea of making something from scratch.
Probably the advice is find some free assets and give credit
But it feels less personal, and I think music should be personal. As long as it gets out of that sounds-like-shit phase.
When implementing Gunner and Tower, I used a large map like:
extends Node
func _ready():
setup_sounds()
###########################################################################
# sounds
onready var sounds = {
"fire":
[
preload("res://assets/sounds/laser1.sfxr"),
preload("res://assets/sounds/laser2.sfxr"),
],
"jump":
[
preload("res://assets/sounds/jump1.sfxr"),
preload("res://assets/sounds/jump2.sfxr"),
preload("res://assets/sounds/jump3.sfxr"),
],
"pickup":
[
preload("res://assets/sounds/pickup1.sfxr"),
],
}
var sound_map
func setup_sounds():
sound_map = DJ.setup_sound_map(sounds)
func play_sound(name):
if name in sound_map:
var s = sound_map[name]
DJ.play_sound_rand(s, {"vary": 0.4})
else:
Debug.warn("no sound for name", name)
func interrupt_sound(name):
if name in sound_map:
for s in sound_map[name]:
if s.is_playing():
s.stop()
This lets you play sounds with just:
GunnerSounds.play("fire")
It randomly selects a sound, and randomly modifies the pitch.