diff --git a/prefabs/hit_popup.tscn b/prefabs/hit_popup.tscn index 505d985e..5422e3cb 100644 --- a/prefabs/hit_popup.tscn +++ b/prefabs/hit_popup.tscn @@ -5,5 +5,6 @@ [node name="HitPopup" type="Label3D" unique_id=943142641] modulate = Color(1, 1, 1, 0.47058824) outline_modulate = Color(0, 0, 0, 0) -text = "100" +text = "{0} +{1}" font = ExtResource("1_65qcu") diff --git a/prefabs/score_panel.tscn b/prefabs/score_panel.tscn index 44a6109d..83bfe436 100644 --- a/prefabs/score_panel.tscn +++ b/prefabs/score_panel.tscn @@ -6,7 +6,7 @@ [ext_resource type="Texture2D" uid="uid://b0k0ltu15bart" path="res://user/skins/default/modifiers/nofail.png" id="4_ngxw4"] [ext_resource type="Theme" uid="uid://dhuhu3mmaew1a" path="res://themes/theme.tres" id="5_ngxw4"] -[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_bfkib"] +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ngxw4"] [sub_resource type="LabelSettings" id="LabelSettings_ddh1n"] font = ExtResource("2_ngxw4") @@ -52,13 +52,13 @@ shadow_size = 4 shadow_color = Color(0, 0, 0, 1) [node name="ScorePanel" type="Panel" unique_id=1580355860] -clip_contents = true custom_minimum_size = Vector2(0, 100) +clip_contents = true anchors_preset = 10 anchor_right = 1.0 size_flags_horizontal = 3 mouse_filter = 1 -theme_override_styles/panel = SubResource("StyleBoxEmpty_bfkib") +theme_override_styles/panel = SubResource("StyleBoxEmpty_ngxw4") script = ExtResource("1_rwxrw") [node name="Background" type="ColorRect" parent="." unique_id=1143150021] @@ -84,7 +84,7 @@ label_settings = SubResource("LabelSettings_ddh1n") vertical_alignment = 1 text_overrun_behavior = 3 -[node name="Score" type="Label" parent="." unique_id=1064018268] +[node name="Timer" type="Label" parent="." unique_id=1064018268] layout_mode = 1 anchors_preset = -1 anchor_left = 0.6 @@ -98,7 +98,8 @@ label_settings = SubResource("LabelSettings_i1p2f") horizontal_alignment = 2 vertical_alignment = 1 -[node name="Accuracy" type="Label" parent="." unique_id=696162467] +[node name="Accuracy1" type="Label" parent="." unique_id=696162467] +visible = false layout_mode = 1 anchors_preset = -1 anchor_left = 0.6 @@ -113,6 +114,30 @@ label_settings = SubResource("LabelSettings_exmec") horizontal_alignment = 2 vertical_alignment = 1 +[node name="Accuracy" type="RichTextLabel" parent="." unique_id=1126934800] +clip_contents = false +layout_mode = 1 +anchors_preset = -1 +anchor_left = 0.6 +anchor_top = 0.4 +anchor_right = 1.0 +anchor_bottom = 0.4 +offset_left = 4.0 +offset_top = 4.0 +offset_right = -16.0 +offset_bottom = 25.0 +focus_mode = 0 +mouse_filter = 2 +theme_override_fonts/normal_font = ExtResource("3_314mk") +theme_override_font_sizes/normal_font_size = 18 +bbcode_enabled = true +text = "[color=#a0a0a0] ?? [color=#a0a0a0] | 100,000 | 100%" +fit_content = true +scroll_active = false +autowrap_mode = 0 +horizontal_alignment = 2 +vertical_alignment = 1 + [node name="Time" type="Label" parent="." unique_id=254210783] layout_mode = 1 anchors_preset = -1 @@ -125,7 +150,7 @@ offset_top = 4.0 offset_right = -16.0 offset_bottom = -8.0 grow_vertical = 0 -text = "1,000 days ago" +text = "1,000 days ago | Version : #" label_settings = SubResource("LabelSettings_58c0b") horizontal_alignment = 2 vertical_alignment = 1 diff --git a/scenes/game.tscn b/scenes/game.tscn index 321c0b55..c6cd0f36 100644 --- a/scenes/game.tscn +++ b/scenes/game.tscn @@ -134,6 +134,10 @@ texture_repeat = false [sub_resource type="QuadMesh" id="QuadMesh_ssyve"] size = Vector2(4, 10) +[sub_resource type="LabelSettings" id="LabelSettings_pr1ej"] +font = ExtResource("21_05nbr") +font_size = 50 + [sub_resource type="ShaderMaterial" id="ShaderMaterial_x2xye"] shader = ExtResource("14_y51pe") shader_parameter/progress = 0.8870000421325 @@ -150,9 +154,69 @@ bg_color = Color(0, 0, 0, 0) font = ExtResource("20_pr1ej") font_size = 50 -[sub_resource type="LabelSettings" id="LabelSettings_pr1ej"] -font = ExtResource("21_05nbr") -font_size = 50 +[sub_resource type="FontFile" id="FontFile_rc4du"] +cache/0/variation_coordinates = {} +cache/0/face_index = 0 +cache/0/embolden = 0.0 +cache/0/transform = Transform2D(1, 0, 0, 1, 0, 0) +cache/0/spacing_top = 0 +cache/0/spacing_bottom = 0 +cache/0/spacing_space = 0 +cache/0/spacing_glyph = 0 +cache/0/baseline_offset = 0.0 +cache/0/16/0/ascent = 0.0 +cache/0/16/0/descent = 0.0 +cache/0/16/0/underline_position = 0.0 +cache/0/16/0/underline_thickness = 0.0 +cache/0/16/0/scale = 1.0 + +[sub_resource type="FontFile" id="FontFile_ay2bh"] +cache/0/variation_coordinates = {} +cache/0/face_index = 0 +cache/0/embolden = 0.0 +cache/0/transform = Transform2D(1, 0, 0, 1, 0, 0) +cache/0/spacing_top = 0 +cache/0/spacing_bottom = 0 +cache/0/spacing_space = 0 +cache/0/spacing_glyph = 0 +cache/0/baseline_offset = 0.0 +cache/0/16/0/ascent = 0.0 +cache/0/16/0/descent = 0.0 +cache/0/16/0/underline_position = 0.0 +cache/0/16/0/underline_thickness = 0.0 +cache/0/16/0/scale = 1.0 + +[sub_resource type="FontFile" id="FontFile_ag8t5"] +cache/0/variation_coordinates = {} +cache/0/face_index = 0 +cache/0/embolden = 0.0 +cache/0/transform = Transform2D(1, 0, 0, 1, 0, 0) +cache/0/spacing_top = 0 +cache/0/spacing_bottom = 0 +cache/0/spacing_space = 0 +cache/0/spacing_glyph = 0 +cache/0/baseline_offset = 0.0 +cache/0/16/0/ascent = 0.0 +cache/0/16/0/descent = 0.0 +cache/0/16/0/underline_position = 0.0 +cache/0/16/0/underline_thickness = 0.0 +cache/0/16/0/scale = 1.0 + +[sub_resource type="FontFile" id="FontFile_3jteb"] +cache/0/variation_coordinates = {} +cache/0/face_index = 0 +cache/0/embolden = 0.0 +cache/0/transform = Transform2D(1, 0, 0, 1, 0, 0) +cache/0/spacing_top = 0 +cache/0/spacing_bottom = 0 +cache/0/spacing_space = 0 +cache/0/spacing_glyph = 0 +cache/0/baseline_offset = 0.0 +cache/0/16/0/ascent = 0.0 +cache/0/16/0/descent = 0.0 +cache/0/16/0/underline_position = 0.0 +cache/0/16/0/underline_thickness = 0.0 +cache/0/16/0/scale = 1.0 [sub_resource type="LabelSettings" id="LabelSettings_pause_counter_title"] font = ExtResource("21_05nbr") @@ -304,13 +368,14 @@ Runner = NodePath("../Runner") ReplayViewer = NodePath("../ReplayViewer") CursorManager = NodePath("../CursorManager") -[node name="Runner" type="Node3D" parent="." unique_id=580620214 node_paths=PackedStringArray("HudManager", "Camera", "Renderers", "Grid", "Cursor")] +[node name="Runner" type="Node3D" parent="." unique_id=580620214 node_paths=PackedStringArray("HudManager", "Camera", "Renderers", "Grid", "Cursor", "BufferCursor")] script = ExtResource("2_qnb83") HudManager = NodePath("HUD") Camera = NodePath("Camera3D") Renderers = [NodePath("Renderers/Notes")] Grid = NodePath("HUD/Grid") Cursor = NodePath("HUD/Grid/Cursor") +BufferCursor = NodePath("HUD/Grid/BufferCursor") [node name="HUD" type="Node3D" parent="Runner" unique_id=1234434255 node_paths=PackedStringArray("Runner")] script = ExtResource("3_sww3w") @@ -325,11 +390,10 @@ script = ExtResource("27_js0lu") mesh = SubResource("QuadMesh_xij4d") skeleton = NodePath("../../../..") -[node name="BufferCursor" type="MeshInstance3D" parent="Runner/HUD/Grid" unique_id=703771191] +[node name="BufferCursor" type="MeshInstance3D" parent="Runner/HUD/Grid" unique_id=1773544652] visible = false -transparency = 1.0 mesh = SubResource("QuadMesh_xij4d") -skeleton = NodePath("../../..") +skeleton = NodePath("../../../..") [node name="CursorTrail" type="MultiMeshInstance3D" parent="Runner/HUD/Grid" unique_id=913051903] material_override = SubResource("StandardMaterial3D_ssr8x") @@ -394,7 +458,7 @@ transparent_bg = true canvas_item_default_texture_filter = 2 size = Vector2i(250, 625) -[node name="Background" type="TextureRect" parent="Runner/HUD/PanelLeft/PanelLeftViewport" unique_id=1374853699] +[node name="Background" type="TextureRect" parent="Runner/HUD/PanelLeft/PanelLeftViewport" unique_id=634060823] anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 @@ -402,7 +466,24 @@ grow_horizontal = 2 grow_vertical = 2 texture = ExtResource("11_sdncv") -[node name="MultiplierProgress" type="Panel" parent="Runner/HUD/PanelLeft/PanelLeftViewport" unique_id=1067613329] +[node name="Multiplier" type="Label" parent="Runner/HUD/PanelLeft/PanelLeftViewport" unique_id=845485554] +anchors_preset = -1 +anchor_left = 0.5 +anchor_top = 0.65 +anchor_right = 0.5 +anchor_bottom = 0.65 +offset_left = -28.5 +offset_top = -171.25 +offset_right = 28.5 +offset_bottom = -102.25 +grow_horizontal = 2 +grow_vertical = 2 +theme = ExtResource("4_rvp5o") +text = "1x" +label_settings = SubResource("LabelSettings_pr1ej") +horizontal_alignment = 1 + +[node name="MultiplierProgress" type="Panel" parent="Runner/HUD/PanelLeft/PanelLeftViewport" unique_id=502870620] clip_children = 2 material = SubResource("ShaderMaterial_x2xye") anchors_preset = -1 @@ -411,61 +492,123 @@ anchor_top = 0.65 anchor_right = 0.5 anchor_bottom = 0.65 offset_left = -128.0 -offset_top = -166.25 +offset_top = -267.125 offset_right = 128.0 -offset_bottom = 89.75128 +offset_bottom = -11.125 theme_override_styles/panel = SubResource("StyleBoxFlat_56f8v") -[node name="Score" type="Label" parent="Runner/HUD/PanelLeft/PanelLeftViewport" unique_id=1330190508] +[node name="Score" type="Label" parent="Runner/HUD/PanelLeft/PanelLeftViewport" unique_id=1332908445] anchors_preset = -1 anchor_left = 0.5 anchor_top = 0.35 anchor_right = 0.5 anchor_bottom = 0.35 -offset_left = -15.0 -offset_top = -34.5 -offset_right = 15.0 -offset_bottom = 34.500122 +offset_left = -96.0 +offset_top = -126.625 +offset_right = 96.0 +offset_bottom = -57.62497 grow_horizontal = 2 grow_vertical = 2 theme = ExtResource("4_rvp5o") -text = "0" +text = "100,000" label_settings = SubResource("LabelSettings_usmyc") horizontal_alignment = 1 -[node name="Multiplier" type="Label" parent="Runner/HUD/PanelLeft/PanelLeftViewport" unique_id=1660490363] +[node name="Grade" type="RichTextLabel" parent="Runner/HUD/PanelLeft/PanelLeftViewport" unique_id=325733819] +clip_contents = false anchors_preset = -1 anchor_left = 0.5 -anchor_top = 0.65 +anchor_top = 0.86 anchor_right = 0.5 -anchor_bottom = 0.65 -offset_left = -28.5 -offset_top = -71.25 -offset_right = 28.5 -offset_bottom = -2.2499695 +anchor_bottom = 0.86 +offset_left = -90.0 +offset_top = -167.5 +offset_right = 90.0 +offset_bottom = -64.49988 grow_horizontal = 2 grow_vertical = 2 -theme = ExtResource("4_rvp5o") -text = "1x" -label_settings = SubResource("LabelSettings_pr1ej") +size_flags_vertical = 4 +focus_mode = 0 +mouse_filter = 2 +theme_override_colors/font_outline_color = Color(0, 0, 0, 0.8627451) +theme_override_fonts/normal_font = ExtResource("20_pr1ej") +theme_override_fonts/bold_font = SubResource("FontFile_rc4du") +theme_override_fonts/bold_italics_font = SubResource("FontFile_ay2bh") +theme_override_fonts/italics_font = SubResource("FontFile_ag8t5") +theme_override_fonts/mono_font = SubResource("FontFile_3jteb") +theme_override_font_sizes/normal_font_size = 60 +bbcode_enabled = true +text = "??" +fit_content = true +scroll_active = false +autowrap_mode = 0 horizontal_alignment = 1 +vertical_alignment = 1 -[node name="ComboCount" type="Label" parent="Runner/HUD/PanelLeft/PanelLeftViewport" unique_id=531787894] +[node name="ComboCount" type="Label" parent="Runner/HUD/PanelLeft/PanelLeftViewport" unique_id=2093196584] anchors_preset = -1 anchor_left = 0.5 anchor_top = 0.86 anchor_right = 0.5 anchor_bottom = 0.86 offset_left = -90.0 -offset_top = -34.5 +offset_top = -47.5 offset_right = 90.0 -offset_bottom = 34.5 +offset_bottom = 21.500244 grow_horizontal = 2 grow_vertical = 2 text = "0" label_settings = SubResource("LabelSettings_pause_counter_title") horizontal_alignment = 1 +[node name="GradeBG" type="ColorRect" parent="Runner/HUD/PanelLeft/PanelLeftViewport" unique_id=325955024] +offset_left = 65.0 +offset_top = 470.0 +offset_right = 184.99998 +offset_bottom = 480.0 +color = Color(0.24115604, 0.24115604, 0.24115604, 1) + +[node name="GradeProgress" type="ColorRect" parent="Runner/HUD/PanelLeft/PanelLeftViewport" unique_id=1999479396] +offset_left = 65.0 +offset_top = 470.0 +offset_right = 65.0 +offset_bottom = 480.0 + +[node name="D" type="ColorRect" parent="Runner/HUD/PanelLeft/PanelLeftViewport/GradeProgress" unique_id=512780676] +layout_mode = 0 +offset_left = 72.0 +offset_right = 74.0 +offset_bottom = 10.0 +color = Color(0.5931336, 0.59313357, 0.59313357, 1) + +[node name="C" type="ColorRect" parent="Runner/HUD/PanelLeft/PanelLeftViewport/GradeProgress" unique_id=1515003541] +layout_mode = 0 +offset_left = 84.0 +offset_right = 86.0 +offset_bottom = 10.0 +color = Color(0.5921569, 0.5921569, 0.5921569, 1) + +[node name="B" type="ColorRect" parent="Runner/HUD/PanelLeft/PanelLeftViewport/GradeProgress" unique_id=1736722831] +layout_mode = 0 +offset_left = 96.0 +offset_right = 98.0 +offset_bottom = 10.0 +color = Color(0.5921569, 0.5921569, 0.5921569, 1) + +[node name="A" type="ColorRect" parent="Runner/HUD/PanelLeft/PanelLeftViewport/GradeProgress" unique_id=217593602] +layout_mode = 0 +offset_left = 108.0 +offset_right = 110.0 +offset_bottom = 10.0 +color = Color(0.5921569, 0.5921569, 0.5921569, 1) + +[node name="S" type="ColorRect" parent="Runner/HUD/PanelLeft/PanelLeftViewport/GradeProgress" unique_id=411840827] +layout_mode = 0 +offset_left = 114.0 +offset_right = 116.0 +offset_bottom = 10.0 +color = Color(0.5921569, 0.5921569, 0.5921569, 1) + [node name="PanelRight" type="MeshInstance3D" parent="Runner/HUD" unique_id=1993445313] transform = Transform3D(0.984808, 0, -0.173648, 0, 1, 0, 0.173648, 0, 0.984808, 7.5, 0, -9) material_override = SubResource("StandardMaterial3D_ro5ir") diff --git a/scenes/main.tscn b/scenes/main.tscn index e35a08c4..9dbf4019 100644 --- a/scenes/main.tscn +++ b/scenes/main.tscn @@ -334,19 +334,14 @@ handle_input_locally = false size = Vector2i(1280, 720) render_target_update_mode = 4 -[node name="Map Browser" parent="." unique_id=1634674963 instance=ExtResource("2_ya4ey")] -visible = false -z_index = 1 - [node name="Settings" type="ColorRect" parent="." unique_id=1393582030 node_paths=PackedStringArray("ImportNightlyDialog", "UserFolderDialog")] -z_index = 1 +visible = false anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 -mouse_filter = 2 -color = Color(0, 0, 0, 0.501961) +color = Color(0, 0, 0, 0.5019608) script = ExtResource("2_o6xl0") ImportNightlyDialog = NodePath("ImportNightlyDialog") UserFolderDialog = NodePath("UserFolderDialog") @@ -1156,6 +1151,10 @@ transparency = 0.25 mesh = SubResource("QuadMesh_ro3en") skeleton = NodePath("") +[node name="Map Browser" parent="." unique_id=1634674963 instance=ExtResource("2_ya4ey")] +visible = false +z_index = 1 + [node name="Volume" type="Panel" parent="." unique_id=1219254705] modulate = Color(1, 1, 1, 0) z_index = 1 diff --git a/scenes/main_menu.tscn b/scenes/main_menu.tscn index 626cd65b..0084bce7 100644 --- a/scenes/main_menu.tscn +++ b/scenes/main_menu.tscn @@ -437,7 +437,7 @@ layout_mode = 2 [node name="Header" type="Label" parent="Menus/Home/News/VBoxContainer" unique_id=1350479761] layout_mode = 2 -text = "0.1.2 (early-26apr30)" +text = "Score Overhaul PTB" label_settings = SubResource("LabelSettings_0uejd") horizontal_alignment = 1 vertical_alignment = 1 @@ -451,12 +451,11 @@ theme_override_constants/paragraph_separation = 6 theme_override_fonts/normal_font = ExtResource("7_6h3lr") theme_override_styles/normal = SubResource("StyleBoxEmpty_k5xsf") bbcode_enabled = true -text = "[font_size=28][b]FEATURES[/b][font_size=18] -+ Galaxy space[br]+ Tunnel space[br]+ Cursor Rotation setting[br]+ Cursor Opacity setting[br]+ Space to Pause setting[br]+ Local Offset setting[br]+ More volume settings[br]+ Super Simple HUD setting[br]+ Hold R to exit map keybind[br]+ F1 to open wiki keybind[br]+ Ctrl + M to mute keybind[br]+ Miss sounds[br]+ Menu music (currently empty, replace menu.mp3 to your skin folder)[br]* Changed Fade Out setting to a slider & updated its behaviour to work more like Fade In[br]* Added support for nightly colorset format -[font_size=28][b]FIXES[/b][font_size=18] -* Fixed comma decimal separator number formatting[br]* Fixed Start From slider with comma decimal separator[br]* Fixed map info covers resizing after import[br]* Fixed map list not updating on map deletion[br]* Safer cover & skin texture loading[br]* Safer note color parsing[br]* Fixed maps failing to import on systems with <4 threads[br]* Dynamic song resyncing during gameplay[br]* Fixed song progress bar incremental update delay[br]* Fixed double Esc to open game menu after opening settings[br]* Fixed flickering notes in replays[br]* Fixed clicking outside the update popup causing a softlock[br]* Fixed displayed selected profile inaccurate[br]* Fixed number range settings imprecision[br]* Fixed song search bar not focusing on key press after using slider -[font_size=28][b]MISC[/b][font_size=18] -* Cap framerate at 30 when unfocused[br]* Allow windowed mode to be resized" +text = "[font_size=28][b]CHANGES[/b][font_size=18] +- Normalized Scoring (Perfect FC = 1 million score)[br]- Judgement Overhaul (4 judgements total, previously 2)[br]- Mult. cap 8 > 6[br]- On note miss, lose Mult. / 2 rounded down[br] +[font_size=28][b]NOTICE[/b][font_size=24] +!! This branch will wipe your old scores set before this version !![font_size=18] [br]- You may encounter bugs, report them via #bug-reports +- We would like to hear your feedback in our #ptb-feedback channel" shortcut_keys_enabled = false [node name="Panel" type="Panel" parent="Menus/Home/News/VBoxContainer/RichTextLabel" unique_id=1035549202] diff --git a/scenes/results.tscn b/scenes/results.tscn index 2d910e0f..5dcd0aae 100644 --- a/scenes/results.tscn +++ b/scenes/results.tscn @@ -66,6 +66,16 @@ font_size = 42 font = ExtResource("2_f4qdi") font_size = 42 +[sub_resource type="LabelSettings" id="LabelSettings_gdxgs"] + +[sub_resource type="LabelSettings" id="LabelSettings_00qb5"] +font_size = 12 +font_color = Color(1, 1, 1, 0.29411766) + +[sub_resource type="LabelSettings" id="LabelSettings_00fns"] +font_size = 8 +font_color = Color(1, 1, 1, 0.29411766) + [sub_resource type="LabelSettings" id="LabelSettings_6anxq"] font = ExtResource("3_rsbg1") font_size = 11 @@ -304,22 +314,110 @@ offset_bottom = -96.0 color = Color(1, 1, 1, 0) script = ExtResource("4_b55ol") +[node name="Perfects" type="Label" parent="Holder/Graph" unique_id=1872425890] +layout_mode = 1 +anchors_preset = 10 +anchor_right = 1.0 +offset_top = -23.0 +offset_bottom = 23.0 +grow_horizontal = 2 +text = "Perfects: #" +label_settings = SubResource("LabelSettings_gdxgs") +horizontal_alignment = 1 + +[node name="Greats" type="Label" parent="Holder/Graph" unique_id=1220219417] +layout_mode = 1 +anchors_preset = 10 +anchor_right = 1.0 +offset_top = 76.0 +offset_bottom = 93.0 +grow_horizontal = 2 +text = "Greats: #" +label_settings = SubResource("LabelSettings_00qb5") +horizontal_alignment = 1 + +[node name="Okays" type="Label" parent="Holder/Graph" unique_id=436182218] +layout_mode = 1 +anchors_preset = 10 +anchor_right = 1.0 +offset_top = 112.0 +offset_bottom = 124.0 +grow_horizontal = 2 +text = "Okays: #" +label_settings = SubResource("LabelSettings_00fns") +horizontal_alignment = 1 + +[node name="Bads" type="Label" parent="Holder/Graph" unique_id=1134517622] +layout_mode = 1 +anchors_preset = 10 +anchor_right = 1.0 +offset_top = 134.0 +offset_bottom = 146.0 +grow_horizontal = 2 +text = "Bads: #" +label_settings = SubResource("LabelSettings_00fns") +horizontal_alignment = 1 + [node name="OffsetTop" type="Label" parent="Holder/Graph" unique_id=465789986] layout_mode = 1 anchors_preset = -1 offset_left = -32.0 +offset_top = -14.0 grow_horizontal = 0 text = "0ms" label_settings = SubResource("LabelSettings_6anxq") horizontal_alignment = 2 vertical_alignment = 1 +[node name="JudgementGood" type="Label" parent="Holder/Graph" unique_id=79263222] +layout_mode = 1 +anchors_preset = -1 +anchor_top = 0.578 +anchor_bottom = 0.578 +offset_left = -32.0 +offset_top = -11.480003 +offset_bottom = 11.519997 +grow_horizontal = 0 +text = "31ms" +label_settings = SubResource("LabelSettings_6anxq") +horizontal_alignment = 2 +vertical_alignment = 1 + +[node name="JudgementOkay" type="Label" parent="Holder/Graph" unique_id=73984163] +layout_mode = 1 +anchors_preset = -1 +anchor_top = 0.76900005 +anchor_bottom = 0.76900005 +offset_left = -32.0 +offset_top = -7.0400085 +offset_bottom = 6.9599915 +grow_horizontal = 0 +text = "41ms" +label_settings = SubResource("LabelSettings_6anxq") +horizontal_alignment = 2 +vertical_alignment = 1 + +[node name="JudgementBad" type="Label" parent="Holder/Graph" unique_id=141723295] +layout_mode = 1 +anchors_preset = -1 +anchor_top = 0.90000004 +anchor_bottom = 0.90000004 +offset_left = -32.0 +offset_top = -7.0 +offset_bottom = 7.0 +grow_horizontal = 0 +text = "51ms" +label_settings = SubResource("LabelSettings_6anxq") +horizontal_alignment = 2 +vertical_alignment = 1 + [node name="OffsetBottom" type="Label" parent="Holder/Graph" unique_id=2053550374] layout_mode = 1 anchors_preset = -1 anchor_top = 1.0 anchor_bottom = 1.0 offset_left = -32.0 +offset_bottom = 14.0 grow_horizontal = 0 grow_vertical = 0 text = "55ms" @@ -327,14 +425,37 @@ label_settings = SubResource("LabelSettings_6anxq") horizontal_alignment = 2 vertical_alignment = 1 -[node name="ScoreDropoffLine" type="ColorRect" parent="Holder/Graph" unique_id=411211979] +[node name="PerfectDropoffLine" type="ColorRect" parent="Holder/Graph" unique_id=411211979] +material = SubResource("ShaderMaterial_b4pmo") +layout_mode = 1 +anchors_preset = -1 +anchor_top = 0.578 +anchor_right = 1.0 +anchor_bottom = 0.578 +offset_top = -0.4799881 +offset_bottom = 0.5200119 +color = Color(1, 1, 1, 0.12549) + +[node name="GoodDropoffLine" type="ColorRect" parent="Holder/Graph" unique_id=247370308] +material = SubResource("ShaderMaterial_b4pmo") +layout_mode = 1 +anchors_preset = -1 +anchor_top = 0.772 +anchor_right = 1.0 +anchor_bottom = 0.772 +offset_top = -0.5200043 +offset_bottom = 0.47999573 +color = Color(1, 1, 1, 0.12549) + +[node name="OkayDropoffLine" type="ColorRect" parent="Holder/Graph" unique_id=549385781] material = SubResource("ShaderMaterial_b4pmo") layout_mode = 1 anchors_preset = -1 -anchor_top = 0.455 +anchor_top = 0.90900004 anchor_right = 1.0 -anchor_bottom = 0.455 -offset_bottom = 1.0 +anchor_bottom = 0.90900004 +offset_top = -0.44000244 +offset_bottom = 0.55999756 color = Color(1, 1, 1, 0.12549) [node name="TopBar" type="Panel" parent="." unique_id=571217894] diff --git a/scripts/Rhythia.cs b/scripts/Rhythia.cs index 15e26357..3cd8db15 100644 --- a/scripts/Rhythia.cs +++ b/scripts/Rhythia.cs @@ -198,6 +198,7 @@ public static void RegisterModifiers() new AutoplayModifier(), new GhostModifier(), new StrobeModifier(), + new FlickerModifier(), new ChaosModifier(), new VortexModifier(), new EarthquakeModifier(), diff --git a/scripts/game/Attempt.cs b/scripts/game/Attempt.cs index d39311c1..a6883dce 100644 --- a/scripts/game/Attempt.cs +++ b/scripts/game/Attempt.cs @@ -30,6 +30,7 @@ public partial class Attempt : RefCounted public bool DisableVideo; public double Accuracy = 100; + public double Grade = 0; public double Health = 100; public double HealthStep = 15; public bool HasHealthModifier = false; @@ -37,7 +38,13 @@ public partial class Attempt : RefCounted public uint Hits = 0; public uint Misses = 0; public uint Sum = 0; - public uint Score = 0; + public double Perfects = 0; + public double Greats = 0; + public double Okays = 0; + public double Bads = 0; + public double Score = 0; + public double UnitHitScore = 0; + public uint NoteWeight; public uint Combo = 0; public uint ComboMultiplier = 1; public uint ComboMultiplierProgress = 0; @@ -65,6 +72,8 @@ public partial class Attempt : RefCounted public uint ReplayFrameCountOffset = 0; public uint ReplayAttemptStatusOffset = 0; + public double Version = 1; + public Attempt( Map map, double speed, @@ -94,6 +103,21 @@ public Attempt( HitsInfo = IsReplay ? Replays[0].Notes : new float[Map.Notes.Length]; DisableVideo = disableVideo; + uint noteWeightIterations = (uint)Math.Clamp(Math.Floor((double)Map.Notes.Length / ComboMultiplierIncrement), 1, 5); + NoteWeight += Math.Min(ComboMultiplierIncrement, (uint)Map.Notes.Length) * (1 + noteWeightIterations) * noteWeightIterations / 2; + NoteWeight += + ((uint)Map.Notes.Length - Math.Min(ComboMultiplierIncrement, (uint)Map.Notes.Length) * noteWeightIterations) * (noteWeightIterations + 1); + + if (Modifiers.Count >= 1) + { + foreach (Modifier modifier in Modifiers) + { + ModsMultiplier += modifier.ScoreMultiplier - 1; + } + } + + UnitHitScore = 1000000f * ModsMultiplier * ((Speed - 1) / 2.5 + 1) / NoteWeight; + if (IsReplay) { foreach (var replay in Replays) diff --git a/scripts/game/Runner.cs b/scripts/game/Runner.cs index b6b149b8..010d1c37 100644 --- a/scripts/game/Runner.cs +++ b/scripts/game/Runner.cs @@ -57,6 +57,9 @@ public partial class Runner : Node3D public MeshInstance3D Cursor; [Export] + public MeshInstance3D BufferCursor; + + // [Export] public VideoStreamPlayer VideoStreamPlayer; public MeshInstance3D VideoMesh; [Export] @@ -73,6 +76,8 @@ public override async void _Ready() Renderers ??= GetNode>("Renderers"); Grid ??= HudManager.GetNode("Grid"); Cursor ??= GetNode("Cursor"); + BufferCursor ??= GetNode("BufferCursor"); + // VideoStreamPlayer ??= GetNode("Video/VideoViewport/VideoStreamPlayer"); VideoMesh ??= GetNode("Video"); VideoViewport ??= GetNode("Video/VideoViewport"); } @@ -579,12 +584,14 @@ public void Stop(bool results = true) Attempt.ID, "You", Attempt.Qualifies, - Attempt.Score, + (ulong)Math.Round(Attempt.Score), Attempt.Accuracy, + Attempt.Grade, Time.GetUnixTimeFromSystem(), Attempt.Progress, Attempt.Map.Length, Speed, + Attempt.Version, mods ) ); @@ -593,7 +600,7 @@ public void Stop(bool results = true) if (Attempt.Qualifies) { Stats.Instance.Passes++; - Stats.Instance.TotalScore += Attempt.Score; + Stats.Instance.TotalScore += (ulong)Math.Round(Attempt.Score); if (Attempt.Accuracy == 100) { @@ -602,7 +609,7 @@ public void Stop(bool results = true) if (Attempt.Score > Stats.Instance.HighestScore) { - Stats.Instance.HighestScore = Attempt.Score; + Stats.Instance.HighestScore = (ulong)Math.Round(Attempt.Score); } Stats.Instance.AverageAccuracy = (Stats.Instance.AverageAccuracy + Attempt.Accuracy) / Stats.Instance.Passes; @@ -624,15 +631,20 @@ private void onHitResultChanged(int noteIndex, HitResult hitResult) float lateness = Attempt.IsReplay ? Attempt.HitsInfo[noteIndex] : (float)(((int)judgmentProgress - Attempt.Map.Notes[noteIndex].Millisecond) / Speed); - float factor = 1 - Math.Max(0, lateness - 25) / 150f; - uint hitScore = (uint)(100 * Attempt.ComboMultiplier * Attempt.ModsMultiplier * factor * ((Speed - 1) / 2.5 + 1)); + float factor = 1 - (float)Math.Round(Math.Max(0, lateness - 27) / 104f, 1); + + factor = factor != 1 ? (float)Math.Round(factor - 0.1f, 1) : factor; + + double hitScore = Attempt.UnitHitScore * Attempt.ComboMultiplier * factor; switch (hitResult) { case HitResult.Hit: + judgementCheck(factor); Attempt.Hits++; Attempt.Sum++; Attempt.Accuracy = Math.Floor((float)Attempt.Hits / Attempt.Sum * 10000) / 100; + Attempt.Grade = Math.Clamp(Attempt.Accuracy / 100 * Math.Clamp(Attempt.Score / 1000000, 0, 1), 0, 1); Attempt.Combo++; Attempt.ComboMultiplierProgress++; Attempt.LastHitColour = SkinManager.Instance.Skin.NoteColors[noteIndex % SkinManager.Instance.Skin.NoteColors.Length]; @@ -649,9 +661,9 @@ private void onHitResultChanged(int noteIndex, HitResult hitResult) if (Attempt.ComboMultiplierProgress == Attempt.ComboMultiplierIncrement) { - if (Attempt.ComboMultiplier < 8) + if (Attempt.ComboMultiplier < 6) { - Attempt.ComboMultiplierProgress = Attempt.ComboMultiplier == 7 ? Attempt.ComboMultiplierIncrement : 0; + Attempt.ComboMultiplierProgress = Attempt.ComboMultiplier == 5 ? Attempt.ComboMultiplierIncrement : 0; Attempt.ComboMultiplier++; } } @@ -661,9 +673,10 @@ private void onHitResultChanged(int noteIndex, HitResult hitResult) Attempt.Misses++; Attempt.Sum++; Attempt.Accuracy = Mathf.Floor((float)Attempt.Hits / Attempt.Sum * 10000) / 100; + Attempt.Grade = Math.Clamp(Attempt.Accuracy / 100 * Math.Clamp(Attempt.Score / 1000000, 0, 1), 0, 1); Attempt.Combo = 0; Attempt.ComboMultiplierProgress = 0; - Attempt.ComboMultiplier = Math.Max(1, Attempt.ComboMultiplier - 1); + Attempt.ComboMultiplier = Math.Max(1, Attempt.ComboMultiplier - (uint)Math.Truncate((double)Attempt.ComboMultiplier / 2)); if (!Attempt.IsReplay) { @@ -778,6 +791,28 @@ private void syncSongPosition() } } + private void judgementCheck(float factor) + { + switch (factor) // judgements + { + case 1f: + Attempt.Perfects++; // pawfect + break; + + case 0.8f: + Attempt.Greats++; // gewd + break; + + case 0.7f: + Attempt.Okays++; // okay + break; + + case 0.6f: + Attempt.Bads++; // bad + break; + } + } + private void syncVideoPosition() { if (!Attempt.Map.DisableVideo && Attempt.Map.VideoBuffer != null && VideoPlayer != null && VideoPlayer.IsOpen()) diff --git a/scripts/game/modifiers/FlickerModifier.cs b/scripts/game/modifiers/FlickerModifier.cs new file mode 100644 index 00000000..d426b7c6 --- /dev/null +++ b/scripts/game/modifiers/FlickerModifier.cs @@ -0,0 +1,32 @@ +using Godot; + +public class FlickerModifier : Modifier, IObjectRenderModifier +{ + public override string Name => "Flicker"; + + public override Color Color => new(0xc5ff54ff); + + public override bool Rankable => true; + + public override double ScoreMultiplier => 1.035; + + public void ModifyRenderObject(Note note, Attempt attempt) + { + double at = attempt.Settings.ApproachTime; + + if (attempt.Progress / 600 / attempt.Speed % at >= at / 2) + { + if (note.Index % 2 == 0) + { + note.Opacity = 0; + } + } + else + { + if (note.Index % 2 != 0) + { + note.Opacity = 0; + } + } + } +} diff --git a/scripts/game/modifiers/FlickerModifier.cs.uid b/scripts/game/modifiers/FlickerModifier.cs.uid new file mode 100644 index 00000000..f2d043e8 --- /dev/null +++ b/scripts/game/modifiers/FlickerModifier.cs.uid @@ -0,0 +1 @@ +uid://ciktlcnrkha2t diff --git a/scripts/game/ui/Grid.cs b/scripts/game/ui/Grid.cs index 620eb038..a1f6194f 100644 --- a/scripts/game/ui/Grid.cs +++ b/scripts/game/ui/Grid.cs @@ -12,6 +12,8 @@ public partial class Grid : MeshInstance3D, IUIComponent public MeshInstance3D GridGuides { get; set; } public MeshInstance3D VisibilityAssist { get; set; } + private string popupLabelFormat; + private static readonly PackedScene hit_feedback = GD.Load("res://prefabs/hit_popup.tscn"); private static readonly PackedScene miss_feedback = GD.Load("res://prefabs/miss_icon.tscn"); private int hitPopups, @@ -74,13 +76,36 @@ private void onHitResultChanged(int noteIndex, HitResult result) float lateness = Runner.Attempt.IsReplay ? Runner.Attempt.HitsInfo[noteIndex] : (float)(((int)Runner.Attempt.Progress - Runner.Attempt.Map.Notes[noteIndex].Millisecond) / Runner.Speed); - float factor = 1 - Math.Max(0, lateness - 25) / 150f; - uint hitScore = (uint)(100 * Runner.Attempt.ComboMultiplier * Runner.Attempt.ModsMultiplier * factor * ((Runner.Speed - 1) / 2.5 + 1)); + float factor = 1 - (float)Math.Round(Math.Max(0, lateness - 30) / 104f, 1); + double hitScore = Math.Truncate(Runner.Attempt.UnitHitScore * Runner.Attempt.ComboMultiplier * factor); + + factor = factor != 1 ? (float)Math.Round(factor - 0.1f, 1) : factor; + + string[] listOfJudgements = { "perfect", "great", "okay", "bad" }; + string judgement = ""; switch (result) { case HitResult.Hit: - spawnHitIcon(noteIndex, hitScore); + switch (factor) // judgements + { + case 1f: + judgement = listOfJudgements[0]; // pawfect + break; + + case 0.8f: + judgement = listOfJudgements[1]; // gewd + break; + + case 0.7f: + judgement = listOfJudgements[2]; // okay + break; + + case 0.6f: + judgement = listOfJudgements[3]; // bad + break; + } + spawnHitIcon(noteIndex, hitScore, judgement); break; case HitResult.Miss: spawnMissIcon(noteIndex); @@ -88,7 +113,7 @@ private void onHitResultChanged(int noteIndex, HitResult result) } } - private void spawnHitIcon(int objIndex, uint hitScore) + private void spawnHitIcon(int objIndex, double hitScore, string judgement) { if (!Runner.Attempt.Settings.HitPopups || hitPopups >= 64) return; @@ -97,8 +122,11 @@ private void spawnHitIcon(int objIndex, uint hitScore) Label3D popup = hit_feedback.Instantiate(); AddChild(popup); + popupLabelFormat = popup.Text; + + popup.Text = string.Format(CultureInfo.CurrentCulture, popupLabelFormat, hitScore.ToString(CultureInfo.CurrentCulture), judgement); popup.GlobalPosition = new Vector3(Runner.Attempt.Map.Notes[objIndex].X, -1.4f, 0); - popup.Text = hitScore.ToString(CultureInfo.CurrentCulture); + // popup.Text = hitScore.ToString(CultureInfo.CurrentCulture); Tween tween = popup.CreateTween(); tween.TweenProperty(popup, "transparency", 1, 0.25f); tween diff --git a/scripts/game/ui/PanelLeft.cs b/scripts/game/ui/PanelLeft.cs index e7c229a9..501b2dbc 100644 --- a/scripts/game/ui/PanelLeft.cs +++ b/scripts/game/ui/PanelLeft.cs @@ -10,11 +10,17 @@ public partial class PanelLeft : UIComponent private Color targetMultiplierColour = new(1, 1, 1, 1); private float targetMultiplierProgress = 0; private Tween multiplierTween; + private ColorRect gradeProgress; + private ColorRect gradeBG; private Label score, multiplier; private Label altCombo; + private RichTextLabel grade; + + private string Grade = "??"; + public override void _ExitTree() { if (Runner.Attempt == null) @@ -29,6 +35,9 @@ public override void Init() score = viewport.GetNode