Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion scenes/game.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
[ext_resource type="Script" uid="uid://b7jvxorkr4xfi" path="res://scripts/game/ui/Speed.cs" id="28_gxtfn"]
[ext_resource type="Texture2D" uid="uid://b0k0ltu15bart" path="res://user/skins/default/modifiers/nofail.png" id="34_8ool0"]
[ext_resource type="Script" uid="uid://cvaggwr3rrenl" path="res://scripts/game/renderers/NoteRenderer.cs" id="34_pr1ej"]
[ext_resource type="Texture2D" uid="uid://bc0w1ujoshiyk" path="res://user/skins/default/game/visibility_assist.png" id="36_05nbr"]
[ext_resource type="Script" uid="uid://c8d872aoiqglo" path="res://scripts/PlayerInputController.cs" id="37_02fa5"]
[ext_resource type="Script" uid="uid://dlxxg2h4cl5hj" path="res://scripts/game/ui/PauseMenu.cs" id="38_8ool0"]
[ext_resource type="Script" uid="uid://c24b7vefbxvbh" path="res://scripts/game/ui/PlaytestOverlay.cs" id="40_m4url"]
Expand Down Expand Up @@ -95,6 +96,14 @@ texture_repeat = false
material = SubResource("StandardMaterial3D_05nbr")
size = Vector2(4, 4)

[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_rc4du"]
transparency = 1
shading_mode = 0
albedo_texture = ExtResource("36_05nbr")

[sub_resource type="QuadMesh" id="QuadMesh_oaba0"]
material = SubResource("StandardMaterial3D_rc4du")

[sub_resource type="ViewportTexture" id="ViewportTexture_pl11u"]
viewport_path = NodePath("Runner/HUD/Health/HealthViewport")

Expand Down Expand Up @@ -329,6 +338,12 @@ visible = false
mesh = SubResource("QuadMesh_0sl42")
skeleton = NodePath("../../../..")

[node name="VisibilityAssist" type="MeshInstance3D" parent="Runner/HUD/Grid" unique_id=613600632]
transform = Transform3D(300, 0, 0, 0, 300, 0, 0, 0, 300, 0, 0, -140)
transparency = 0.25
mesh = SubResource("QuadMesh_oaba0")
skeleton = NodePath("../..")

[node name="Health" type="MeshInstance3D" parent="Runner/HUD" unique_id=449857227]
transform = Transform3D(1, 0, 0, 0, 0.965926, 0.258819, 0, -0.258819, 0.965926, 0, -6.3, -10)
cast_shadow = 0
Expand Down Expand Up @@ -826,10 +841,11 @@ size = Vector2i(256, 256)
render_target_update_mode = 4

[node name="Camera3D" type="Camera3D" parent="ReplayViewer/OrthogonalPanel/OrthogonalCamera/SubViewport" unique_id=1970241273]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.44182658)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.60892284)
top_level = true
projection = 1
size = 4.5
far = 139.0

[node name="Tip" type="Label" parent="ReplayViewer" unique_id=919285545]
layout_mode = 1
Expand Down
14 changes: 14 additions & 0 deletions scripts/database/settings/SettingsProfile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,12 @@ public partial class SettingsProfile
[Order]
public SettingsItem<bool> AltComboCounter { get; private set; }

/// <summary>
/// Enables a dark radial fade to help visibility
/// </summary>
[Order]
public SettingsItem<bool> VisibilityAssist { get; private set; }

/// <summary>
/// Toggles a popup on a hit
/// </summary>
Expand Down Expand Up @@ -871,6 +877,14 @@ public SettingsProfile()
Section = SettingsSection.Visual,
};

VisibilityAssist = new(false)
{
Id = "VisibilityAssist",
Title = "Visibility Assist",
Description = "Enables a dark radial fade to help with visibility",
Section = SettingsSection.Visual,
};

HitPopups = new(true)
{
Id = "HitPopups",
Expand Down
6 changes: 6 additions & 0 deletions scripts/game/ui/Grid.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ public partial class Grid : MeshInstance3D, IUIComponent
public MeshInstance3D Cursor { get; set; }
public MultiMeshInstance3D CursorTrail { get; set; }
public MeshInstance3D GridGuides { get; set; }
public MeshInstance3D VisibilityAssist { get; set; }

private static readonly PackedScene hit_feedback = GD.Load<PackedScene>("res://prefabs/hit_popup.tscn");
private static readonly PackedScene miss_feedback = GD.Load<PackedScene>("res://prefabs/miss_icon.tscn");
Expand All @@ -21,6 +22,11 @@ public override void _ExitTree()

public void Init()
{
VisibilityAssist ??= GetNode<MeshInstance3D>("VisibilityAssist");

VisibilityAssist.Visible = Runner.Attempt.Settings.VisibilityAssist;
(VisibilityAssist.GetActiveMaterial(0) as StandardMaterial3D).AlbedoTexture = SkinManager.Instance.Skin.VisibilityAssistImage;

GridGuides ??= GetNode<MeshInstance3D>("GridGuides");

GridGuides.Visible = Runner.Attempt.Settings.GridGuides;
Expand Down
18 changes: 17 additions & 1 deletion scripts/scenes/Game.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public partial class Game : BaseScene
public static Game Instance;
public static Attempt Attempt;
public static bool StartQueued = false;
private static double fadeoutToggleValue = -1;

public override void _Ready()
{
Expand Down Expand Up @@ -117,8 +118,23 @@ public override void _Ready()
// {

// };
PlayerInputController.OnToggleFade += () =>
{
double val;

if (Attempt.Settings.FadeOut.Value > 0)
{
fadeoutToggleValue = Attempt.Settings.FadeOut.Value;
val = 0;
}
else
{
val = fadeoutToggleValue == -1 ? 100 : fadeoutToggleValue;
}

Attempt.Settings.FadeOut.Value = val;
};

PlayerInputController.OnToggleFade += () => Attempt.Settings.FadeOut.Value = Attempt.Settings.FadeOut > 0 ? 0 : 100;
PlayerInputController.OnTogglePushback += () => Attempt.Settings.Pushback.Value = !Attempt.Settings.Pushback;
PlayerInputController.OnRestartPressed += Restart;
}
Expand Down
1 change: 1 addition & 0 deletions scripts/skinning/SkinManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public static void Load()
skin.CursorImage = loadTexture("game/cursor.png");
skin.GridImage = loadTexture("game/grid.png");
skin.GridGuidesImage = loadTexture("game/grid_guides.png");
skin.VisibilityAssistImage = loadTexture("game/visibility_assist.png");
skin.PanelLeftBackgroundImage = loadTexture("game/panel_left_background.png");
skin.PanelRightBackgroundImage = loadTexture("game/panel_right_background.png");
skin.HealthImage = loadTexture("game/health.png");
Expand Down
2 changes: 2 additions & 0 deletions scripts/skinning/SkinProfile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ public partial class SkinProfile : RefCounted

public ImageTexture GridGuidesImage { get; set; } = new();

public ImageTexture VisibilityAssistImage { get; set; } = new();

public ImageTexture PanelLeftBackgroundImage { get; set; } = new();

public ImageTexture PanelRightBackgroundImage { get; set; } = new();
Expand Down
1 change: 1 addition & 0 deletions user/colorsets/Café au lait.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d9b49b,ffe4cb
1 change: 1 addition & 0 deletions user/colorsets/Cotton Candy.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
00ffed,ff8ff9
1 change: 1 addition & 0 deletions user/colorsets/Hamster Skittles.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5ea0d8,98263f,cd4b39,486397,8cad66,d79f17,a43738,fcd9aa,cbbda1
1 change: 1 addition & 0 deletions user/colorsets/Light Blue and White.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0f81b7,e7eaec
1 change: 1 addition & 0 deletions user/colorsets/Mocha.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f5e0dc,f2cdcd,f5c2e7,cba6f7,f38ba8,eba0ac,f39e93,fab387,f9ce9b,f9e2af,ebf3a9,c7f49c,a6e3a1,94e2d5,95eeda,8fe0f4,89b4fa,b4befe
1 change: 1 addition & 0 deletions user/colorsets/Nebula.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ff64b1,e864c4,d264d7,ba64ec,a564ff,ba64ec,d264d7,e864c4
1 change: 1 addition & 0 deletions user/colorsets/Petunia Fade.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
b0f396,98e7be,81dbe5,78c5f9,7da7fc,8289ff,918dff,a090ff,b992fb,dc93f3,ff93eb
1 change: 1 addition & 0 deletions user/colorsets/Purple Pastel.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f6f1f9,ede2f4,e3d2ef,ceb1e7,c3a1e3,ad80db,9f75d1,8e6bc7,8062bc
1 change: 1 addition & 0 deletions user/colorsets/Sunset.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ff6d33,ff623d,ff5747,ff4b50,ff3f59,ff3363,ff3f59,ff4b50,ff5747,ff623d
1 change: 1 addition & 0 deletions user/colorsets/Tan.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d7af7a,ebd3b0
1 change: 1 addition & 0 deletions user/colorsets/Tundra.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ffffff,c8d9ff,8fb2ff,5286ff,2655ff,5286ff,8fb2ff,c8d9ff,ffffff
Binary file added user/skins/default/game/visibility_assist.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions user/skins/default/game/visibility_assist.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://bc0w1ujoshiyk"
path.s3tc="res://.godot/imported/visibility_assist.png-bb19a3cf2b1a7174c46d41f4aaf2feb2.s3tc.ctex"
path.etc2="res://.godot/imported/visibility_assist.png-bb19a3cf2b1a7174c46d41f4aaf2feb2.etc2.ctex"
metadata={
"imported_formats": ["s3tc_bptc", "etc2_astc"],
"vram_texture": true
}

[deps]

source_file="res://user/skins/default/game/visibility_assist.png"
dest_files=["res://.godot/imported/visibility_assist.png-bb19a3cf2b1a7174c46d41f4aaf2feb2.s3tc.ctex", "res://.godot/imported/visibility_assist.png-bb19a3cf2b1a7174c46d41f4aaf2feb2.etc2.ctex"]

[params]

compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=0
Loading