Extra death sound effects

This commit is contained in:
Kienan Stewart 2022-04-03 20:07:49 -04:00
parent e08c9ae05f
commit 61715877a2
16 changed files with 92 additions and 4 deletions

View File

@ -1,5 +1,4 @@
1. Sound effects 1. Sound effects
* when a unit is killed
* if possible, a small bit of background music * if possible, a small bit of background music
2. Gameplay additions: 2. Gameplay additions:
* powerups: change movement type, remove pawn's attack and movement restrictions * powerups: change movement type, remove pawn's attack and movement restrictions

BIN
assets/export/kill1.wav Normal file

Binary file not shown.

BIN
assets/export/kill2.wav Normal file

Binary file not shown.

BIN
assets/export/kill3.wav Normal file

Binary file not shown.

BIN
assets/export/kill4.wav Normal file

Binary file not shown.

View File

@ -1,6 +1,6 @@
<?xml version="1.0" standalone="no" ?> <?xml version="1.0" standalone="no" ?>
<!DOCTYPE project PUBLIC "-//audacityproject-1.3.0//DTD//EN" "http://audacity.sourceforge.net/xml/audacityproject-1.3.0.dtd" > <!DOCTYPE project PUBLIC "-//audacityproject-1.3.0//DTD//EN" "http://audacity.sourceforge.net/xml/audacityproject-1.3.0.dtd" >
<project xmlns="http://audacity.sourceforge.net/xml/" projname="voice_clips_data" version="1.3.0" audacityversion="2.4.2" sel0="0.1044897959" sel1="0.1625396825" vpos="0" h="0.0000000000" zoom="86.1328125000" rate="44100.0" snapto="off" selectionformat="hh:mm:ss + milliseconds" frequencyformat="Hz" bandwidthformat="octaves"> <project xmlns="http://audacity.sourceforge.net/xml/" projname="voice_clips_data" version="1.3.0" audacityversion="2.4.2" sel0="0.0000000000" sel1="0.0000000000" vpos="0" h="0.0000000000" zoom="86.1328125000" rate="44100.0" snapto="off" selectionformat="hh:mm:ss + milliseconds" frequencyformat="Hz" bandwidthformat="octaves">
<tags/> <tags/>
<wavetrack name="Audio Track" isSelected="0" height="150" minimized="0" channel="0" linked="1" mute="0" solo="1" rate="44100" gain="1.0" pan="0.0" colorindex="0"> <wavetrack name="Audio Track" isSelected="0" height="150" minimized="0" channel="0" linked="1" mute="0" solo="1" rate="44100" gain="1.0" pan="0.0" colorindex="0">
<waveclip offset="0.00000000" colorindex="0"> <waveclip offset="0.00000000" colorindex="0">
@ -35,6 +35,38 @@
</sequence> </sequence>
<envelope numpoints="0"/> <envelope numpoints="0"/>
</waveclip> </waveclip>
<waveclip offset="4.51628118" colorindex="0">
<sequence maxsamples="262144" sampleformat="262159" numsamples="33280">
<waveblock start="0">
<simpleblockfile filename="eff1f99f.au" len="33280" min="-0.278197" max="0.310576" rms="0.082431"/>
</waveblock>
</sequence>
<envelope numpoints="0"/>
</waveclip>
<waveclip offset="6.01396825" colorindex="0">
<sequence maxsamples="262144" sampleformat="262159" numsamples="17408">
<waveblock start="0">
<simpleblockfile filename="eff1fea7.au" len="17408" min="-0.224971" max="0.203101" rms="0.034671"/>
</waveblock>
</sequence>
<envelope numpoints="0"/>
</waveclip>
<waveclip offset="7.02403628" colorindex="0">
<sequence maxsamples="262144" sampleformat="262159" numsamples="19968">
<waveblock start="0">
<simpleblockfile filename="eff1f37c.au" len="19968" min="-0.124105" max="0.118732" rms="0.021662"/>
</waveblock>
</sequence>
<envelope numpoints="0"/>
</waveclip>
<waveclip offset="8.01088435" colorindex="0">
<sequence maxsamples="262144" sampleformat="262159" numsamples="29184">
<waveblock start="0">
<simpleblockfile filename="eff1f21d.au" len="29184" min="-0.241016" max="0.432145" rms="0.048868"/>
</waveblock>
</sequence>
<envelope numpoints="0"/>
</waveclip>
</wavetrack> </wavetrack>
<wavetrack name="Audio Track" isSelected="0" height="150" minimized="0" channel="1" linked="0" mute="0" solo="1" rate="44100" gain="1.0" pan="0.0" colorindex="0"> <wavetrack name="Audio Track" isSelected="0" height="150" minimized="0" channel="1" linked="0" mute="0" solo="1" rate="44100" gain="1.0" pan="0.0" colorindex="0">
<waveclip offset="0.00000000" colorindex="0"> <waveclip offset="0.00000000" colorindex="0">
@ -69,6 +101,38 @@
</sequence> </sequence>
<envelope numpoints="0"/> <envelope numpoints="0"/>
</waveclip> </waveclip>
<waveclip offset="4.51628118" colorindex="0">
<sequence maxsamples="262144" sampleformat="262159" numsamples="33280">
<waveblock start="0">
<simpleblockfile filename="eff1f727.au" len="33280" min="-0.280298" max="0.313084" rms="0.083089"/>
</waveblock>
</sequence>
<envelope numpoints="0"/>
</waveclip>
<waveclip offset="6.01396825" colorindex="0">
<sequence maxsamples="262144" sampleformat="262159" numsamples="17408">
<waveblock start="0">
<simpleblockfile filename="eff1f7a0.au" len="17408" min="-0.22692" max="0.204659" rms="0.034957"/>
</waveblock>
</sequence>
<envelope numpoints="0"/>
</waveclip>
<waveclip offset="7.02403628" colorindex="0">
<sequence maxsamples="262144" sampleformat="262159" numsamples="19968">
<waveblock start="0">
<simpleblockfile filename="eff1f90d.au" len="19968" min="-0.125134" max="0.119691" rms="0.021835"/>
</waveblock>
</sequence>
<envelope numpoints="0"/>
</waveclip>
<waveclip offset="8.01088435" colorindex="0">
<sequence maxsamples="262144" sampleformat="262159" numsamples="29184">
<waveblock start="0">
<simpleblockfile filename="eff1ff30.au" len="29184" min="-0.242983" max="0.43555" rms="0.049258"/>
</waveblock>
</sequence>
<envelope numpoints="0"/>
</waveclip>
</wavetrack> </wavetrack>
<wavetrack name="Audio Track" isSelected="1" height="150" minimized="0" channel="0" linked="1" mute="1" solo="0" rate="44100" gain="1.0" pan="0.0" colorindex="0"/> <wavetrack name="Audio Track" isSelected="1" height="150" minimized="0" channel="0" linked="1" mute="1" solo="0" rate="44100" gain="1.0" pan="0.0" colorindex="0"/>
<wavetrack name="Audio Track" isSelected="1" height="150" minimized="0" channel="1" linked="0" mute="1" solo="0" rate="44100" gain="1.0" pan="0.0" colorindex="0"/> <wavetrack name="Audio Track" isSelected="1" height="150" minimized="0" channel="1" linked="0" mute="1" solo="0" rate="44100" gain="1.0" pan="0.0" colorindex="0"/>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -62,6 +62,13 @@ const hit_sounds = [
"/root/Game/Hit4", "/root/Game/Hit4",
] ]
const KILL_SOUNDS = [
"/root/Game/Kill1",
"/root/Game/Kill2",
"/root/Game/Kill3",
"/root/Game/Kill4",
]
func new_piece(piece_type, group, position = null): func new_piece(piece_type, group, position = null):
if not piece_types.has(piece_type): if not piece_types.has(piece_type):
return null return null
@ -543,6 +550,9 @@ func _process(delta):
if index_to_play != null: if index_to_play != null:
print("ai loss Chance to play: ", c, " got index ", index_to_play) print("ai loss Chance to play: ", c, " got index ", index_to_play)
get_node(self.on_player_lose_piece[index_to_play]).play() get_node(self.on_player_lose_piece[index_to_play]).play()
else:
index_to_play = self.rng.randi() % self.KILL_SOUNDS.size()
get_node(self.KILL_SOUNDS[index_to_play]).play()
else: else:
# Deal damage # Deal damage
target_square['piece'].health -= square['piece'].damage target_square['piece'].health -= square['piece'].damage
@ -628,7 +638,6 @@ func _physics_process(delta):
if dest_valid: if dest_valid:
var dest_square = self.board_squares[dest] var dest_square = self.board_squares[dest]
if dest_square['piece'] != null: if dest_square['piece'] != null:
# @TODO If the target doesn't die, we need to bounce back
if square['piece'].damage >= dest_square['piece'].health: if square['piece'].damage >= dest_square['piece'].health:
dest_square['piece'].queue_free() dest_square['piece'].queue_free()
square['piece'].kills += 1 square['piece'].kills += 1

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=26 format=2] [gd_scene load_steps=30 format=2]
[ext_resource path="res://src/Game.gd" type="Script" id=1] [ext_resource path="res://src/Game.gd" type="Script" id=1]
[ext_resource path="res://src/Playfield.tscn" type="PackedScene" id=2] [ext_resource path="res://src/Playfield.tscn" type="PackedScene" id=2]
@ -22,6 +22,10 @@
[ext_resource path="res://assets/export/hit1.wav" type="AudioStream" id=20] [ext_resource path="res://assets/export/hit1.wav" type="AudioStream" id=20]
[ext_resource path="res://assets/export/hit3.wav" type="AudioStream" id=21] [ext_resource path="res://assets/export/hit3.wav" type="AudioStream" id=21]
[ext_resource path="res://assets/export/hit4.wav" type="AudioStream" id=22] [ext_resource path="res://assets/export/hit4.wav" type="AudioStream" id=22]
[ext_resource path="res://assets/export/kill2.wav" type="AudioStream" id=23]
[ext_resource path="res://assets/export/kill3.wav" type="AudioStream" id=24]
[ext_resource path="res://assets/export/kill4.wav" type="AudioStream" id=25]
[ext_resource path="res://assets/export/kill1.wav" type="AudioStream" id=26]
[sub_resource type="DynamicFont" id=1] [sub_resource type="DynamicFont" id=1]
size = 24 size = 24
@ -251,6 +255,18 @@ stream = ExtResource( 21 )
[node name="Hit4" type="AudioStreamPlayer" parent="."] [node name="Hit4" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 22 ) stream = ExtResource( 22 )
[node name="Kill1" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 26 )
[node name="Kill2" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 23 )
[node name="Kill3" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 24 )
[node name="Kill4" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 25 )
[connection signal="finished" from="EndSong" to="." method="_on_EndSong_finished"] [connection signal="finished" from="EndSong" to="." method="_on_EndSong_finished"]
[connection signal="finished" from="Yammering" to="." method="_on_Yammering_finished"] [connection signal="finished" from="Yammering" to="." method="_on_Yammering_finished"]
[connection signal="finished" from="Dust" to="." method="_on_Dust_finished"] [connection signal="finished" from="Dust" to="." method="_on_Dust_finished"]