compress music

This commit is contained in:
ultrablob 2024-05-07 19:50:15 -04:00
parent c4bb8dc381
commit 8344c034e4
23 changed files with 103 additions and 46 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

View file

@ -2,7 +2,7 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://cso5ufbf7u7oj" uid="uid://bvpoajwx0yw3y"
path="res://.godot/imported/Circle.png-5aa705d158b14b9f860407e6f23b289d.ctex" path="res://.godot/imported/Circle.png-5aa705d158b14b9f860407e6f23b289d.ctex"
metadata={ metadata={
"vram_texture": false "vram_texture": false

BIN
Flow State 2.ogg Normal file

Binary file not shown.

19
Flow State 2.ogg.import Normal file
View file

@ -0,0 +1,19 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://b8soxqg0jquqg"
path="res://.godot/imported/Flow State 2.ogg-f34c569013c5b89f260290636f7a1c71.oggvorbisstr"
[deps]
source_file="res://Flow State 2.ogg"
dest_files=["res://.godot/imported/Flow State 2.ogg-f34c569013c5b89f260290636f7a1c71.oggvorbisstr"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

Binary file not shown.

View file

@ -1,24 +0,0 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://d3icnl4vjbbt7"
path="res://.godot/imported/Flow State.wav-724bf1be86d97bd6a743676d78bb1bd5.sample"
[deps]
source_file="res://Flow State.wav"
dest_files=["res://.godot/imported/Flow State.wav-724bf1be86d97bd6a743676d78bb1bd5.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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

View file

@ -10,6 +10,7 @@ func _ready():
$"../Layout/Play".disabled = not has_config $"../Layout/Play".disabled = not has_config
if has_config: if has_config:
$Menu/Username.text = config.get_value("config", "username") $Menu/Username.text = config.get_value("config", "username")
$Menu/MusicVolume.value = config.get_value("config", "music_volume", 1)
$Menu/Controls.selected = 0 if config.get_value("config", "relative_controls") else 1 $Menu/Controls.selected = 0 if config.get_value("config", "relative_controls") else 1
$Menu/Character.selected = CHARACTERS.find(config.get_value("gameplay", "class", "res://player-row.tscn")) $Menu/Character.selected = CHARACTERS.find(config.get_value("gameplay", "class", "res://player-row.tscn"))
@ -22,6 +23,7 @@ func check_valid(none):
func save(): func save():
config.set_value("config", "username", $Menu/Username.text) config.set_value("config", "username", $Menu/Username.text)
config.set_value("config", "relative_controls", $Menu/Controls.selected == 0) config.set_value("config", "relative_controls", $Menu/Controls.selected == 0)
config.set_value("config", "music_volume", $Menu/MusicVolume.value)
config.set_value("gameplay", "class", CHARACTERS[$Menu/Character.selected]) config.set_value("gameplay", "class", CHARACTERS[$Menu/Character.selected])

9
VolumeSlider.gd Normal file
View file

@ -0,0 +1,9 @@
extends HSlider
@export var audio_bus_name := "Music"
@onready var _bus := AudioServer.get_bus_index(audio_bus_name)
func _on_value_changed(value: float) -> void:
AudioServer.set_bus_volume_db(_bus, linear_to_db(value))

BIN
blue_button04.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 688 B

View file

@ -2,16 +2,16 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://baaak3ooc6rvq" uid="uid://dl3pgdjygxox3"
path="res://.godot/imported/Hexagon.png-1b862bf89e6b7922fd88f522a8d27f58.ctex" path="res://.godot/imported/blue_button04.png-b41db7426af2e33b5d2bde0c46856a2f.ctex"
metadata={ metadata={
"vram_texture": false "vram_texture": false
} }
[deps] [deps]
source_file="res://Hexagon.png" source_file="res://blue_button04.png"
dest_files=["res://.godot/imported/Hexagon.png-1b862bf89e6b7922fd88f522a8d27f58.ctex"] dest_files=["res://.godot/imported/blue_button04.png-b41db7426af2e33b5d2bde0c46856a2f.ctex"]
[params] [params]

BIN
blue_button13.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 510 B

View file

@ -2,16 +2,16 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://3y48ijiv4vlf" uid="uid://clup3yrjkl3ya"
path="res://.godot/imported/Pentagon.png-7ed5bfa4e2087f30c59e5bfaa438c497.ctex" path="res://.godot/imported/blue_button13.png-efecb640d918141142b733c907819e72.ctex"
metadata={ metadata={
"vram_texture": false "vram_texture": false
} }
[deps] [deps]
source_file="res://Pentagon.png" source_file="res://blue_button13.png"
dest_files=["res://.godot/imported/Pentagon.png-7ed5bfa4e2087f30c59e5bfaa438c497.ctex"] dest_files=["res://.godot/imported/blue_button13.png-efecb640d918141142b733c907819e72.ctex"]
[params] [params]

BIN
blue_sliderDown.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 441 B

View file

@ -2,16 +2,16 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://xq1dd6w22i6f" uid="uid://1mfe7gltx0lk"
path="res://.godot/imported/Hexagon outline.png-ad717813cdc35ccaddcd417e4a24f3ba.ctex" path="res://.godot/imported/blue_sliderDown.png-542a49bb68b27a35b8d39003ebe93225.ctex"
metadata={ metadata={
"vram_texture": false "vram_texture": false
} }
[deps] [deps]
source_file="res://Hexagon outline.png" source_file="res://blue_sliderDown.png"
dest_files=["res://.godot/imported/Hexagon outline.png-ad717813cdc35ccaddcd417e4a24f3ba.ctex"] dest_files=["res://.godot/imported/blue_sliderDown.png-542a49bb68b27a35b8d39003ebe93225.ctex"]
[params] [params]

15
default_bus_layout.tres Normal file
View file

@ -0,0 +1,15 @@
[gd_resource type="AudioBusLayout" format=3 uid="uid://dmlt4ui0h4bn3"]
[resource]
bus/1/name = &"Music"
bus/1/solo = false
bus/1/mute = false
bus/1/bypass_fx = false
bus/1/volume_db = 0.0
bus/1/send = &"Master"
bus/2/name = &"SFX"
bus/2/solo = false
bus/2/mute = false
bus/2/bypass_fx = false
bus/2/volume_db = 0.0
bus/2/send = &"Master"

View file

@ -8,6 +8,8 @@ func _ready():
player.position = Vector2(1920/2, 1080/2) player.position = Vector2(1920/2, 1080/2)
add_child(player) add_child(player)
$Music.volume_db = linear_to_db(config.get_value("config", "music_volume", 1))
# Called every frame. 'delta' is the elapsed time since the previous frame. # Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta): func _process(delta):

View file

@ -15,12 +15,12 @@
[ext_resource type="AudioStream" uid="uid://dn65uapn0wsok" path="res://impactMetal_002.ogg" id="11_acuni"] [ext_resource type="AudioStream" uid="uid://dn65uapn0wsok" path="res://impactMetal_002.ogg" id="11_acuni"]
[ext_resource type="Script" path="res://CollisionCheck.gd" id="11_ryeyk"] [ext_resource type="Script" path="res://CollisionCheck.gd" id="11_ryeyk"]
[ext_resource type="FontFile" uid="uid://bnguin7bsyx6e" path="res://Kenney Future.ttf" id="11_s4q6p"] [ext_resource type="FontFile" uid="uid://bnguin7bsyx6e" path="res://Kenney Future.ttf" id="11_s4q6p"]
[ext_resource type="Texture2D" uid="uid://cso5ufbf7u7oj" path="res://Circle.png" id="13_318fy"] [ext_resource type="Texture2D" uid="uid://bvpoajwx0yw3y" path="res://Circle.png" id="13_318fy"]
[ext_resource type="Script" path="res://Notification.gd" id="13_lkv81"] [ext_resource type="Script" path="res://Notification.gd" id="13_lkv81"]
[ext_resource type="Script" path="res://Stopwatch.gd" id="13_xhnp2"] [ext_resource type="Script" path="res://Stopwatch.gd" id="13_xhnp2"]
[ext_resource type="Script" path="res://Leaderboard.gd" id="14_v1elq"] [ext_resource type="Script" path="res://Leaderboard.gd" id="14_v1elq"]
[ext_resource type="PackedScene" uid="uid://4sdwatj6up8i" path="res://tar.tscn" id="19_8258f"] [ext_resource type="PackedScene" uid="uid://4sdwatj6up8i" path="res://tar.tscn" id="19_8258f"]
[ext_resource type="AudioStream" uid="uid://d3icnl4vjbbt7" path="res://Flow State.wav" id="21_7tjgd"] [ext_resource type="AudioStream" uid="uid://b8soxqg0jquqg" path="res://Flow State 2.ogg" id="21_7hdkm"]
[sub_resource type="Resource" id="Resource_ur7l5"] [sub_resource type="Resource" id="Resource_ur7l5"]
script = ExtResource("4_um0x7") script = ExtResource("4_um0x7")
@ -887,8 +887,8 @@ script = ExtResource("13_lkv81")
process_mode = 3 process_mode = 3
script = ExtResource("1_k8sg3") script = ExtResource("1_k8sg3")
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."] [node name="Music" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource("21_7tjgd") stream = ExtResource("21_7hdkm")
autoplay = true autoplay = true
[connection signal="wave_complete" from="Spawner" to="UI/Stopwatch" method="wave_finished"] [connection signal="wave_complete" from="Spawner" to="UI/Stopwatch" method="wave_finished"]

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=7 format=3 uid="uid://ck1db6d8whbac"] [gd_scene load_steps=11 format=3 uid="uid://ck1db6d8whbac"]
[ext_resource type="Script" path="res://MainMenu.gd" id="1_omrmt"] [ext_resource type="Script" path="res://MainMenu.gd" id="1_omrmt"]
[ext_resource type="Texture2D" uid="uid://bfuxwsctqat2v" path="res://main_menu.png" id="2_vrg41"] [ext_resource type="Texture2D" uid="uid://bfuxwsctqat2v" path="res://main_menu.png" id="2_vrg41"]
@ -6,6 +6,12 @@
[ext_resource type="Script" path="res://Settings.gd" id="5_sarwv"] [ext_resource type="Script" path="res://Settings.gd" id="5_sarwv"]
[ext_resource type="Texture2D" uid="uid://bdg4mycyxr8hw" path="res://loading_bg.png" id="6_fwqfu"] [ext_resource type="Texture2D" uid="uid://bdg4mycyxr8hw" path="res://loading_bg.png" id="6_fwqfu"]
[ext_resource type="Script" path="res://EmojiValidator.gd" id="6_ojb71"] [ext_resource type="Script" path="res://EmojiValidator.gd" id="6_ojb71"]
[ext_resource type="Texture2D" uid="uid://1mfe7gltx0lk" path="res://blue_sliderDown.png" id="6_tt6es"]
[ext_resource type="Script" path="res://VolumeSlider.gd" id="7_qc1t8"]
[ext_resource type="AudioStream" uid="uid://b8soxqg0jquqg" path="res://Flow State 2.ogg" id="8_uvg4p"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_4ojsq"]
bg_color = Color(0.6, 0.6, 0.6, 0)
[node name="MainMenu" type="Control"] [node name="MainMenu" type="Control"]
layout_mode = 3 layout_mode = 3
@ -124,6 +130,7 @@ grow_vertical = 2
columns = 2 columns = 2
[node name="Label" type="Label" parent="Settings Panel/Menu"] [node name="Label" type="Label" parent="Settings Panel/Menu"]
custom_minimum_size = Vector2(0, 100)
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 0 size_flags_horizontal = 0
theme_override_fonts/font = ExtResource("4_ybv7t") theme_override_fonts/font = ExtResource("4_ybv7t")
@ -143,6 +150,7 @@ script = ExtResource("6_ojb71")
pattern = "^[A-Za-z]+" pattern = "^[A-Za-z]+"
[node name="Label2" type="Label" parent="Settings Panel/Menu"] [node name="Label2" type="Label" parent="Settings Panel/Menu"]
custom_minimum_size = Vector2(0, 100)
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 0 size_flags_horizontal = 0
theme_override_fonts/font = ExtResource("4_ybv7t") theme_override_fonts/font = ExtResource("4_ybv7t")
@ -161,6 +169,7 @@ popup/item_1/text = "Absolute"
popup/item_1/id = 1 popup/item_1/id = 1
[node name="Label3" type="Label" parent="Settings Panel/Menu"] [node name="Label3" type="Label" parent="Settings Panel/Menu"]
custom_minimum_size = Vector2(0, 100)
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 0 size_flags_horizontal = 0
theme_override_fonts/font = ExtResource("4_ybv7t") theme_override_fonts/font = ExtResource("4_ybv7t")
@ -178,6 +187,25 @@ popup/item_0/id = 0
popup/item_1/text = "Apezoid" popup/item_1/text = "Apezoid"
popup/item_1/id = 1 popup/item_1/id = 1
[node name="Label4" type="Label" parent="Settings Panel/Menu"]
layout_mode = 2
size_flags_horizontal = 0
theme_override_fonts/font = ExtResource("4_ybv7t")
theme_override_font_sizes/font_size = 80
text = "music"
[node name="MusicVolume" type="HSlider" parent="Settings Panel/Menu"]
custom_minimum_size = Vector2(300, 0)
layout_mode = 2
size_flags_vertical = 4
theme_override_icons/grabber = ExtResource("6_tt6es")
theme_override_icons/grabber_highlight = ExtResource("6_tt6es")
theme_override_styles/grabber_area = SubResource("StyleBoxFlat_4ojsq")
theme_override_styles/grabber_area_highlight = SubResource("StyleBoxFlat_4ojsq")
max_value = 1.0
step = 0.01
script = ExtResource("7_qc1t8")
[node name="Tutorial Text" type="Label" parent="."] [node name="Tutorial Text" type="Label" parent="."]
visible = false visible = false
z_index = 2 z_index = 2
@ -269,6 +297,11 @@ theme_override_font_sizes/normal_font_size = 200
bbcode_enabled = true bbcode_enabled = true
text = "[center][wave]LOADING..." text = "[center][wave]LOADING..."
[node name="Music" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource("8_uvg4p")
autoplay = true
bus = &"Music"
[connection signal="pressed" from="Layout/Play" to="." method="play"] [connection signal="pressed" from="Layout/Play" to="." method="play"]
[connection signal="pressed" from="Layout/Settings" to="Settings Panel" method="show"] [connection signal="pressed" from="Layout/Settings" to="Settings Panel" method="show"]
[connection signal="pressed" from="Layout/Tutorial" to="Tutorial Text" method="show"] [connection signal="pressed" from="Layout/Tutorial" to="Tutorial Text" method="show"]
@ -276,4 +309,5 @@ text = "[center][wave]LOADING..."
[connection signal="pressed" from="Settings Panel/Close" to="Settings Panel" method="hide"] [connection signal="pressed" from="Settings Panel/Close" to="Settings Panel" method="hide"]
[connection signal="text_changed" from="Settings Panel/Menu/Username" to="Settings Panel" method="check_valid"] [connection signal="text_changed" from="Settings Panel/Menu/Username" to="Settings Panel" method="check_valid"]
[connection signal="text_changed" from="Settings Panel/Menu/Username" to="Settings Panel/Menu/Username" method="check"] [connection signal="text_changed" from="Settings Panel/Menu/Username" to="Settings Panel/Menu/Username" method="check"]
[connection signal="value_changed" from="Settings Panel/Menu/MusicVolume" to="Settings Panel/Menu/MusicVolume" method="_on_value_changed"]
[connection signal="pressed" from="Tutorial Text/Close" to="Tutorial Text" method="hide"] [connection signal="pressed" from="Tutorial Text/Close" to="Tutorial Text" method="hide"]

BIN
red_button04.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 465 B

View file

@ -2,16 +2,16 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://cyk2dqt7ipjg1" uid="uid://dn1yo2quvk68u"
path="res://.godot/imported/Arrow (1).png-f7829071ab4d36b28f9cf326802d31fe.ctex" path="res://.godot/imported/red_button04.png-16e19973b0063994181b1e1b01d2a073.ctex"
metadata={ metadata={
"vram_texture": false "vram_texture": false
} }
[deps] [deps]
source_file="res://Arrow (1).png" source_file="res://red_button04.png"
dest_files=["res://.godot/imported/Arrow (1).png-f7829071ab4d36b28f9cf326802d31fe.ctex"] dest_files=["res://.godot/imported/red_button04.png-16e19973b0063994181b1e1b01d2a073.ctex"]
[params] [params]