Compare commits

...

2 Commits

Author SHA1 Message Date
23b283c97c More audio 2024-05-04 01:23:46 -04:00
fde43cf1d3 Add ambiance and packing buzzers 2024-05-03 19:47:22 -04:00
19 changed files with 311 additions and 5237 deletions

BIN
assets/audio/env/buzzer_correct.wav (Stored with Git LFS) vendored Normal file

Binary file not shown.

View File

@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://dd8yivlir4hat"
path="res://.godot/imported/buzzer_correct.wav-a792e451afd4d65aa55ada1736ad630b.sample"
[deps]
source_file="res://assets/audio/env/buzzer_correct.wav"
dest_files=["res://.godot/imported/buzzer_correct.wav-a792e451afd4d65aa55ada1736ad630b.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=0

BIN
assets/audio/env/buzzer_wrong.wav (Stored with Git LFS) vendored Normal file

Binary file not shown.

View File

@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://cch7qvsk0gngt"
path="res://.godot/imported/buzzer_wrong.wav-14db855656c8913c7c25effa9684a485.sample"
[deps]
source_file="res://assets/audio/env/buzzer_wrong.wav"
dest_files=["res://.godot/imported/buzzer_wrong.wav-14db855656c8913c7c25effa9684a485.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=0

10
assets/audio/env/wage_increase.tres vendored Normal file
View File

@ -0,0 +1,10 @@
[gd_resource type="AudioStreamRandomizer" load_steps=2 format=3 uid="uid://yy14fup8b4pu"]
[ext_resource type="AudioStream" uid="uid://dmv0xdrcjlky6" path="res://assets/audio/env/wage_increase.wav" id="1_nscs2"]
[resource]
playback_mode = 2
random_pitch = 1.2
streams_count = 1
stream_0/stream = ExtResource("1_nscs2")
stream_0/weight = 1.0

BIN
assets/audio/env/wage_increase.wav (Stored with Git LFS) vendored Normal file

Binary file not shown.

View File

@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://dmv0xdrcjlky6"
path="res://.godot/imported/wage_increase.wav-031fe4c2f0cfc428f033889054664828.sample"
[deps]
source_file="res://assets/audio/env/wage_increase.wav"
dest_files=["res://.godot/imported/wage_increase.wav-031fe4c2f0cfc428f033889054664828.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=0

BIN
assets/audio/env/warehouse_ambiance.wav (Stored with Git LFS) vendored Normal file

Binary file not shown.

View File

@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://b3xmfa1tt1u0k"
path="res://.godot/imported/warehouse_ambiance.wav-41f3daa803086dbfed1a991f6a994c51.sample"
[deps]
source_file="res://assets/audio/env/warehouse_ambiance.wav"
dest_files=["res://.godot/imported/warehouse_ambiance.wav-41f3daa803086dbfed1a991f6a994c51.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=2
edit/loop_begin=0
edit/loop_end=-1
compress/mode=0

BIN
assets/audio/env/warehouse_quiet.wav (Stored with Git LFS) vendored Normal file

Binary file not shown.

View File

@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://bfgk3wmo0gm38"
path="res://.godot/imported/warehouse_quiet.wav-b576f9d2d1e7c6d350db4a4b4b58a5b2.sample"
[deps]
source_file="res://assets/audio/env/warehouse_quiet.wav"
dest_files=["res://.godot/imported/warehouse_quiet.wav-b576f9d2d1e7c6d350db4a4b4b58a5b2.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=2
edit/loop_begin=0
edit/loop_end=-1
compress/mode=0

View File

@ -1,4 +1,4 @@
[gd_resource type="AudioBusLayout" load_steps=4 format=3 uid="uid://y8ex3sirvm5l"]
[gd_resource type="AudioBusLayout" load_steps=5 format=3 uid="uid://y8ex3sirvm5l"]
[sub_resource type="AudioEffectReverb" id="AudioEffectReverb_ev1xl"]
resource_name = "Reverb"
@ -18,6 +18,12 @@ band_db/16000_hz = -5.6
[sub_resource type="AudioEffectReverb" id="AudioEffectReverb_fa1qn"]
resource_name = "Reverb"
[sub_resource type="AudioEffectCompressor" id="AudioEffectCompressor_vg38f"]
resource_name = "Compressor"
threshold = -7.0
ratio = 18.1
gain = 9.2
[resource]
bus/1/name = &"Explosion"
bus/1/solo = false
@ -43,3 +49,5 @@ bus/3/mute = false
bus/3/bypass_fx = false
bus/3/volume_db = 0.0
bus/3/send = &"Master"
bus/3/effect/0/effect = SubResource("AudioEffectCompressor_vg38f")
bus/3/effect/0/enabled = false

View File

@ -38,7 +38,7 @@ application/icon_interpolation=4
application/file_version=""
application/product_version=""
application/company_name=""
application/product_name=""
application/product_name="Armazon"
application/file_description=""
application/copyright=""
application/trademarks=""

17
main.gd
View File

@ -54,6 +54,12 @@ func _ready() -> void:
Scoring.reset_score()
get_node('%arm_ik').start()
CameraRumble.grab.connect(anim_grab)
CameraRumble.nuclear_blast.connect(on_nuclear_blast, CONNECT_ONE_SHOT)
func on_nuclear_blast():
print("Nuclear blast")
$audio/ambiance1.stop()
$audio/ambiance2.play(randf() * 20.0)
func anim_grab():
animtree.set("parameters/shot_grab/request", AnimationNodeOneShot.ONE_SHOT_REQUEST_FIRE)
@ -168,14 +174,21 @@ func _on_box_entered(body_rid: RID, body: Node3D, body_shape_index: int, local_s
if boxes_in_row >= bonus_count:
boxes_in_row = 0
do_bonus()
do_success()
for item in body.items:
item.queue_free()
body.queue_free()
func do_success():
$world/box_scoring/light_correct.visible = true
$world/box_scoring/light_correct/Timer.start(0.2)
$world/box_scoring/buzzer_correct.play()
func do_bonus():
wage += wage_bonus
emit_signal("bonus")
$audio/wage_increase.play()
func do_penalty():
wage -= wage_penalty
@ -184,6 +197,10 @@ func do_penalty():
get_tree().call_deferred("change_scene_to_file", "res://score_screen.tscn")
return
emit_signal("penalty")
$world/box_scoring/light_incorrect.visible = true
$world/box_scoring/light_incorrect/Timer.start(0.2)
$world/box_scoring/buzzer_incorrect.play()
func _on_trash(body_rid: RID, body: Node3D, body_shape_index: int, local_shape_index: int) -> void:
body.queue_free()

5368
main.tscn

File diff suppressed because it is too large Load Diff

View File

@ -12,6 +12,7 @@ config_version=5
config/name="Armazon"
config/description="Pack boxes safely and efficiently to maximize customer satisfaction."
config/version="1.0.0"
run/main_scene="res://main.tscn"
config/features=PackedStringArray("4.2", "Forward Plus")
boot_splash/bg_color=Color(0.384314, 0.133333, 0.121569, 1)

View File

@ -11,6 +11,7 @@ falloff_exponent = 2.0
impulse = 5000
radius = 10.0
rumble_amount = 25.0
nuclear = true
[node name="GPUParticles3D" type="GPUParticles3D" parent="."]
transform = Transform3D(2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0)

View File

@ -1,6 +1,7 @@
extends Node
signal grab()
signal nuclear_blast()
@onready var rumble: float = 0
@onready var holding: bool = false

View File

@ -20,6 +20,7 @@ class_name Explosion
@onready var blast_visual: CSGSphere3D = null
@export var rumble_amount: float = 10
@export var nuclear: bool = false
func _ready() -> void:
if Engine.is_editor_hint():
@ -60,6 +61,8 @@ func _ready() -> void:
var t = $light.create_tween()
t.tween_property($light,'light_energy',0,0.6)
CameraRumble.rumble += rumble_amount
if nuclear:
CameraRumble.emit_signal("nuclear_blast")
func _exit_tree() -> void:
if not Engine.is_editor_hint():