diff --git a/.github/workflows/visual_tests.yaml b/.github/workflows/visual_tests.yaml index 0ddbbd80..a1709697 100644 --- a/.github/workflows/visual_tests.yaml +++ b/.github/workflows/visual_tests.yaml @@ -51,7 +51,7 @@ jobs: - name: 💾 Install Graphics Driver Emulators uses: awalsh128/cache-apt-pkgs-action@latest with: - packages: mesa-vulkan-drivers binutils + packages: mesa-vulkan-drivers binutils x11-xserver-utils version: 1.0 - name: 🤖 Setup Godot diff --git a/GameDemo.csproj b/GameDemo.csproj index e9ed50c4..72ddf0b4 100644 --- a/GameDemo.csproj +++ b/GameDemo.csproj @@ -31,7 +31,8 @@ false - + true $(DefineConstants);RUN_TESTS @@ -49,7 +50,7 @@ - + @@ -62,12 +63,15 @@ - + - + + diff --git a/project.godot b/project.godot index 18de82b7..85bb550d 100644 --- a/project.godot +++ b/project.godot @@ -21,16 +21,23 @@ settings/stdout/print_fps=true [display] -window/size/viewport_width=1920 -window/size/viewport_height=1080 -window/stretch/mode="canvas_items" -window/stretch/aspect="keep_height" +window/size/viewport_width=3840 +window/size/viewport_height=2160 +window/size/initial_position_type=4 +window/size/window_width_override=1920 +window/size/window_height_override=1080 window/vsync/vsync_mode=0 [dotnet] project/assembly_name="GameDemo" +[gui] + +theme/default_font_multichannel_signed_distance_field=true +theme/default_font_generate_mipmaps=true +theme/default_theme_scale=2.0 + [input] move_up={ diff --git a/src/Main.cs b/src/Main.cs index aa5f82e0..3c628b4b 100644 --- a/src/Main.cs +++ b/src/Main.cs @@ -1,6 +1,7 @@ namespace GameDemo; using Godot; +using Chickensoft.GameTools.Displays; #if RUN_TESTS using System.Reflection; @@ -14,12 +15,16 @@ namespace GameDemo; public partial class Main : Node2D { + public Vector2I DesignResolution => Display.UHD4k; #if RUN_TESTS public TestEnvironment Environment = default!; #endif public override void _Ready() { + // Correct any erroneous scaling and guess sensible defaults. + GetWindow().LookGood(WindowScaleBehavior.UIProportional, DesignResolution); + #if RUN_TESTS // If this is a debug build, use GoDotTest to examine the // command line arguments and determine if we should run tests. diff --git a/src/app/App.tscn b/src/app/App.tscn index 625c69d6..6af9a69c 100644 --- a/src/app/App.tscn +++ b/src/app/App.tscn @@ -71,14 +71,14 @@ stretch = true [node name="GamePreview" type="SubViewport" parent="SubViewportContainer"] unique_name_in_owner = true handle_input_locally = false -size = Vector2i(1920, 1080) +size = Vector2i(3840, 2160) render_target_update_mode = 4 [node name="AnimationPlayer" type="AnimationPlayer" parent="."] unique_name_in_owner = true deterministic = true libraries = { -"": SubResource("AnimationLibrary_piei0") +&"": SubResource("AnimationLibrary_piei0") } [node name="Menu" parent="." instance=ExtResource("4_kh3vh")] diff --git a/src/death_menu/DeathMenu.tscn b/src/death_menu/DeathMenu.tscn index 768b9717..03aeb2d6 100644 --- a/src/death_menu/DeathMenu.tscn +++ b/src/death_menu/DeathMenu.tscn @@ -5,24 +5,24 @@ [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_8nr2f"] bg_color = Color(0.890805, 0.000373708, 0.0286205, 0.266667) -corner_radius_top_left = 8 -corner_radius_top_right = 8 -corner_radius_bottom_right = 8 -corner_radius_bottom_left = 8 +corner_radius_top_left = 16 +corner_radius_top_right = 16 +corner_radius_bottom_right = 16 +corner_radius_bottom_left = 16 [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_bjrl7"] bg_color = Color(0.6, 0, 0.0117647, 0.266667) -corner_radius_top_left = 8 -corner_radius_top_right = 8 -corner_radius_bottom_right = 8 -corner_radius_bottom_left = 8 +corner_radius_top_left = 16 +corner_radius_top_right = 16 +corner_radius_bottom_right = 16 +corner_radius_bottom_left = 16 [sub_resource type="SystemFont" id="SystemFont_yn3ou"] subpixel_positioning = 0 [sub_resource type="Theme" id="Theme_48i0m"] default_font = SubResource("SystemFont_yn3ou") -default_font_size = 24 +default_font_size = 48 Button/styles/focus = SubResource("StyleBoxFlat_8nr2f") Button/styles/normal = SubResource("StyleBoxFlat_8nr2f") Button/styles/pressed = SubResource("StyleBoxFlat_bjrl7") @@ -53,11 +53,11 @@ variation_embolden = 0.54 [sub_resource type="LabelSettings" id="LabelSettings_7gk1r"] font = SubResource("FontVariation_ps6b3") -font_size = 48 +font_size = 96 font_color = Color(1, 0.239216, 0.239216, 1) [sub_resource type="LabelSettings" id="LabelSettings_jxos6"] -font_size = 36 +font_size = 72 font_color = Color(0.788235, 0.227451, 0.227451, 1) [sub_resource type="Animation" id="Animation_ifg22"] @@ -192,10 +192,10 @@ anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 -theme_override_constants/margin_left = 80 -theme_override_constants/margin_top = 80 -theme_override_constants/margin_right = 80 -theme_override_constants/margin_bottom = 80 +theme_override_constants/margin_left = 160 +theme_override_constants/margin_top = 160 +theme_override_constants/margin_right = 160 +theme_override_constants/margin_bottom = 160 [node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"] layout_mode = 2 @@ -203,7 +203,7 @@ alignment = 1 [node name="MarginContainer" type="MarginContainer" parent="MarginContainer/VBoxContainer"] layout_mode = 2 -theme_override_constants/margin_bottom = 24 +theme_override_constants/margin_bottom = 48 [node name="Title" type="Label" parent="MarginContainer/VBoxContainer/MarginContainer"] layout_mode = 2 @@ -219,15 +219,15 @@ horizontal_alignment = 1 [node name="MarginContainer2" type="MarginContainer" parent="MarginContainer/VBoxContainer"] layout_mode = 2 -theme_override_constants/margin_top = 48 +theme_override_constants/margin_top = 96 [node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/VBoxContainer/MarginContainer2"] layout_mode = 2 -theme_override_constants/separation = 24 +theme_override_constants/separation = 48 [node name="TryAgainButton" type="Button" parent="MarginContainer/VBoxContainer/MarginContainer2/VBoxContainer"] unique_name_in_owner = true -custom_minimum_size = Vector2(256, 64) +custom_minimum_size = Vector2(512, 128) layout_mode = 2 size_flags_horizontal = 4 size_flags_vertical = 0 @@ -236,7 +236,7 @@ text = "Try Again" [node name="MainMenuButton" type="Button" parent="MarginContainer/VBoxContainer/MarginContainer2/VBoxContainer"] unique_name_in_owner = true -custom_minimum_size = Vector2(256, 64) +custom_minimum_size = Vector2(512, 128) layout_mode = 2 size_flags_horizontal = 4 size_flags_vertical = 0 diff --git a/src/in_game_ui/InGameUI.tscn b/src/in_game_ui/InGameUI.tscn index 7763a9bd..0074e68c 100644 --- a/src/in_game_ui/InGameUI.tscn +++ b/src/in_game_ui/InGameUI.tscn @@ -35,26 +35,26 @@ alignment = 2 [node name="MarginContainer" type="MarginContainer" parent="HBoxContainer"] layout_mode = 2 -theme_override_constants/margin_top = 48 -theme_override_constants/margin_right = 96 +theme_override_constants/margin_top = 96 +theme_override_constants/margin_right = 192 [node name="HBoxContainer" type="HBoxContainer" parent="HBoxContainer/MarginContainer"] layout_mode = 2 [node name="CoinsLabel" type="Label" parent="HBoxContainer/MarginContainer/HBoxContainer"] unique_name_in_owner = true -custom_minimum_size = Vector2(200, 2.08165e-12) +custom_minimum_size = Vector2(400, 2.08165e-12) layout_mode = 2 -theme_override_font_sizes/font_size = 48 +theme_override_font_sizes/font_size = 96 text = "## / ##" horizontal_alignment = 2 [node name="MarginContainer" type="MarginContainer" parent="HBoxContainer/MarginContainer/HBoxContainer"] layout_mode = 2 -theme_override_constants/margin_left = 24 +theme_override_constants/margin_left = 48 [node name="SubViewportContainer" type="SubViewportContainer" parent="HBoxContainer/MarginContainer/HBoxContainer/MarginContainer"] -custom_minimum_size = Vector2(128, 128) +custom_minimum_size = Vector2(256, 256) layout_mode = 2 [node name="SubViewport" type="SubViewport" parent="HBoxContainer/MarginContainer/HBoxContainer/MarginContainer/SubViewportContainer"] @@ -62,7 +62,7 @@ own_world_3d = true world_3d = SubResource("World3D_5xwgl") transparent_bg = true handle_input_locally = false -size = Vector2i(128, 128) +size = Vector2i(256, 256) render_target_update_mode = 4 [node name="CoinScene" parent="HBoxContainer/MarginContainer/HBoxContainer/MarginContainer/SubViewportContainer/SubViewport" instance=ExtResource("1_eo2h2")] diff --git a/src/menu/Menu.tscn b/src/menu/Menu.tscn index dab9a0d4..82cf43e6 100644 --- a/src/menu/Menu.tscn +++ b/src/menu/Menu.tscn @@ -4,38 +4,38 @@ [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_aq8ij"] bg_color = Color(1, 1, 1, 0.219608) -corner_radius_top_left = 8 -corner_radius_top_right = 8 -corner_radius_bottom_right = 8 -corner_radius_bottom_left = 8 +corner_radius_top_left = 16 +corner_radius_top_right = 16 +corner_radius_bottom_right = 16 +corner_radius_bottom_left = 16 [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_nkv16"] bg_color = Color(1, 1, 1, 0.513726) -corner_radius_top_left = 8 -corner_radius_top_right = 8 -corner_radius_bottom_right = 8 -corner_radius_bottom_left = 8 +corner_radius_top_left = 16 +corner_radius_top_right = 16 +corner_radius_bottom_right = 16 +corner_radius_bottom_left = 16 [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_vps5y"] bg_color = Color(0.282353, 0.282353, 0.282353, 0.894118) -corner_radius_top_left = 8 -corner_radius_top_right = 8 -corner_radius_bottom_right = 8 -corner_radius_bottom_left = 8 +corner_radius_top_left = 16 +corner_radius_top_right = 16 +corner_radius_bottom_right = 16 +corner_radius_bottom_left = 16 [sub_resource type="SystemFont" id="SystemFont_yn3ou"] subpixel_positioning = 0 [sub_resource type="Theme" id="Theme_orto1"] default_font = SubResource("SystemFont_yn3ou") -default_font_size = 24 +default_font_size = 48 Button/styles/focus = SubResource("StyleBoxFlat_aq8ij") Button/styles/hover = SubResource("StyleBoxFlat_nkv16") Button/styles/normal = SubResource("StyleBoxFlat_aq8ij") Button/styles/pressed = SubResource("StyleBoxFlat_vps5y") [sub_resource type="LabelSettings" id="LabelSettings_5fc0a"] -font_size = 48 +font_size = 96 [node name="Control" type="Control"] layout_mode = 3 @@ -54,10 +54,10 @@ anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 -theme_override_constants/margin_left = 80 -theme_override_constants/margin_top = 80 -theme_override_constants/margin_right = 80 -theme_override_constants/margin_bottom = 80 +theme_override_constants/margin_left = 160 +theme_override_constants/margin_top = 160 +theme_override_constants/margin_right = 160 +theme_override_constants/margin_bottom = 160 [node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer"] layout_mode = 2 @@ -79,26 +79,26 @@ label_settings = SubResource("LabelSettings_5fc0a") [node name="MarginContainer" type="MarginContainer" parent="MarginContainer/HBoxContainer/VBoxContainer3/VBoxContainer"] layout_mode = 2 size_flags_vertical = 3 -theme_override_constants/margin_top = 24 +theme_override_constants/margin_top = 48 [node name="VBoxContainer2" type="VBoxContainer" parent="MarginContainer/HBoxContainer/VBoxContainer3"] layout_mode = 2 -theme_override_constants/separation = 20 +theme_override_constants/separation = 40 [node name="NewGameButton" type="Button" parent="MarginContainer/HBoxContainer/VBoxContainer3/VBoxContainer2"] unique_name_in_owner = true -custom_minimum_size = Vector2(2.08165e-12, 64) +custom_minimum_size = Vector2(2.08165e-12, 128) layout_mode = 2 size_flags_horizontal = 3 text = "New Game" [node name="LoadGameButton" type="Button" parent="MarginContainer/HBoxContainer/VBoxContainer3/VBoxContainer2"] unique_name_in_owner = true -custom_minimum_size = Vector2(2.08165e-12, 64) +custom_minimum_size = Vector2(2.08165e-12, 128) layout_mode = 2 size_flags_horizontal = 3 text = "Load Game" [node name="MarginContainer" type="MarginContainer" parent="MarginContainer/HBoxContainer/VBoxContainer3/VBoxContainer2"] layout_mode = 2 -theme_override_constants/margin_top = 160 +theme_override_constants/margin_top = 320 diff --git a/src/pause_menu/PauseMenu.tscn b/src/pause_menu/PauseMenu.tscn index 5aee03ef..fdae37f1 100644 --- a/src/pause_menu/PauseMenu.tscn +++ b/src/pause_menu/PauseMenu.tscn @@ -13,17 +13,17 @@ variation_embolden = 0.54 [sub_resource type="LabelSettings" id="LabelSettings_57jok"] font = SubResource("FontVariation_ps6b3") -font_size = 48 +font_size = 96 [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_bg3p1"] bg_color = Color(0, 0, 0, 0.87451) -corner_radius_top_left = 16 -corner_radius_top_right = 16 -corner_radius_bottom_right = 16 -corner_radius_bottom_left = 16 +corner_radius_top_left = 32 +corner_radius_top_right = 32 +corner_radius_bottom_right = 32 +corner_radius_bottom_left = 32 [sub_resource type="LabelSettings" id="LabelSettings_dourt"] -font_size = 32 +font_size = 64 [sub_resource type="Animation" id="Animation_xporw"] length = 0.001 @@ -234,10 +234,10 @@ anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 -theme_override_constants/margin_left = 80 -theme_override_constants/margin_top = 80 -theme_override_constants/margin_right = 80 -theme_override_constants/margin_bottom = 80 +theme_override_constants/margin_left = 160 +theme_override_constants/margin_top = 160 +theme_override_constants/margin_right = 160 +theme_override_constants/margin_bottom = 160 [node name="CenterContainer" type="CenterContainer" parent="MarginContainer"] layout_mode = 2 @@ -248,7 +248,7 @@ alignment = 1 [node name="MarginContainer" type="MarginContainer" parent="MarginContainer/CenterContainer/VBoxContainer"] layout_mode = 2 -theme_override_constants/margin_bottom = 24 +theme_override_constants/margin_bottom = 48 [node name="Title" type="Label" parent="MarginContainer/CenterContainer/VBoxContainer/MarginContainer"] layout_mode = 2 @@ -259,15 +259,15 @@ horizontal_alignment = 1 [node name="MarginContainer2" type="MarginContainer" parent="MarginContainer/CenterContainer/VBoxContainer"] layout_mode = 2 -theme_override_constants/margin_top = 48 +theme_override_constants/margin_top = 96 [node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/CenterContainer/VBoxContainer/MarginContainer2"] layout_mode = 2 -theme_override_constants/separation = 24 +theme_override_constants/separation = 48 [node name="ResumeButton" type="Button" parent="MarginContainer/CenterContainer/VBoxContainer/MarginContainer2/VBoxContainer"] unique_name_in_owner = true -custom_minimum_size = Vector2(256, 64) +custom_minimum_size = Vector2(512, 128) layout_mode = 2 size_flags_horizontal = 4 size_flags_vertical = 0 @@ -276,7 +276,7 @@ text = "Resume" [node name="SaveButton" type="Button" parent="MarginContainer/CenterContainer/VBoxContainer/MarginContainer2/VBoxContainer"] unique_name_in_owner = true -custom_minimum_size = Vector2(256, 64) +custom_minimum_size = Vector2(512, 128) layout_mode = 2 size_flags_horizontal = 4 size_flags_vertical = 0 @@ -286,7 +286,7 @@ expand_icon = true [node name="MainMenuButton" type="Button" parent="MarginContainer/CenterContainer/VBoxContainer/MarginContainer2/VBoxContainer"] unique_name_in_owner = true -custom_minimum_size = Vector2(256, 64) +custom_minimum_size = Vector2(512, 128) layout_mode = 2 size_flags_horizontal = 4 size_flags_vertical = 0 @@ -300,7 +300,7 @@ modulate = Color(1, 1, 1, 0) layout_mode = 2 [node name="Panel" type="Panel" parent="MarginContainer/CenterContainer/SaveOverlay"] -custom_minimum_size = Vector2(512, 512) +custom_minimum_size = Vector2(1024, 1024) layout_mode = 2 mouse_filter = 1 theme_override_styles/panel = SubResource("StyleBoxFlat_bg3p1") @@ -312,7 +312,7 @@ anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 -theme_override_constants/margin_top = 24 +theme_override_constants/margin_top = 48 [node name="VBoxContainer" type="HBoxContainer" parent="MarginContainer/CenterContainer/SaveOverlay/Panel/MarginContainer"] layout_mode = 2 diff --git a/src/win_menu/WinMenu.tscn b/src/win_menu/WinMenu.tscn index 0f79ffa9..ef4cbb5f 100644 --- a/src/win_menu/WinMenu.tscn +++ b/src/win_menu/WinMenu.tscn @@ -5,24 +5,24 @@ [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_6nh0u"] bg_color = Color(0, 0.815686, 1, 0.337255) -corner_radius_top_left = 8 -corner_radius_top_right = 8 -corner_radius_bottom_right = 8 -corner_radius_bottom_left = 8 +corner_radius_top_left = 16 +corner_radius_top_right = 16 +corner_radius_bottom_right = 16 +corner_radius_bottom_left = 16 [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_beapk"] bg_color = Color(0, 0.483995, 0.598094, 0.337255) -corner_radius_top_left = 8 -corner_radius_top_right = 8 -corner_radius_bottom_right = 8 -corner_radius_bottom_left = 8 +corner_radius_top_left = 16 +corner_radius_top_right = 16 +corner_radius_bottom_right = 16 +corner_radius_bottom_left = 16 [sub_resource type="SystemFont" id="SystemFont_tfmt8"] subpixel_positioning = 0 [sub_resource type="Theme" id="Theme_r7rsr"] default_font = SubResource("SystemFont_tfmt8") -default_font_size = 24 +default_font_size = 48 Button/styles/focus = SubResource("StyleBoxFlat_6nh0u") Button/styles/normal = SubResource("StyleBoxFlat_6nh0u") Button/styles/pressed = SubResource("StyleBoxFlat_beapk") @@ -39,10 +39,10 @@ variation_embolden = 0.54 [sub_resource type="LabelSettings" id="LabelSettings_3oq1d"] font = SubResource("FontVariation_ps6b3") -font_size = 48 +font_size = 96 [sub_resource type="LabelSettings" id="LabelSettings_1cpnb"] -font_size = 36 +font_size = 72 [sub_resource type="Animation" id="Animation_qq1c3"] length = 0.001 @@ -138,10 +138,10 @@ anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 -theme_override_constants/margin_left = 80 -theme_override_constants/margin_top = 80 -theme_override_constants/margin_right = 80 -theme_override_constants/margin_bottom = 80 +theme_override_constants/margin_left = 160 +theme_override_constants/margin_top = 160 +theme_override_constants/margin_right = 160 +theme_override_constants/margin_bottom = 160 [node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"] layout_mode = 2 @@ -149,7 +149,7 @@ alignment = 1 [node name="MarginContainer" type="MarginContainer" parent="MarginContainer/VBoxContainer"] layout_mode = 2 -theme_override_constants/margin_bottom = 24 +theme_override_constants/margin_bottom = 48 [node name="Title" type="Label" parent="MarginContainer/VBoxContainer/MarginContainer"] layout_mode = 2 @@ -165,15 +165,15 @@ horizontal_alignment = 1 [node name="MarginContainer2" type="MarginContainer" parent="MarginContainer/VBoxContainer"] layout_mode = 2 -theme_override_constants/margin_top = 48 +theme_override_constants/margin_top = 96 [node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/VBoxContainer/MarginContainer2"] layout_mode = 2 -theme_override_constants/separation = 24 +theme_override_constants/separation = 48 [node name="MainMenuButton" type="Button" parent="MarginContainer/VBoxContainer/MarginContainer2/VBoxContainer"] unique_name_in_owner = true -custom_minimum_size = Vector2(256, 64) +custom_minimum_size = Vector2(512, 128) layout_mode = 2 size_flags_horizontal = 4 size_flags_vertical = 0