now its good
This commit is contained in:
parent
34f0ab1baa
commit
b79eefdd59
20 changed files with 334 additions and 0 deletions
BIN
assets/sounds/walking/shuffle/shuffle-001.wav
Normal file
BIN
assets/sounds/walking/shuffle/shuffle-001.wav
Normal file
Binary file not shown.
24
assets/sounds/walking/shuffle/shuffle-001.wav.import
Normal file
24
assets/sounds/walking/shuffle/shuffle-001.wav.import
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://bw8dt5rd8j50y"
|
||||
path="res://.godot/imported/shuffle-001.wav-854dc62f5f8505e2c3b47f47aab4e3b8.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sounds/walking/shuffle/shuffle-001.wav"
|
||||
dest_files=["res://.godot/imported/shuffle-001.wav-854dc62f5f8505e2c3b47f47aab4e3b8.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
|
||||
BIN
assets/sounds/walking/shuffle/shuffle-002.wav
Normal file
BIN
assets/sounds/walking/shuffle/shuffle-002.wav
Normal file
Binary file not shown.
24
assets/sounds/walking/shuffle/shuffle-002.wav.import
Normal file
24
assets/sounds/walking/shuffle/shuffle-002.wav.import
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://dkxliin18sua2"
|
||||
path="res://.godot/imported/shuffle-002.wav-156217c36838593a0a19b7d3e383cdb1.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sounds/walking/shuffle/shuffle-002.wav"
|
||||
dest_files=["res://.godot/imported/shuffle-002.wav-156217c36838593a0a19b7d3e383cdb1.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
|
||||
BIN
assets/sounds/walking/shuffle/shuffle-003.wav
Normal file
BIN
assets/sounds/walking/shuffle/shuffle-003.wav
Normal file
Binary file not shown.
24
assets/sounds/walking/shuffle/shuffle-003.wav.import
Normal file
24
assets/sounds/walking/shuffle/shuffle-003.wav.import
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://cijtqpij23hyd"
|
||||
path="res://.godot/imported/shuffle-003.wav-b3666fef95bab7a092f1e0df09eed65d.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sounds/walking/shuffle/shuffle-003.wav"
|
||||
dest_files=["res://.godot/imported/shuffle-003.wav-b3666fef95bab7a092f1e0df09eed65d.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
|
||||
BIN
assets/sounds/walking/shuffle/shuffle-004.wav
Normal file
BIN
assets/sounds/walking/shuffle/shuffle-004.wav
Normal file
Binary file not shown.
24
assets/sounds/walking/shuffle/shuffle-004.wav.import
Normal file
24
assets/sounds/walking/shuffle/shuffle-004.wav.import
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://tmflo6rp0cu4"
|
||||
path="res://.godot/imported/shuffle-004.wav-4cee585a58849620e876f562c4e1ae3c.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sounds/walking/shuffle/shuffle-004.wav"
|
||||
dest_files=["res://.godot/imported/shuffle-004.wav-4cee585a58849620e876f562c4e1ae3c.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
|
||||
BIN
assets/sounds/walking/shuffle/shuffle-005.wav
Normal file
BIN
assets/sounds/walking/shuffle/shuffle-005.wav
Normal file
Binary file not shown.
24
assets/sounds/walking/shuffle/shuffle-005.wav.import
Normal file
24
assets/sounds/walking/shuffle/shuffle-005.wav.import
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://c3bl5rkqf1dn7"
|
||||
path="res://.godot/imported/shuffle-005.wav-70d820d4d9d4e52c3942d4259de0cba4.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sounds/walking/shuffle/shuffle-005.wav"
|
||||
dest_files=["res://.godot/imported/shuffle-005.wav-70d820d4d9d4e52c3942d4259de0cba4.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
|
||||
BIN
assets/sounds/walking/shuffle/shuffle-006.wav
Normal file
BIN
assets/sounds/walking/shuffle/shuffle-006.wav
Normal file
Binary file not shown.
24
assets/sounds/walking/shuffle/shuffle-006.wav.import
Normal file
24
assets/sounds/walking/shuffle/shuffle-006.wav.import
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://cueon12gi7jeh"
|
||||
path="res://.godot/imported/shuffle-006.wav-01fc7c45fa2d1bd77a363fd0e789d2d4.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sounds/walking/shuffle/shuffle-006.wav"
|
||||
dest_files=["res://.godot/imported/shuffle-006.wav-01fc7c45fa2d1bd77a363fd0e789d2d4.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
|
||||
BIN
assets/sounds/walking/shuffle/shuffle-007.wav
Normal file
BIN
assets/sounds/walking/shuffle/shuffle-007.wav
Normal file
Binary file not shown.
24
assets/sounds/walking/shuffle/shuffle-007.wav.import
Normal file
24
assets/sounds/walking/shuffle/shuffle-007.wav.import
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://ccospbyrg6sb1"
|
||||
path="res://.godot/imported/shuffle-007.wav-b5349ddb77a5196bbc7714c5cfaf5248.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sounds/walking/shuffle/shuffle-007.wav"
|
||||
dest_files=["res://.godot/imported/shuffle-007.wav-b5349ddb77a5196bbc7714c5cfaf5248.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
|
||||
70
scenes/player/debug_menu.gd
Normal file
70
scenes/player/debug_menu.gd
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
extends Control
|
||||
|
||||
@onready var fps_counter: Label = %FpsCounter
|
||||
@onready var frame_time_counter: Label = %FrameCounter
|
||||
@onready var fps_counter_average: Label = %FpsCounterAverage
|
||||
@onready var frame_time_counter_average: Label = %FrameCounterAverage
|
||||
|
||||
|
||||
func update_fps_counter():
|
||||
fps_counter.text = "Fps: " + str(snapped(1/global_delta, 0.01))
|
||||
|
||||
func update_frame_time_counter():
|
||||
frame_time_counter.text = "Frame time (ms): " + str(snapped(global_delta * 1000, 0.01))
|
||||
|
||||
var fps_over_5s: Array[float] = []
|
||||
var ms_over_5s: Array[float] = []
|
||||
|
||||
func reset_avg():
|
||||
print("reset")
|
||||
fps_over_5s = []
|
||||
ms_over_5s = []
|
||||
|
||||
func update_avg_fps_counter():
|
||||
fps_over_5s.append(1/global_delta)
|
||||
var avg = 0
|
||||
for i in fps_over_5s:
|
||||
avg += i
|
||||
fps_counter_average.text = "Fps (avg over " + str(snapped(5 - reset_timer.time_left, 0.1)) +"s): " + str(snapped(avg / len(fps_over_5s), 0.01))
|
||||
|
||||
func update_avg_ms_counter():
|
||||
ms_over_5s.append(global_delta * 1000)
|
||||
var avg = 0
|
||||
for i in ms_over_5s:
|
||||
avg += i
|
||||
frame_time_counter_average.text = "Frame time (ms avg over " + str(snapped(5 - reset_timer.time_left, 0.1)) +"s): " + str(snapped(avg / len(ms_over_5s), 0.01))
|
||||
|
||||
func update_avg():
|
||||
update_avg_fps_counter()
|
||||
update_avg_ms_counter()
|
||||
|
||||
func update():
|
||||
update_fps_counter()
|
||||
update_frame_time_counter()
|
||||
|
||||
var reset_timer = Timer.new()
|
||||
var avg_polling_timer = Timer.new()
|
||||
|
||||
var global_delta: float = 99
|
||||
|
||||
func _ready() -> void:
|
||||
add_child(reset_timer)
|
||||
reset_timer.timeout.connect(reset_avg)
|
||||
reset_timer.wait_time = 5
|
||||
|
||||
add_child(avg_polling_timer)
|
||||
avg_polling_timer.timeout.connect(update_avg)
|
||||
avg_polling_timer.wait_time = 0.1
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
if visible:
|
||||
global_delta = delta
|
||||
update()
|
||||
if reset_timer.is_stopped():
|
||||
reset_timer.start()
|
||||
if avg_polling_timer.is_stopped():
|
||||
avg_polling_timer.start()
|
||||
else:
|
||||
reset_timer.stop()
|
||||
avg_polling_timer.stop()
|
||||
1
scenes/player/debug_menu.gd.uid
Normal file
1
scenes/player/debug_menu.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://bbffh34pb664i
|
||||
53
scenes/player/debug_menu.tscn
Normal file
53
scenes/player/debug_menu.tscn
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
[gd_scene format=3 uid="uid://c57oxgn18vrdv"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bbffh34pb664i" path="res://scenes/player/debug_menu.gd" id="1_a4365"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_60a4j"]
|
||||
|
||||
[node name="DebugMenu" type="Control" unique_id=890382686]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
script = ExtResource("1_a4365")
|
||||
|
||||
[node name="LeftTop" type="PanelContainer" parent="." unique_id=1154961105]
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
anchor_right = 0.3
|
||||
anchor_bottom = 0.4
|
||||
theme_override_styles/panel = SubResource("StyleBoxEmpty_60a4j")
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="LeftTop" unique_id=1991597583]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="FpsCounter" type="Label" parent="LeftTop/VBoxContainer" unique_id=571227435]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "Fps:"
|
||||
|
||||
[node name="FpsCounterAverage" type="Label" parent="LeftTop/VBoxContainer" unique_id=662578021]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "Fps (avg over 5s): "
|
||||
|
||||
[node name="FrameCounter" type="Label" parent="LeftTop/VBoxContainer" unique_id=1698821864]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "Frame time (ms): "
|
||||
|
||||
[node name="FrameCounterAverage" type="Label" parent="LeftTop/VBoxContainer" unique_id=699072246]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "Frame time (ms average over 5s): "
|
||||
|
||||
[node name="LeftTop2" type="PanelContainer" parent="." unique_id=269613358]
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
anchor_left = 0.7
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 0.4
|
||||
theme_override_styles/panel = SubResource("StyleBoxEmpty_60a4j")
|
||||
6
scenes/player/prompt.gd
Normal file
6
scenes/player/prompt.gd
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
extends Control
|
||||
|
||||
@onready var label = $AspectRatioContainer/Label
|
||||
|
||||
func change_text(text:String):
|
||||
label.text = text
|
||||
1
scenes/player/prompt.gd.uid
Normal file
1
scenes/player/prompt.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://csmi0dkeaejty
|
||||
35
scenes/player/prompt.tscn
Normal file
35
scenes/player/prompt.tscn
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
[gd_scene format=3 uid="uid://c02fkimxlbrje"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://csmi0dkeaejty" path="res://scenes/player/prompt.gd" id="1_ddq1g"]
|
||||
[ext_resource type="Shader" uid="uid://desjwy54cjos8" path="res://shaders/blur_shader.gdshader" id="1_sseo3"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_aghy0"]
|
||||
shader = ExtResource("1_sseo3")
|
||||
shader_parameter/blur_amount = 2.5
|
||||
|
||||
[node name="Prompt" type="Control" unique_id=318901794]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_ddq1g")
|
||||
|
||||
[node name="AspectRatioContainer" type="AspectRatioContainer" parent="." unique_id=1898441113]
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
anchor_left = 0.4
|
||||
anchor_top = 0.4
|
||||
anchor_right = 0.6
|
||||
anchor_bottom = 0.5
|
||||
|
||||
[node name="Panel" type="Panel" parent="AspectRatioContainer" unique_id=530766557]
|
||||
material = SubResource("ShaderMaterial_aghy0")
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="AspectRatioContainer" unique_id=1563300647]
|
||||
layout_mode = 2
|
||||
text = "[LMB] grab"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
Loading…
Reference in a new issue