Expand and stage boss encounter
This commit is contained in:
parent
c325501999
commit
66b314f51a
17 changed files with 485 additions and 64 deletions
|
|
@ -27,6 +27,7 @@ const SHIP_DEATH: String = "ship_death"
|
|||
const ENEMY_DEATH: String = "enemy_death"
|
||||
const BUILDING_DEATH: String = "building_death"
|
||||
const DIALOG: String = "dialog"
|
||||
const BOSS_SCREAM: String = "boss_scream"
|
||||
|
||||
const SOUNDS: Dictionary = {
|
||||
SHOT: "res://audio/sfx_shot.wav",
|
||||
|
|
@ -34,6 +35,7 @@ const SOUNDS: Dictionary = {
|
|||
ENEMY_DEATH: "res://audio/sfx_ship_death.wav",
|
||||
BUILDING_DEATH: "res://audio/sfx_building_death.wav",
|
||||
DIALOG: "res://audio/sfx_dialog.wav",
|
||||
BOSS_SCREAM: "res://audio/sfx_boss_scream.wav",
|
||||
}
|
||||
|
||||
# Per-sound level. A shot is fired constantly and a death happens once, so
|
||||
|
|
@ -44,6 +46,7 @@ const LEVELS: Dictionary = {
|
|||
ENEMY_DEATH: -23.0,
|
||||
BUILDING_DEATH: -23.0,
|
||||
DIALOG: -19.0,
|
||||
BOSS_SCREAM: -13.0,
|
||||
}
|
||||
|
||||
# Shots vary a little in pitch so a stream of them does not turn into one
|
||||
|
|
|
|||
|
|
@ -183,9 +183,32 @@ def explosion(seconds, sub_from, sub_to, roar_seed, debris_level, drive):
|
|||
return [_saturate(v, drive) * _attack(i, 0.001) for i, v in enumerate(mixed)]
|
||||
|
||||
|
||||
def boss_scream(seconds=1.65):
|
||||
"""A huge synthetic creature waking: a rough falling throat tone with
|
||||
an unstable upper rasp. Long enough to carry the reveal shake, without
|
||||
borrowing a human/animal recording whose licence would need tracking."""
|
||||
n = int(RATE * seconds)
|
||||
throat = [0.0] * n
|
||||
phase = 0.0
|
||||
for i in range(n):
|
||||
t = i / n
|
||||
hz = 118.0 * (52.0 / 118.0) ** (t ** 0.72)
|
||||
hz *= 1.0 + 0.07 * math.sin(t * math.pi * 17.0)
|
||||
phase += 2.0 * math.pi * hz / RATE
|
||||
envelope = min(1.0, t / 0.06) * (1.0 - t) ** 0.75
|
||||
throat[i] = (math.sin(phase) * 0.75 + math.sin(phase * 2.03) * 0.32
|
||||
+ math.sin(phase * 3.97) * 0.16) * envelope
|
||||
rasp_noise = _noise(n, 189, lambda t: 0.34 * (1.0 - t) + 0.025)
|
||||
rasp = [value * min(1.0, i / (RATE * 0.025)) * _decay(i, n, 1.15) * 0.68
|
||||
for i, value in enumerate(rasp_noise)]
|
||||
mixed = _mix(throat, rasp)
|
||||
return [_saturate(value, 3.2) for value in mixed]
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
_write("sfx_shot", shot())
|
||||
_write("sfx_dialog", dialog())
|
||||
_write("sfx_boss_scream", boss_scream())
|
||||
# A vessel coming apart: bright, fast, with real low end under it.
|
||||
_write("sfx_ship_death", explosion(1.45, 260.0, 38.0, 5, 0.16, 2.6))
|
||||
# A structure: longer, deeper, and it keeps coming down afterwards.
|
||||
|
|
|
|||
BIN
audio/sfx_boss_scream.wav
Normal file
BIN
audio/sfx_boss_scream.wav
Normal file
Binary file not shown.
24
audio/sfx_boss_scream.wav.import
Normal file
24
audio/sfx_boss_scream.wav.import
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://disto7xb3s8gx"
|
||||
path="res://.godot/imported/sfx_boss_scream.wav-bf123df4e039686a30aabf3e3bb9dd12.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://audio/sfx_boss_scream.wav"
|
||||
dest_files=["res://.godot/imported/sfx_boss_scream.wav-bf123df4e039686a30aabf3e3bb9dd12.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_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=2
|
||||
Loading…
Reference in a new issue