Skip to content

Commit

Permalink
Action Sounds (#14)
Browse files Browse the repository at this point in the history
* Action Sounds

* Initial Theme

Not really sure about this one though

* Godot Import Files

* Menu Sounds

* Set loops to loop

* hooked up sounds

* Fix volume and length

* Fixed length

* Added Player Death

* Sytanx

* Update Sandbox1.tscn

* Fixing coin sound

* Set intro to loop

* Added pause and resume sounds

* Removed default stream

* Removed looping

* Fixing sound loop

* Removing positional 2D sound

* Clearing warnings

* Reset difficulty on load

* Added difficulty reset function

* Syntax

* Hooked up game over sound

* Allow player to shoot rock

* Compiled theme to one file

* Empty fire sound

* Reduced pause and resume volume

* Hooked up no ammo sound

* Formatting

* Syntax

* Fixing sound bug

* Changing to single theme

Co-authored-by: Chris Racioppo <Gravedigger7789@gmail.com>
  • Loading branch information
Splendead-Goose and Gravedigger7789 committed Nov 24, 2021
1 parent 2db28e6 commit 72c3de0
Show file tree
Hide file tree
Showing 51 changed files with 485 additions and 22 deletions.
15 changes: 15 additions & 0 deletions default_bus_layout.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[gd_resource type="AudioBusLayout" format=2]

[resource]
bus/1/name = "Level"
bus/1/solo = false
bus/1/mute = false
bus/1/bypass_fx = false
bus/1/volume_db = -15.0
bus/1/send = "Master"
bus/2/name = "Sound Effects"
bus/2/solo = false
bus/2/mute = false
bus/2/bypass_fx = false
bus/2/volume_db = 0.0
bus/2/send = "Master"
Binary file added sounds/action/collect.wav
Binary file not shown.
21 changes: 21 additions & 0 deletions sounds/action/collect.wav.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[remap]

importer="wav"
type="AudioStreamSample"
path="res://.import/collect.wav-393f7c0852397285c5736641b08dd50e.sample"

[deps]

source_file="res://sounds/action/collect.wav"
dest_files=[ "res://.import/collect.wav-393f7c0852397285c5736641b08dd50e.sample" ]

[params]

force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop=false
compress/mode=0
Binary file added sounds/action/damage.wav
Binary file not shown.
21 changes: 21 additions & 0 deletions sounds/action/damage.wav.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[remap]

importer="wav"
type="AudioStreamSample"
path="res://.import/damage.wav-aac1706f0785490347e3b59ad4c72c8d.sample"

[deps]

source_file="res://sounds/action/damage.wav"
dest_files=[ "res://.import/damage.wav-aac1706f0785490347e3b59ad4c72c8d.sample" ]

[params]

force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop=false
compress/mode=0
Binary file added sounds/action/enemy_kill.wav
Binary file not shown.
21 changes: 21 additions & 0 deletions sounds/action/enemy_kill.wav.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[remap]

importer="wav"
type="AudioStreamSample"
path="res://.import/enemy_kill.wav-d123a6ab19fc52b2dc36b8402413c747.sample"

[deps]

source_file="res://sounds/action/enemy_kill.wav"
dest_files=[ "res://.import/enemy_kill.wav-d123a6ab19fc52b2dc36b8402413c747.sample" ]

[params]

force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop=false
compress/mode=0
Binary file added sounds/action/jump.wav
Binary file not shown.
21 changes: 21 additions & 0 deletions sounds/action/jump.wav.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[remap]

importer="wav"
type="AudioStreamSample"
path="res://.import/jump.wav-2903645e8442747f6ebaa52d7e4ca3af.sample"

[deps]

source_file="res://sounds/action/jump.wav"
dest_files=[ "res://.import/jump.wav-2903645e8442747f6ebaa52d7e4ca3af.sample" ]

[params]

force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop=false
compress/mode=0
Binary file added sounds/action/player_die.wav
Binary file not shown.
21 changes: 21 additions & 0 deletions sounds/action/player_die.wav.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[remap]

importer="wav"
type="AudioStreamSample"
path="res://.import/player_die.wav-e370b74a5b5c78b13ba7243031077dea.sample"

[deps]

source_file="res://sounds/action/player_die.wav"
dest_files=[ "res://.import/player_die.wav-e370b74a5b5c78b13ba7243031077dea.sample" ]

[params]

force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop=false
compress/mode=0
Binary file added sounds/action/shoot.wav
Binary file not shown.
21 changes: 21 additions & 0 deletions sounds/action/shoot.wav.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[remap]

importer="wav"
type="AudioStreamSample"
path="res://.import/shoot.wav-a9b4d4dcaf286c1ff86e0b9641d36b2d.sample"

[deps]

source_file="res://sounds/action/shoot.wav"
dest_files=[ "res://.import/shoot.wav-a9b4d4dcaf286c1ff86e0b9641d36b2d.sample" ]

[params]

force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop=false
compress/mode=0
Binary file added sounds/action/shoot_no_ammo.wav
Binary file not shown.
21 changes: 21 additions & 0 deletions sounds/action/shoot_no_ammo.wav.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[remap]

importer="wav"
type="AudioStreamSample"
path="res://.import/shoot_no_ammo.wav-1a83fdd708d7b025d63d4bf0824ca96f.sample"

[deps]

source_file="res://sounds/action/shoot_no_ammo.wav"
dest_files=[ "res://.import/shoot_no_ammo.wav-1a83fdd708d7b025d63d4bf0824ca96f.sample" ]

[params]

force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop=false
compress/mode=0
Binary file added sounds/menu/opt_nav.wav
Binary file not shown.
21 changes: 21 additions & 0 deletions sounds/menu/opt_nav.wav.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[remap]

importer="wav"
type="AudioStreamSample"
path="res://.import/opt_nav.wav-460b6a972b95677ec8df6541c9fe2022.sample"

[deps]

source_file="res://sounds/menu/opt_nav.wav"
dest_files=[ "res://.import/opt_nav.wav-460b6a972b95677ec8df6541c9fe2022.sample" ]

[params]

force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop=false
compress/mode=0
Binary file added sounds/menu/opt_sel.wav
Binary file not shown.
21 changes: 21 additions & 0 deletions sounds/menu/opt_sel.wav.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[remap]

importer="wav"
type="AudioStreamSample"
path="res://.import/opt_sel.wav-812981cad22a57d6f08a6486ea6d588c.sample"

[deps]

source_file="res://sounds/menu/opt_sel.wav"
dest_files=[ "res://.import/opt_sel.wav-812981cad22a57d6f08a6486ea6d588c.sample" ]

[params]

force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop=false
compress/mode=0
Binary file added sounds/menu/pause.wav
Binary file not shown.
21 changes: 21 additions & 0 deletions sounds/menu/pause.wav.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[remap]

importer="wav"
type="AudioStreamSample"
path="res://.import/pause.wav-547470c8ccb94896cce217b459ba033e.sample"

[deps]

source_file="res://sounds/menu/pause.wav"
dest_files=[ "res://.import/pause.wav-547470c8ccb94896cce217b459ba033e.sample" ]

[params]

force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop=false
compress/mode=0
Binary file added sounds/menu/resume.wav
Binary file not shown.
21 changes: 21 additions & 0 deletions sounds/menu/resume.wav.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[remap]

importer="wav"
type="AudioStreamSample"
path="res://.import/resume.wav-06db3da597773fe4ebe7fd1e2c9a52b5.sample"

[deps]

source_file="res://sounds/menu/resume.wav"
dest_files=[ "res://.import/resume.wav-06db3da597773fe4ebe7fd1e2c9a52b5.sample" ]

[params]

force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop=false
compress/mode=0
Binary file added sounds/theme/intro.wav
Binary file not shown.
21 changes: 21 additions & 0 deletions sounds/theme/intro.wav.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[remap]

importer="wav"
type="AudioStreamSample"
path="res://.import/intro.wav-ed7744962b66a81cd5c756d91d2f205f.sample"

[deps]

source_file="res://sounds/theme/intro.wav"
dest_files=[ "res://.import/intro.wav-ed7744962b66a81cd5c756d91d2f205f.sample" ]

[params]

force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop=false
compress/mode=0
Binary file added sounds/theme/loop.wav
Binary file not shown.
21 changes: 21 additions & 0 deletions sounds/theme/loop.wav.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[remap]

importer="wav"
type="AudioStreamSample"
path="res://.import/loop.wav-24897d88899d706cf9f013403af0bdce.sample"

[deps]

source_file="res://sounds/theme/loop.wav"
dest_files=[ "res://.import/loop.wav-24897d88899d706cf9f013403af0bdce.sample" ]

[params]

force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop=false
compress/mode=0
Binary file added sounds/theme/loop_alt.wav
Binary file not shown.
21 changes: 21 additions & 0 deletions sounds/theme/loop_alt.wav.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[remap]

importer="wav"
type="AudioStreamSample"
path="res://.import/loop_alt.wav-702e5ef1d014b717bf6adae9eb04e047.sample"

[deps]

source_file="res://sounds/theme/loop_alt.wav"
dest_files=[ "res://.import/loop_alt.wav-702e5ef1d014b717bf6adae9eb04e047.sample" ]

[params]

force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop=false
compress/mode=0
Binary file added sounds/theme/theme.wav
Binary file not shown.
21 changes: 21 additions & 0 deletions sounds/theme/theme.wav.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[remap]

importer="wav"
type="AudioStreamSample"
path="res://.import/theme.wav-a0ccde4126cc24cfbf68c3a9dd5b92c1.sample"

[deps]

source_file="res://sounds/theme/theme.wav"
dest_files=[ "res://.import/theme.wav-a0ccde4126cc24cfbf68c3a9dd5b92c1.sample" ]

[params]

force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop=true
compress/mode=0
2 changes: 1 addition & 1 deletion src/Actors/Birb.gd
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func randomize_jump_time() -> void:


func jump() -> void:
if is_on_floor() and !has_jumped:
if is_on_floor() && !has_jumped:
animation_player.play("jump")
velocity.y = -JUMP_SPEED
has_jumped = true
Expand Down
16 changes: 13 additions & 3 deletions src/Actors/Player.gd
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ onready var weapon: Weapon = $Weapon
onready var animation_player: AnimationNodeStateMachinePlayback = $AnimationTree.get(
"parameters/playback"
)
onready var jump_sound: AudioStreamPlayer = $JumpSound
onready var no_ammo_attack_sound: AudioStreamPlayer = $NoAmmoAttackSound


func _ready() -> void:
Expand Down Expand Up @@ -66,17 +68,18 @@ func set_coins(value: int) -> void:


func get_can_attack() -> bool:
return can_attack and ammo > 0
return can_attack && ammo > 0


func _physics_process(delta: float) -> void:
velocity.y += gravity * delta
velocity.y = min(TERMINAL_VELOCITY, velocity.y)
velocity = move_and_slide(velocity, Vector2.UP)

if is_on_floor() and Input.is_action_just_pressed("jump"):
if is_on_floor() && Input.is_action_just_pressed("jump"):
velocity.y = -JUMP_SPEED
if Input.is_action_just_released("jump") and velocity.y < 0:
jump_sound.play()
if Input.is_action_just_released("jump") && velocity.y < 0:
velocity.y *= 0.6


Expand All @@ -87,6 +90,13 @@ func _input(event: InputEvent):
if has_attacked:
animation_player.travel("walk_attack")
self.ammo = int(max(ammo - 1, 0))
elif (
can_attack
&& event.is_action_pressed("attack")
&& ammo <= 0
&& !no_ammo_attack_sound.playing
):
no_ammo_attack_sound.play()


func take_damage() -> void:
Expand Down
Loading

0 comments on commit 72c3de0

Please sign in to comment.