This skill should be used when the user asks to "create sound effects", "make music", "implement audio", "design sounds", or mentions SFX, music composition, audio implementation, or sound design.
Guide the creation and implementation of audio for a 2D action-RPG, optimized for solo development.
Free:
Paid:
Layer for Impact:
Attack sound = Attack swoosh + Impact thud + Feedback ring
= 3 sounds, mixed together
Variations Prevent Fatigue:
Match Visual Timing:
| Sound | Duration | Notes |
|---|---|---|
| Attack swing | 0.1-0.2s | Whoosh, varies by weapon |
| Attack hit | 0.1-0.15s | Impact, satisfying punch |
| Hurt | 0.2-0.3s | Grunt or impact |
| Death | 0.3-0.5s | Dramatic, final |
| Footsteps | 0.05-0.1s | 2-4 variations |
| Dodge/Roll | 0.1-0.2s | Swift movement |
| Sound | Duration | Notes |
|---|---|---|
| Alert/Aggro | 0.2-0.3s | Notice player |
| Attack | 0.1-0.2s | Per enemy type |
| Hurt | 0.1-0.2s | Brief, per type |
| Death | 0.2-0.4s | Satisfying, varied |
| Sound | Duration | Notes |
|---|---|---|
| Menu navigate | 0.05s | Subtle blip |
| Confirm/Select | 0.1s | Positive tone |
| Cancel/Back | 0.1s | Lower tone |
| Error/Invalid | 0.1s | Distinct negative |
| Item pickup | 0.15s | Rewarding |
| Level up | 0.3-0.5s | Celebratory |
| Sound | Duration | Notes |
|---|---|---|
| Door open | 0.3s | Mechanical |
| Chest open | 0.3-0.5s | Anticipation + reward |
| Save point | 0.2s | Reassuring |
| Hazard | Loop | Warning indication |
1. Licensed Music
2. Royalty-Free
3. Commission
4. Create Yourself
| Track Type | When Played | Priority |
|---|---|---|
| Menu theme | Title screen | Medium |
| Hub/Safe | Safe zones | High |
| Exploration | Traversing zones | High |
| Combat | Active fighting | High |
| Boss | Boss encounters | High |
| Victory | Quest/boss complete | Medium |
| Game Over | Player death | Low |
Minimum for Launch: 3-4 tracks (safe, exploration, combat, boss)
Master
├── Music
│ └── Ducking (lower during combat)
├── SFX
│ ├── Player
│ ├── Enemies
│ └── Environment
├── UI
└── Ambient
class_name AudioManager
extends Node
@onready var music_player: AudioStreamPlayer = $MusicPlayer
@onready var sfx_pool: Array[AudioStreamPlayer] = []
var current_music: String = ""
func play_sfx(sfx_name: String, position: Vector2 = Vector2.ZERO):
var stream = load("res://audio/sfx/" + sfx_name + ".wav")
var player = get_available_player()
if player:
player.stream = stream
player.pitch_scale = randf_range(0.95, 1.05) # Slight variation
player.play()
func play_music(track_name: String, fade_duration: float = 1.0):
if track_name == current_music:
return
var new_stream = load("res://audio/music/" + track_name + ".ogg")
# Crossfade
var tween = create_tween()
tween.tween_property(music_player, "volume_db", -40, fade_duration)
await tween.finished
music_player.stream = new_stream
music_player.play()
tween = create_tween()
tween.tween_property(music_player, "volume_db", 0, fade_duration)
current_music = track_name
# For sounds that should feel spatial
func play_sfx_at_position(sfx_name: String, position: Vector2):
var player = AudioStreamPlayer2D.new()
player.stream = load("res://audio/sfx/" + sfx_name + ".wav")
player.global_position = position
player.max_distance = 500 # Adjust for game scale
add_child(player)
player.play()
player.finished.connect(player.queue_free)
Lower music during important SFX:
func play_important_sfx(sfx_name: String):
AudioServer.get_bus_effect(music_bus_idx, compressor_idx).enabled = true
play_sfx(sfx_name)
await get_tree().create_timer(0.3).timeout
AudioServer.get_bus_effect(music_bus_idx, compressor_idx).enabled = false
Base loop (always playing)
+ Combat layer (crossfade when enemies near)
+ Boss layer (add intensity in boss fights)
var footstep_sounds = [
preload("res://audio/sfx/footstep_1.wav"),
preload("res://audio/sfx/footstep_2.wav"),
preload("res://audio/sfx/footstep_3.wav")
]
var last_footstep = -1
func play_footstep():
var idx = randi() % footstep_sounds.size()
# Avoid immediate repeat
while idx == last_footstep and footstep_sounds.size() > 1:
idx = randi() % footstep_sounds.size()
last_footstep = idx
play_sfx_from_stream(footstep_sounds[idx])
| Type | Format | Notes |
|---|---|---|
| SFX | .wav | Uncompressed, low latency |
| Music | .ogg | Compressed, streaming |
| Loops | .ogg | Seamless loop points |
references/audio-mixing.md - Mixing and balancing guidereferences/sfx-creation.md - Creating SFX with free toolsexamples/audio-manager.gd - Complete audio managerexamples/sfx-list-template.md - SFX tracking sheet