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
16 changes: 16 additions & 0 deletions Globals/SaveSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ public static class SaveSystem
private const int DefaultInputControllerSecondary = 10; //right bumper
private const int DefaultInputControllerInventory = 4; //back button
private const string DefaultLanguage = "en";
private const bool DefaultTypeIsArrow = false;
private const bool DefaultVerticalScroll = false;
private const bool DefaultHighCon = false;
private const bool DefaultFirstTime = true;
private const bool DefaultHasWon = false;
Expand All @@ -49,9 +51,11 @@ public enum ConfigSettings
InputControllerSecondary,
InputControllerInventory,
LanguageKey,
TypeIsArrow,
HighContrast,
FirstTime,
HasWon,
VerticalScroll,
}

/**
Expand All @@ -75,9 +79,11 @@ private static void InitConfig()
UpdateConfig(ConfigSettings.InputControllerSecondary, DefaultInputControllerSecondary);
UpdateConfig(ConfigSettings.InputControllerInventory, DefaultInputControllerInventory);
UpdateConfig(ConfigSettings.LanguageKey, DefaultLanguage);
UpdateConfig(ConfigSettings.TypeIsArrow, DefaultTypeIsArrow);
UpdateConfig(ConfigSettings.HighContrast, DefaultHighCon);
UpdateConfig(ConfigSettings.FirstTime, DefaultFirstTime);
UpdateConfig(ConfigSettings.HasWon, DefaultHasWon);
UpdateConfig(ConfigSettings.VerticalScroll, DefaultVerticalScroll);
}

private static void SaveConfig()
Expand Down Expand Up @@ -136,6 +142,12 @@ public static void UpdateConfig(ConfigSettings setting, Variant value)
case ConfigSettings.LanguageKey:
_curConfigData.SetValue("Options", "LanguageKey", value);
break;
case ConfigSettings.TypeIsArrow:
_curConfigData.SetValue("Options", "TypeIsArrow", value);
break;
case ConfigSettings.VerticalScroll:
_curConfigData.SetValue("Options", "VerticalScroll", value);
break;
case ConfigSettings.HighContrast:
_curConfigData.SetValue("Options", "HighContrast", value);
break;
Expand Down Expand Up @@ -280,6 +292,10 @@ public static Variant GetConfigValue(ConfigSettings setting)
);
case ConfigSettings.LanguageKey:
return _curConfigData.GetValue("Options", "LanguageKey", DefaultLanguage);
case ConfigSettings.TypeIsArrow:
return _curConfigData.GetValue("Options", "TypeIsArrow", DefaultTypeIsArrow);
case ConfigSettings.VerticalScroll:
return _curConfigData.GetValue("Options", "VerticalScroll", DefaultVerticalScroll);
case ConfigSettings.HighContrast:
return _curConfigData.GetValue("Options", "HighContrast", DefaultHighCon);
case ConfigSettings.FirstTime:
Expand Down
6 changes: 6 additions & 0 deletions Globals/StageProducer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ public void InitFromCfg()
.GetConfigValue(SaveSystem.ConfigSettings.HighContrast)
.AsBool();
GetTree().Root.CallDeferred("add_child", ContrastFilter);
InputHandler.UseArrows = SaveSystem
.GetConfigValue(SaveSystem.ConfigSettings.TypeIsArrow)
.AsBool();
BattleDirector.VerticalScroll = SaveSystem
.GetConfigValue(SaveSystem.ConfigSettings.VerticalScroll)
.AsBool();
}

private void GenerateMapConsistent()
Expand Down
2 changes: 2 additions & 0 deletions Globals/Translations/Translations.csv
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ INVENTORY_TAB_NOTES,Notes,乐谱
INVENTORY_TAB_RELICS,Relics,遗物
OPTIONS_VOLUME_LABEL,Master Volume,最终音量设置
OPTIONS_CONTRAST_LABEL,High Contrast,高对比度模式
OPTIONS_NOTE_SWAP,Use arrows?,使用箭头?
OPTIONS_VERT_SCROLL,Vertical Scroll?,垂直滚动?
HOW_TO_PLAY,How to Play,如何游玩
HOW_TO_PLAY_BLOCK1,Hit notes to\nbuild combo,点击音符\n以建立连击
HOW_TO_PLAY_BLOCK2,Place notes when\ncombo is full,当连击满\n时放置音符
Expand Down
57 changes: 57 additions & 0 deletions Scenes/3DWizard/3DWizard.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
[gd_scene load_steps=8 format=3 uid="uid://dyd2nc2sgt0qw"]

[ext_resource type="Script" uid="uid://b07ivt3coc3lm" path="res://Scenes/3DWizard/DimensionalWizard.cs" id="1_7ax4h"]
[ext_resource type="PackedScene" uid="uid://dfevfib11kou1" path="res://Scenes/ChartViewport/ChartViewport.tscn" id="1_7h5n6"]
[ext_resource type="Shader" uid="uid://dp36iuuy414k1" path="res://SharedAssets/StarryNight.gdshader" id="2_xxbq6"]

[sub_resource type="ShaderMaterial" id="ShaderMaterial_xxbq6"]
shader = ExtResource("2_xxbq6")
shader_parameter/bg_top_color = Vector4(0.18, 0.08, 0.12, 0)
shader_parameter/bg_bottom_color = Vector4(0.028, 0.008, 0.184, 0)
shader_parameter/gradient_ratio = 1.0
shader_parameter/time_scale = 1.0

[sub_resource type="ViewportTexture" id="ViewportTexture_xxbq6"]
viewport_path = NodePath("SubViewport")

[sub_resource type="ViewportTexture" id="ViewportTexture_7ax4h"]
viewport_path = NodePath("BG")

[sub_resource type="Environment" id="Environment_7h5n6"]
ambient_light_source = 1
reflected_light_source = 1

[node name="3DWizard" type="Node3D" node_paths=PackedStringArray("CM")]
script = ExtResource("1_7ax4h")
CM = NodePath("SubViewport/VPContainer")

[node name="BG" type="SubViewport" parent="."]
size = Vector2i(1200, 500)

[node name="StarShader" type="ColorRect" parent="BG"]
z_index = -1
material = SubResource("ShaderMaterial_xxbq6")
offset_right = 1200.0
offset_bottom = 500.0
color = Color(0, 0, 0, 1)

[node name="SubViewport" type="SubViewport" parent="."]
transparent_bg = true
size = Vector2i(680, 940)

[node name="VPContainer" parent="SubViewport" instance=ExtResource("1_7h5n6")]
offset_top = 380.0
offset_bottom = 560.0

[node name="Sprite3D" type="Sprite3D" parent="."]
transform = Transform3D(-4.37114e-08, -1, 0, 0.617036, -2.69715e-08, 0.786935, -0.786935, 3.4398e-08, 0.617036, 0, 0, 0.138215)
texture = SubResource("ViewportTexture_xxbq6")

[node name="BGSprite" type="Sprite3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1.581, -1.032)
texture = SubResource("ViewportTexture_7ax4h")

[node name="Camera3D" type="Camera3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 0.999729, -0.023298, 0, 0.023298, 0.999729, 0, -1.55715, 3.51069)
environment = SubResource("Environment_7h5n6")
fov = 53.5
8 changes: 8 additions & 0 deletions Scenes/3DWizard/DimensionalWizard.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
using System;
using Godot;

public partial class DimensionalWizard : Node3D
{
[Export]
public ChartManager CM;
}
1 change: 1 addition & 0 deletions Scenes/3DWizard/DimensionalWizard.cs.uid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uid://b07ivt3coc3lm
30 changes: 23 additions & 7 deletions Scenes/BattleDirector/BattleScene.tscn
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
[gd_scene load_steps=12 format=3 uid="uid://b0mrgr7h0ty1y"]
[gd_scene load_steps=13 format=3 uid="uid://b0mrgr7h0ty1y"]

[ext_resource type="Script" uid="uid://bttu0wmy2fp64" path="res://Scenes/BattleDirector/Scripts/BattleDirector.cs" id="1_jmdo1"]
[ext_resource type="Script" uid="uid://pl57giqyhckb" path="res://Scenes/UI/Scripts/MenuModule.cs" id="2_ka0ws"]
[ext_resource type="Script" uid="uid://tg14hkh1n7iv" path="res://Scenes/BattleDirector/Scripts/Conductor.cs" id="3_elcaj"]
[ext_resource type="PackedScene" uid="uid://duhiilcv4tat3" path="res://Scenes/BattleDirector/NotePlacementBar.tscn" id="4_qk7om"]
[ext_resource type="PackedScene" uid="uid://dfevfib11kou1" path="res://Scenes/ChartViewport/ChartViewport.tscn" id="5_r2xh0"]
[ext_resource type="PackedScene" uid="uid://dyd2nc2sgt0qw" path="res://Scenes/3DWizard/3DWizard.tscn" id="5_e25q1"]
[ext_resource type="Texture2D" uid="uid://qhwve7fik4do" path="res://SharedAssets/BackGround_Full.png" id="6_0jtpx"]
[ext_resource type="PackedScene" uid="uid://dfevfib11kou1" path="res://Scenes/ChartViewport/ChartViewport.tscn" id="6_e25q1"]
[ext_resource type="Script" uid="uid://cp6t6haqyef7o" path="res://Scenes/AreaBasedBackground.cs" id="7_6k2qj"]
[ext_resource type="Texture2D" uid="uid://dbjotl0v1ymia" path="res://SharedAssets/BattleFrame1.png" id="7_klvil"]
[ext_resource type="Theme" uid="uid://d37e3tpsbxwak" path="res://Scenes/UI/Assets/GeneralTheme.tres" id="8_62qim"]
Expand All @@ -19,13 +20,14 @@ gradient = SubResource("Gradient_8uy3a")
fill_from = Vector2(1, 0)
fill_to = Vector2(0.738532, 1)

[node name="ProtoBattleDirector" type="Node2D" node_paths=PackedStringArray("PuppetMarkers", "_countdownLabel", "CD", "CM", "NPB", "Audio", "FocusedButton")]
[node name="ProtoBattleDirector" type="Node2D" node_paths=PackedStringArray("PuppetMarkers", "_countdownLabel", "CD", "CM", "DW", "NPB", "Audio", "FocusedButton")]
process_mode = 1
script = ExtResource("1_jmdo1")
PuppetMarkers = [NodePath("PlayerMarker"), NodePath("Enemy1Marker"), NodePath("Enemy2Marker"), NodePath("Enemy3Marker")]
_countdownLabel = NodePath("CountInControl/Countdown")
CD = NodePath("Conductor")
CM = NodePath("SubViewport")
CM = NodePath("VPContainer")
DW = NodePath("3D/SubViewport/3DWizard")
NPB = NodePath("NotePlacementBar")
Audio = NodePath("AudioStreamPlayer")
FocusedButton = NodePath("StartButton")
Expand All @@ -37,9 +39,8 @@ metadata/_edit_lock_ = true
script = ExtResource("2_ka0ws")
CurSceneNode = NodePath("..")

[node name="Conductor" type="Node" parent="." node_paths=PackedStringArray("CM")]
[node name="Conductor" type="Node" parent="."]
script = ExtResource("3_elcaj")
CM = NodePath("../SubViewport")

[node name="PlayerMarker" type="Marker2D" parent="."]
position = Vector2(158, 125)
Expand All @@ -64,7 +65,22 @@ offset_right = 81.0
offset_bottom = 175.0
texture = SubResource("GradientTexture2D_bajwn")

[node name="SubViewport" parent="." instance=ExtResource("5_r2xh0")]
[node name="3D" type="SubViewportContainer" parent="."]
offset_left = 80.0
offset_top = 180.0
offset_right = 560.0
offset_bottom = 360.0

[node name="SubViewport" type="SubViewport" parent="3D"]
handle_input_locally = false
size = Vector2i(480, 180)
render_target_update_mode = 4

[node name="3DWizard" parent="3D/SubViewport" instance=ExtResource("5_e25q1")]
process_mode = 4
visible = false

[node name="VPContainer" parent="." instance=ExtResource("6_e25q1")]
offset_left = 80.0
offset_top = 180.0
offset_right = 560.0
Expand Down
14 changes: 13 additions & 1 deletion Scenes/BattleDirector/Scripts/BattleDirector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ public partial class BattleDirector : Node2D
[Export]
private ChartManager CM;

[Export]
private DimensionalWizard DW;

[Export]
public NotePlacementBar NPB;

Expand All @@ -40,6 +43,7 @@ public partial class BattleDirector : Node2D

public static bool AutoPlay = false;
public static bool PlayerDisabled = false;
public static bool VerticalScroll = false;

#endregion

Expand Down Expand Up @@ -110,7 +114,15 @@ public override void _Ready()
InitPlayer();
InitEnemies();
InitScoringGuide();
CD.Initialize(curChart, songLen, _enemies);
if (VerticalScroll)
{
CM.ProcessMode = ProcessModeEnum.Disabled;
CM.Visible = false;
CM = DW.CM;
DW.Visible = true;
DW.ProcessMode = ProcessModeEnum.Inherit;
}
CD.Initialize(CM, curChart, songLen, _enemies);

CD.NoteInputEvent += OnTimedInput;

Expand Down
9 changes: 7 additions & 2 deletions Scenes/BattleDirector/Scripts/Conductor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*/
public partial class Conductor : Node
{
[Export]
private ChartManager CM;
private MidiMaestro MM;

Expand All @@ -19,11 +18,17 @@ public partial class Conductor : Node
private bool _initialized;

#region Initialization
public void Initialize(NoteChart curSong, double songLen, EnemyPuppet[] enemies = null)
public void Initialize(
ChartManager cm,
NoteChart curSong,
double songLen,
EnemyPuppet[] enemies = null
)
{
if (_initialized)
return;

CM = cm;
MM = new MidiMaestro(curSong);
CM.ArrowFromInput += ReceiveNoteInput;

Expand Down
2 changes: 1 addition & 1 deletion Scenes/BattleDirector/Tutorial/Toriel.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ position = Vector2(35, 202)
position = Vector2(59, 266)

[node name="NoteMarker" type="Marker2D" parent="."]
position = Vector2(364, 294)
position = Vector2(392, 246)

[node name="LoopMarker" type="Marker2D" parent="."]
position = Vector2(129, 270)
Expand Down
10 changes: 9 additions & 1 deletion Scenes/ChartViewport/ChartViewport.tscn
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[gd_scene load_steps=7 format=3 uid="uid://dfevfib11kou1"]
[gd_scene load_steps=8 format=3 uid="uid://dfevfib11kou1"]

[ext_resource type="Script" uid="uid://btgmfxqoe2wqx" path="res://Scenes/ChartViewport/Scripts/ChartManager.cs" id="1_ruh2l"]
[ext_resource type="Texture2D" uid="uid://3kimu20ebgtu" path="res://Scenes/ChartViewport/LaneLines.png" id="2_543sd"]
[ext_resource type="Texture2D" uid="uid://cp78odda2doab" path="res://Scenes/ChartViewport/LoopMarker.png" id="2_q5cjc"]
[ext_resource type="Script" uid="uid://cf58ep1c2o0q2" path="res://Scenes/ChartViewport/Scripts/Loopable.cs" id="3_5u57h"]
[ext_resource type="PackedScene" uid="uid://bn8txx53xlguw" path="res://Scenes/NoteManager/NoteManager.tscn" id="4_fd5fw"]
Expand Down Expand Up @@ -29,6 +30,13 @@ render_target_update_mode = 4
position = Vector2(-50, 0)
anchor_mode = 0

[node name="LaneLines" type="TextureRect" parent="SubViewport"]
offset_left = -50.0
offset_top = 45.0
offset_right = 480.0
offset_bottom = 135.0
texture = ExtResource("2_543sd")

[node name="StarShader" type="ColorRect" parent="SubViewport"]
z_index = -1
material = SubResource("ShaderMaterial_5uw0y")
Expand Down
Binary file added Scenes/ChartViewport/LaneLines.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions Scenes/ChartViewport/LaneLines.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://3kimu20ebgtu"
path="res://.godot/imported/LaneLines.png-fa4c66b9892f799286e4b25955ab6fae.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://Scenes/ChartViewport/LaneLines.png"
dest_files=["res://.godot/imported/LaneLines.png-fa4c66b9892f799286e4b25955ab6fae.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
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=1
5 changes: 5 additions & 0 deletions Scenes/ChartViewport/Scripts/ChartManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,11 @@ public void ComboText(Timing timed, ArrowType arrow, int currentCombo)
TextParticle newText = new TextParticle();
AddChild(newText);
newText.Position = IH.Arrows[(int)arrow].Node.Position - newText.Size / 2;
if (BattleDirector.VerticalScroll)
{
newText.RotationDegrees += 90f;
newText.Position += Vector2.Right * 70;
}
IH.FeedbackEffect(arrow, timed);
newText.Text = Tr("BATTLE_ROOM_" + timed.ToString().ToUpper()) + $" {currentCombo}";
}
Expand Down
4 changes: 4 additions & 0 deletions Scenes/Maps/Scripts/Cartographer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ public override void _Process(double delta)
public override void _EnterTree()
{
BgAudioPlayer.LiveInstance.PlayLevelMusic();
if (!SaveSystem.GetConfigValue(SaveSystem.ConfigSettings.FirstTime).AsBool())
return;
BattleDirector.VerticalScroll = false;
SaveSystem.UpdateConfig(SaveSystem.ConfigSettings.VerticalScroll, false);
}

private Vector2 GetPosition(int x, int y)
Expand Down
Binary file added Scenes/NoteManager/Assets/Arrow_Outline.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading