1
- [gd_scene load_steps =11 format =3 uid ="uid://6a0nxwkgf5dq" ]
1
+ [gd_scene load_steps =15 format =3 uid ="uid://6a0nxwkgf5dq" ]
2
2
3
3
[ext_resource type ="Script" uid ="uid://db4ofia8ieq55" path ="res://utils/label_fps.gd" id ="1" ]
4
4
[ext_resource type ="Script" uid ="uid://dustsplck84ac" path ="res://utils/label_version.gd" id ="2" ]
5
5
[ext_resource type ="Script" uid ="uid://c87b1snynit3u" path ="res://utils/label_engine.gd" id ="3" ]
6
6
[ext_resource type ="Script" uid ="uid://cw0pi4lgucxdr" path ="res://tests_menu.gd" id ="4" ]
7
7
[ext_resource type ="Script" uid ="uid://bjl0grl2gv43y" path ="res://utils/label_test.gd" id ="5" ]
8
8
[ext_resource type ="Script" uid ="uid://b4rnndt2dw5g1" path ="res://utils/label_pause.gd" id ="6" ]
9
+ [ext_resource type ="Script" uid ="uid://7kql0xtuc7ny" path ="res://utils/ticks_per_second.gd" id ="8_dg77c" ]
10
+ [ext_resource type ="Script" uid ="uid://beqnv31yip0bl" path ="res://utils/time_scale.gd" id ="9_ycdy4" ]
9
11
[ext_resource type ="Script" uid ="uid://k8crlob60yte" path ="res://utils/container_log.gd" id ="10" ]
12
+ [ext_resource type ="Script" uid ="uid://cvoeuonqmsye1" path ="res://utils/max_steps_per_frame.gd" id ="10_w48qg" ]
10
13
[ext_resource type ="Script" uid ="uid://b2t0e1okrl3j4" path ="res://utils/scroll_log.gd" id ="11" ]
14
+ [ext_resource type ="Script" uid ="uid://ijebwwx4t8et" path ="res://utils/physics_interpolation.gd" id ="11_ycdy4" ]
11
15
[ext_resource type ="Script" uid ="uid://db80201lynb6l" path ="res://tests.gd" id ="12" ]
12
16
13
17
[sub_resource type ="StyleBoxFlat" id ="1" ]
@@ -29,7 +33,7 @@ offset_left = 10.0
29
33
offset_top = 10.0
30
34
offset_right = 125.0
31
35
offset_bottom = 30.0
32
- text = "TESTS "
36
+ text = "Tests "
33
37
flat = false
34
38
script = ExtResource ("4" )
35
39
@@ -39,17 +43,18 @@ offset_left = 157.0
39
43
offset_top = 13.0
40
44
offset_right = 646.0
41
45
offset_bottom = 27.0
42
- text = "P - TOGGLE PAUSE / R - RESTART / C - TOGGLE COLLISION / F - TOGGLE FULL SCREEN / ESC - QUIT"
46
+ theme_override_constants/outline_size = 4
47
+ text = "P: Toggle Pause | R: Restart | C: Toggle Collision | F: Toggle Fullscreen | ESC: Quit"
43
48
44
49
[node name ="LabelFPS" type ="Label" parent ="." ]
45
50
layout_mode = 1
46
51
anchors_preset = 2
47
52
anchor_top = 1.0
48
53
anchor_bottom = 1.0
49
54
offset_left = 10.0
50
- offset_top = -19 .0
51
- offset_right = 50 .0
52
- offset_bottom = -5 .0
55
+ offset_top = -36 .0
56
+ offset_right = 55 .0
57
+ offset_bottom = -13 .0
53
58
grow_vertical = 0
54
59
theme_override_colors/font_outline_color = Color (0 , 0 , 0 , 1 )
55
60
theme_override_constants/outline_size = 4
@@ -62,10 +67,11 @@ anchors_preset = 2
62
67
anchor_top = 1.0
63
68
anchor_bottom = 1.0
64
69
offset_left = 10.0
65
- offset_top = -56 .0
70
+ offset_top = -64 .0
66
71
offset_right = 128.0
67
- offset_bottom = -33 .0
72
+ offset_bottom = -41 .0
68
73
grow_vertical = 0
74
+ theme_override_colors/font_color = Color (1 , 1 , 1 , 0.752941 )
69
75
theme_override_colors/font_outline_color = Color (0 , 0 , 0 , 1 )
70
76
theme_override_constants/outline_size = 4
71
77
text = "Physics engine:"
@@ -77,13 +83,14 @@ anchors_preset = 2
77
83
anchor_top = 1.0
78
84
anchor_bottom = 1.0
79
85
offset_left = 10.0
80
- offset_top = -84 .0
86
+ offset_top = -92 .0
81
87
offset_right = 125.0
82
- offset_bottom = -61 .0
88
+ offset_bottom = -69 .0
83
89
grow_vertical = 0
90
+ theme_override_colors/font_color = Color (1 , 1 , 1 , 0.752941 )
84
91
theme_override_colors/font_outline_color = Color (0 , 0 , 0 , 1 )
85
92
theme_override_constants/outline_size = 4
86
- text = "Godot Version :"
93
+ text = "Godot version :"
87
94
script = ExtResource ("2" )
88
95
89
96
[node name ="LabelTest" type ="Label" parent ="." ]
@@ -92,9 +99,9 @@ anchors_preset = 2
92
99
anchor_top = 1.0
93
100
anchor_bottom = 1.0
94
101
offset_left = 10.0
95
- offset_top = -112 .0
102
+ offset_top = -120 .0
96
103
offset_right = 50.0
97
- offset_bottom = -89 .0
104
+ offset_bottom = -97 .0
98
105
grow_vertical = 0
99
106
theme_override_colors/font_outline_color = Color (0 , 0 , 0 , 1 )
100
107
theme_override_constants/outline_size = 4
@@ -112,10 +119,122 @@ offset_top = 48.0
112
119
offset_right = 62.0
113
120
offset_bottom = 96.0
114
121
grow_horizontal = 2
115
- theme_override_font_sizes/font_size = 32
116
- text = "PAUSED"
122
+ theme_override_constants/outline_size = 6
123
+ theme_override_font_sizes/font_size = 24
124
+ text = "Paused"
117
125
script = ExtResource ("6" )
118
126
127
+ [node name ="Options" type ="VBoxContainer" parent ="." ]
128
+ layout_mode = 1
129
+ anchors_preset = 1
130
+ anchor_left = 1.0
131
+ anchor_right = 1.0
132
+ offset_left = -392.0
133
+ offset_top = 56.0
134
+ offset_right = -16.0
135
+ offset_bottom = 168.0
136
+ grow_horizontal = 0
137
+ theme_override_constants/separation = 6
138
+
139
+ [node name ="TicksPerSecond" type ="HBoxContainer" parent ="Options" ]
140
+ layout_mode = 2
141
+ tooltip_text = "Higher values make physics more precise at the cost of higher CPU utilization.
142
+ Low values may result in objects phasing through each other (tunneling).
143
+ Physics ticks per second are automatically multiplied by Time Scale in this project."
144
+ theme_override_constants/separation = 10
145
+ script = ExtResource ("8_dg77c" )
146
+
147
+ [node name ="Label" type ="Label" parent ="Options/TicksPerSecond" ]
148
+ custom_minimum_size = Vector2 (164 , 0 )
149
+ layout_mode = 2
150
+ theme_override_colors/font_outline_color = Color (0 , 0 , 0 , 1 )
151
+ theme_override_constants/outline_size = 4
152
+ text = "Ticks per Second"
153
+
154
+ [node name ="HSlider" type ="HSlider" parent ="Options/TicksPerSecond" ]
155
+ custom_minimum_size = Vector2 (160 , 0 )
156
+ layout_mode = 2
157
+ size_flags_vertical = 4
158
+ min_value = 10.0
159
+ max_value = 240.0
160
+ step = 10.0
161
+ value = 60.0
162
+
163
+ [node name ="Value" type ="Label" parent ="Options/TicksPerSecond" ]
164
+ layout_mode = 2
165
+ theme_override_colors/font_outline_color = Color (0 , 0 , 0 , 1 )
166
+ theme_override_constants/outline_size = 4
167
+ text = "60"
168
+
169
+ [node name ="TimeScale" type ="HBoxContainer" parent ="Options" ]
170
+ layout_mode = 2
171
+ tooltip_text = "Game speed multiplier. Physics ticks per second are
172
+ automatically multiplied by Time Scale in this project
173
+ to ensure accurate simulation regardless of time scale."
174
+ theme_override_constants/separation = 10
175
+ script = ExtResource ("9_ycdy4" )
176
+
177
+ [node name ="Label" type ="Label" parent ="Options/TimeScale" ]
178
+ custom_minimum_size = Vector2 (164 , 0 )
179
+ layout_mode = 2
180
+ theme_override_colors/font_outline_color = Color (0 , 0 , 0 , 1 )
181
+ theme_override_constants/outline_size = 4
182
+ text = "Time Scale"
183
+
184
+ [node name ="HSlider" type ="HSlider" parent ="Options/TimeScale" ]
185
+ custom_minimum_size = Vector2 (160 , 0 )
186
+ layout_mode = 2
187
+ size_flags_vertical = 4
188
+ max_value = 5.0
189
+ step = 0.5
190
+ value = 0.5
191
+
192
+ [node name ="Value" type ="Label" parent ="Options/TimeScale" ]
193
+ layout_mode = 2
194
+ theme_override_colors/font_outline_color = Color (0 , 0 , 0 , 1 )
195
+ theme_override_constants/outline_size = 4
196
+ text = "1.0×"
197
+
198
+ [node name ="MaxStepsPerFrame" type ="HBoxContainer" parent ="Options" ]
199
+ layout_mode = 2
200
+ tooltip_text = "Physics will slow down if more physics steps
201
+ than this value need to be simulated in a
202
+ single rendered frame."
203
+ theme_override_constants/separation = 10
204
+ script = ExtResource ("10_w48qg" )
205
+
206
+ [node name ="Label" type ="Label" parent ="Options/MaxStepsPerFrame" ]
207
+ custom_minimum_size = Vector2 (164 , 0 )
208
+ layout_mode = 2
209
+ theme_override_colors/font_outline_color = Color (0 , 0 , 0 , 1 )
210
+ theme_override_constants/outline_size = 4
211
+ text = "Max Steps per Frame"
212
+
213
+ [node name ="HSlider" type ="HSlider" parent ="Options/MaxStepsPerFrame" ]
214
+ custom_minimum_size = Vector2 (160 , 0 )
215
+ layout_mode = 2
216
+ size_flags_vertical = 4
217
+ min_value = 1.0
218
+ max_value = 20.0
219
+ value = 8.0
220
+
221
+ [node name ="Value" type ="Label" parent ="Options/MaxStepsPerFrame" ]
222
+ layout_mode = 2
223
+ theme_override_colors/font_outline_color = Color (0 , 0 , 0 , 1 )
224
+ theme_override_constants/outline_size = 4
225
+ text = "8"
226
+
227
+ [node name ="PhysicsInterpolation" type ="CheckButton" parent ="Options" ]
228
+ custom_minimum_size = Vector2 (217 , 0 )
229
+ layout_mode = 2
230
+ size_flags_horizontal = 0
231
+ tooltip_text = "Smooths out rendering regardless of the physics tick rate.
232
+ This is a purely visual effect and has no impact on the physics simulation."
233
+ theme_override_constants/outline_size = 4
234
+ button_pressed = true
235
+ text = "Physics Interpolation"
236
+ script = ExtResource ("11_ycdy4" )
237
+
119
238
[node name ="PanelLog" type ="Panel" parent ="." ]
120
239
layout_mode = 1
121
240
anchors_preset = 3
@@ -127,6 +246,7 @@ offset_left = -630.0
127
246
offset_top = -251.0
128
247
grow_horizontal = 0
129
248
grow_vertical = 0
249
+ mouse_filter = 1
130
250
theme_override_styles/panel = SubResource ("1" )
131
251
132
252
[node name ="ButtonClear" type ="Button" parent ="PanelLog" ]
@@ -136,8 +256,8 @@ anchor_left = 1.0
136
256
anchor_top = 1.0
137
257
anchor_right = 1.0
138
258
anchor_bottom = 1.0
139
- offset_left = -48 .0
140
- offset_top = -25 .0
259
+ offset_left = -65 .0
260
+ offset_top = -36 .0
141
261
offset_right = -5.0
142
262
offset_bottom = -5.0
143
263
grow_horizontal = 0
@@ -152,13 +272,14 @@ anchor_left = 1.0
152
272
anchor_top = 1.0
153
273
anchor_right = 1.0
154
274
anchor_bottom = 1.0
155
- offset_left = -261 .0
275
+ offset_left = -269 .0
156
276
offset_top = -35.0
157
- offset_right = -62 .0
277
+ offset_right = -70 .0
158
278
offset_bottom = -4.0
159
279
grow_horizontal = 0
160
280
grow_vertical = 0
161
281
focus_mode = 0
282
+ button_pressed = true
162
283
text = "Automatic Scrolling"
163
284
164
285
[node name ="ScrollLog" type ="ScrollContainer" parent ="PanelLog" ]
@@ -182,5 +303,9 @@ layout_mode = 2
182
303
text = "Log start"
183
304
max_lines_visible = 5
184
305
306
+ [connection signal ="value_changed" from ="Options/TicksPerSecond/HSlider" to ="Options/TicksPerSecond" method ="_on_h_slider_value_changed" ]
307
+ [connection signal ="value_changed" from ="Options/TimeScale/HSlider" to ="Options/TimeScale" method ="_on_h_slider_value_changed" ]
308
+ [connection signal ="value_changed" from ="Options/MaxStepsPerFrame/HSlider" to ="Options/MaxStepsPerFrame" method ="_on_h_slider_value_changed" ]
309
+ [connection signal ="toggled" from ="Options/PhysicsInterpolation" to ="Options/PhysicsInterpolation" method ="_on_check_button_toggled" ]
185
310
[connection signal ="pressed" from ="PanelLog/ButtonClear" to ="PanelLog/ScrollLog/VBoxLog" method ="clear" ]
186
311
[connection signal ="toggled" from ="PanelLog/CheckBoxScroll" to ="PanelLog/ScrollLog" method ="_on_check_box_scroll_toggled" ]
0 commit comments