123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312 |
- [gd_scene load_steps=15 format=3 uid="uid://6a0nxwkgf5dq"]
- [ext_resource type="Script" uid="uid://db4ofia8ieq55" path="res://utils/label_fps.gd" id="1"]
- [ext_resource type="Script" uid="uid://dustsplck84ac" path="res://utils/label_version.gd" id="2"]
- [ext_resource type="Script" uid="uid://c87b1snynit3u" path="res://utils/label_engine.gd" id="3"]
- [ext_resource type="Script" uid="uid://cw0pi4lgucxdr" path="res://tests_menu.gd" id="4"]
- [ext_resource type="Script" uid="uid://bjl0grl2gv43y" path="res://utils/label_test.gd" id="5"]
- [ext_resource type="Script" uid="uid://b4rnndt2dw5g1" path="res://utils/label_pause.gd" id="6"]
- [ext_resource type="Script" uid="uid://7kql0xtuc7ny" path="res://utils/ticks_per_second.gd" id="8_dg77c"]
- [ext_resource type="Script" uid="uid://beqnv31yip0bl" path="res://utils/time_scale.gd" id="9_ycdy4"]
- [ext_resource type="Script" uid="uid://k8crlob60yte" path="res://utils/container_log.gd" id="10"]
- [ext_resource type="Script" uid="uid://cvoeuonqmsye1" path="res://utils/max_steps_per_frame.gd" id="10_w48qg"]
- [ext_resource type="Script" uid="uid://b2t0e1okrl3j4" path="res://utils/scroll_log.gd" id="11"]
- [ext_resource type="Script" uid="uid://ijebwwx4t8et" path="res://utils/physics_interpolation.gd" id="11_ycdy4"]
- [ext_resource type="Script" uid="uid://db80201lynb6l" path="res://tests.gd" id="12"]
- [sub_resource type="StyleBoxFlat" id="1"]
- bg_color = Color(0, 0, 0, 0.176471)
- [node name="Main" type="Control"]
- 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("12")
- [node name="TestsMenu" type="MenuButton" parent="."]
- layout_mode = 0
- offset_left = 10.0
- offset_top = 10.0
- offset_right = 125.0
- offset_bottom = 30.0
- text = "Tests"
- flat = false
- script = ExtResource("4")
- [node name="LabelControls" type="Label" parent="."]
- layout_mode = 0
- offset_left = 157.0
- offset_top = 13.0
- offset_right = 646.0
- offset_bottom = 27.0
- theme_override_constants/outline_size = 4
- text = "P: Toggle Pause | R: Restart | C: Toggle Collision | F: Toggle Fullscreen | ESC: Quit"
- [node name="LabelFPS" type="Label" parent="."]
- layout_mode = 1
- anchors_preset = 2
- anchor_top = 1.0
- anchor_bottom = 1.0
- offset_left = 10.0
- offset_top = -36.0
- offset_right = 55.0
- offset_bottom = -13.0
- grow_vertical = 0
- theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
- theme_override_constants/outline_size = 4
- text = "FPS: 0"
- script = ExtResource("1")
- [node name="LabelEngine" type="Label" parent="."]
- layout_mode = 1
- anchors_preset = 2
- anchor_top = 1.0
- anchor_bottom = 1.0
- offset_left = 10.0
- offset_top = -64.0
- offset_right = 128.0
- offset_bottom = -41.0
- grow_vertical = 0
- theme_override_colors/font_color = Color(1, 1, 1, 0.752941)
- theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
- theme_override_constants/outline_size = 4
- text = "Physics engine:"
- script = ExtResource("3")
- [node name="LabelVersion" type="Label" parent="."]
- layout_mode = 1
- anchors_preset = 2
- anchor_top = 1.0
- anchor_bottom = 1.0
- offset_left = 10.0
- offset_top = -92.0
- offset_right = 125.0
- offset_bottom = -69.0
- grow_vertical = 0
- theme_override_colors/font_color = Color(1, 1, 1, 0.752941)
- theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
- theme_override_constants/outline_size = 4
- text = "Godot version:"
- script = ExtResource("2")
- [node name="LabelTest" type="Label" parent="."]
- layout_mode = 1
- anchors_preset = 2
- anchor_top = 1.0
- anchor_bottom = 1.0
- offset_left = 10.0
- offset_top = -120.0
- offset_right = 50.0
- offset_bottom = -97.0
- grow_vertical = 0
- theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
- theme_override_constants/outline_size = 4
- text = "Test:"
- script = ExtResource("5")
- [node name="LabelPause" type="Label" parent="."]
- modulate = Color(1, 1, 0, 1)
- layout_mode = 1
- anchors_preset = 5
- anchor_left = 0.5
- anchor_right = 0.5
- offset_left = -62.0
- offset_top = 48.0
- offset_right = 62.0
- offset_bottom = 96.0
- grow_horizontal = 2
- theme_override_constants/outline_size = 6
- theme_override_font_sizes/font_size = 24
- text = "Paused"
- script = ExtResource("6")
- [node name="Options" type="VBoxContainer" parent="."]
- layout_mode = 1
- anchors_preset = 1
- anchor_left = 1.0
- anchor_right = 1.0
- offset_left = -392.0
- offset_top = 56.0
- offset_right = -16.0
- offset_bottom = 168.0
- grow_horizontal = 0
- theme_override_constants/separation = 6
- [node name="TicksPerSecond" type="HBoxContainer" parent="Options"]
- layout_mode = 2
- tooltip_text = "Higher values make physics more precise at the cost of higher CPU utilization.
- Low values may result in objects phasing through each other (tunneling).
- Physics ticks per second are automatically multiplied by Time Scale in this project."
- theme_override_constants/separation = 10
- script = ExtResource("8_dg77c")
- [node name="Label" type="Label" parent="Options/TicksPerSecond"]
- custom_minimum_size = Vector2(164, 0)
- layout_mode = 2
- theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
- theme_override_constants/outline_size = 4
- text = "Ticks per Second"
- [node name="HSlider" type="HSlider" parent="Options/TicksPerSecond"]
- custom_minimum_size = Vector2(160, 0)
- layout_mode = 2
- size_flags_vertical = 4
- min_value = 10.0
- max_value = 240.0
- step = 10.0
- value = 60.0
- [node name="Value" type="Label" parent="Options/TicksPerSecond"]
- layout_mode = 2
- theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
- theme_override_constants/outline_size = 4
- text = "60"
- [node name="TimeScale" type="HBoxContainer" parent="Options"]
- layout_mode = 2
- tooltip_text = "Game speed multiplier. Physics ticks per second are
- automatically multiplied by Time Scale in this project
- to ensure accurate simulation regardless of time scale."
- theme_override_constants/separation = 10
- script = ExtResource("9_ycdy4")
- [node name="Label" type="Label" parent="Options/TimeScale"]
- custom_minimum_size = Vector2(164, 0)
- layout_mode = 2
- theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
- theme_override_constants/outline_size = 4
- text = "Time Scale"
- [node name="HSlider" type="HSlider" parent="Options/TimeScale"]
- custom_minimum_size = Vector2(160, 0)
- layout_mode = 2
- size_flags_vertical = 4
- max_value = 5.0
- step = 0.5
- value = 0.5
- [node name="Value" type="Label" parent="Options/TimeScale"]
- layout_mode = 2
- theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
- theme_override_constants/outline_size = 4
- text = "1.0×"
- [node name="MaxStepsPerFrame" type="HBoxContainer" parent="Options"]
- layout_mode = 2
- tooltip_text = "Physics will slow down if more physics steps
- than this value need to be simulated in a
- single rendered frame."
- theme_override_constants/separation = 10
- script = ExtResource("10_w48qg")
- [node name="Label" type="Label" parent="Options/MaxStepsPerFrame"]
- custom_minimum_size = Vector2(164, 0)
- layout_mode = 2
- theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
- theme_override_constants/outline_size = 4
- text = "Max Steps per Frame"
- [node name="HSlider" type="HSlider" parent="Options/MaxStepsPerFrame"]
- custom_minimum_size = Vector2(160, 0)
- layout_mode = 2
- size_flags_vertical = 4
- min_value = 1.0
- max_value = 20.0
- value = 8.0
- [node name="Value" type="Label" parent="Options/MaxStepsPerFrame"]
- layout_mode = 2
- theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
- theme_override_constants/outline_size = 4
- text = "8"
- [node name="PhysicsInterpolation" type="CheckButton" parent="Options"]
- custom_minimum_size = Vector2(217, 0)
- layout_mode = 2
- size_flags_horizontal = 0
- tooltip_text = "Smooths out rendering regardless of the physics tick rate.
- This is a purely visual effect and has no impact on the physics simulation."
- theme_override_constants/outline_size = 4
- button_pressed = true
- text = "Physics Interpolation"
- script = ExtResource("11_ycdy4")
- [node name="PanelLog" type="Panel" parent="."]
- layout_mode = 1
- anchors_preset = 3
- anchor_left = 1.0
- anchor_top = 1.0
- anchor_right = 1.0
- anchor_bottom = 1.0
- offset_left = -630.0
- offset_top = -251.0
- grow_horizontal = 0
- grow_vertical = 0
- mouse_filter = 1
- theme_override_styles/panel = SubResource("1")
- [node name="ButtonClear" type="Button" parent="PanelLog"]
- layout_mode = 1
- anchors_preset = 3
- anchor_left = 1.0
- anchor_top = 1.0
- anchor_right = 1.0
- anchor_bottom = 1.0
- offset_left = -65.0
- offset_top = -36.0
- offset_right = -5.0
- offset_bottom = -5.0
- grow_horizontal = 0
- grow_vertical = 0
- focus_mode = 0
- text = "Clear"
- [node name="CheckBoxScroll" type="CheckButton" parent="PanelLog"]
- layout_mode = 1
- anchors_preset = 3
- anchor_left = 1.0
- anchor_top = 1.0
- anchor_right = 1.0
- anchor_bottom = 1.0
- offset_left = -269.0
- offset_top = -35.0
- offset_right = -70.0
- offset_bottom = -4.0
- grow_horizontal = 0
- grow_vertical = 0
- focus_mode = 0
- button_pressed = true
- text = "Automatic Scrolling"
- [node name="ScrollLog" type="ScrollContainer" parent="PanelLog"]
- layout_mode = 0
- offset_left = 10.0
- offset_top = 5.0
- offset_right = 619.0
- offset_bottom = 210.0
- script = ExtResource("11")
- auto_scroll = true
- [node name="VBoxLog" type="VBoxContainer" parent="PanelLog/ScrollLog"]
- layout_mode = 2
- size_flags_horizontal = 3
- size_flags_vertical = 3
- alignment = 2
- script = ExtResource("10")
- [node name="LabelLog" type="Label" parent="PanelLog/ScrollLog/VBoxLog"]
- layout_mode = 2
- text = "Log start"
- max_lines_visible = 5
- [connection signal="value_changed" from="Options/TicksPerSecond/HSlider" to="Options/TicksPerSecond" method="_on_h_slider_value_changed"]
- [connection signal="value_changed" from="Options/TimeScale/HSlider" to="Options/TimeScale" method="_on_h_slider_value_changed"]
- [connection signal="value_changed" from="Options/MaxStepsPerFrame/HSlider" to="Options/MaxStepsPerFrame" method="_on_h_slider_value_changed"]
- [connection signal="toggled" from="Options/PhysicsInterpolation" to="Options/PhysicsInterpolation" method="_on_check_button_toggled"]
- [connection signal="pressed" from="PanelLog/ButtonClear" to="PanelLog/ScrollLog/VBoxLog" method="clear"]
- [connection signal="toggled" from="PanelLog/CheckBoxScroll" to="PanelLog/ScrollLog" method="_on_check_box_scroll_toggled"]
|