diff --git a/assets/sprites/AssetTileset.png.import b/assets/sprites/AssetTileset.png.import index eec4ab6..7e8cd95 100644 --- a/assets/sprites/AssetTileset.png.import +++ b/assets/sprites/AssetTileset.png.import @@ -23,7 +23,7 @@ compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 -mipmaps/generate=false +mipmaps/generate=true mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" diff --git a/assets/sprites/BoardTileMap.png.import b/assets/sprites/BoardTileMap.png.import index 4354b0a..0ab1624 100644 --- a/assets/sprites/BoardTileMap.png.import +++ b/assets/sprites/BoardTileMap.png.import @@ -23,7 +23,7 @@ compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 -mipmaps/generate=false +mipmaps/generate=true mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" diff --git a/assets/sprites/RedChip.png.import b/assets/sprites/RedChip.png.import index c1b219c..b8b0c5b 100644 --- a/assets/sprites/RedChip.png.import +++ b/assets/sprites/RedChip.png.import @@ -23,7 +23,7 @@ compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 -mipmaps/generate=false +mipmaps/generate=true mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" diff --git a/assets/sprites/YellowChip.png.import b/assets/sprites/YellowChip.png.import index ceaac22..01bec1c 100644 --- a/assets/sprites/YellowChip.png.import +++ b/assets/sprites/YellowChip.png.import @@ -23,7 +23,7 @@ compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 -mipmaps/generate=false +mipmaps/generate=true mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" diff --git a/assets/sprites/back.png b/assets/sprites/back.png new file mode 100644 index 0000000..70c5378 Binary files /dev/null and b/assets/sprites/back.png differ diff --git a/assets/sprites/back.png.import b/assets/sprites/back.png.import new file mode 100644 index 0000000..f6f980e --- /dev/null +++ b/assets/sprites/back.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://2plbtkcttn7o" +path="res://.godot/imported/back.png-73d0d71f353725c6ba9218045b96399b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/sprites/back.png" +dest_files=["res://.godot/imported/back.png-73d0d71f353725c6ba9218045b96399b.ctex"] + +[params] + +compress/mode=0 +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=1 diff --git a/assets/sprites/bracket.png b/assets/sprites/bracket.png new file mode 100644 index 0000000..70fe3a6 Binary files /dev/null and b/assets/sprites/bracket.png differ diff --git a/assets/sprites/bracket.png.import b/assets/sprites/bracket.png.import new file mode 100644 index 0000000..77a21b5 --- /dev/null +++ b/assets/sprites/bracket.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cdhuhbt2ws5sy" +path="res://.godot/imported/bracket.png-31c6864ee533d160bca76e6c85f99c4e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/sprites/bracket.png" +dest_files=["res://.godot/imported/bracket.png-31c6864ee533d160bca76e6c85f99c4e.ctex"] + +[params] + +compress/mode=0 +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=1 diff --git a/assets/sprites/button.png b/assets/sprites/button.png new file mode 100644 index 0000000..a46b5bf Binary files /dev/null and b/assets/sprites/button.png differ diff --git a/assets/sprites/button.png.import b/assets/sprites/button.png.import new file mode 100644 index 0000000..570e4e7 --- /dev/null +++ b/assets/sprites/button.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cftuywdnwvop0" +path="res://.godot/imported/button.png-01faf565b773239305f3664038f20e61.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/sprites/button.png" +dest_files=["res://.godot/imported/button.png-01faf565b773239305f3664038f20e61.ctex"] + +[params] + +compress/mode=0 +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=1 diff --git a/assets/sprites/cancel.png b/assets/sprites/cancel.png new file mode 100644 index 0000000..6a569b6 Binary files /dev/null and b/assets/sprites/cancel.png differ diff --git a/assets/sprites/cancel.png.import b/assets/sprites/cancel.png.import new file mode 100644 index 0000000..6a367ae --- /dev/null +++ b/assets/sprites/cancel.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://stk7umv2ppss" +path="res://.godot/imported/cancel.png-dcc5e0579b1b7ac5745b3b3804e100ab.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/sprites/cancel.png" +dest_files=["res://.godot/imported/cancel.png-dcc5e0579b1b7ac5745b3b3804e100ab.ctex"] + +[params] + +compress/mode=0 +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=1 diff --git a/assets/sprites/long_button.png b/assets/sprites/long_button.png new file mode 100644 index 0000000..23a8d94 Binary files /dev/null and b/assets/sprites/long_button.png differ diff --git a/assets/sprites/long_button.png.import b/assets/sprites/long_button.png.import new file mode 100644 index 0000000..b85f8c9 --- /dev/null +++ b/assets/sprites/long_button.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bvind4dms08sd" +path="res://.godot/imported/long_button.png-97ae4bec79a5441e5b3d9a75cbdf673f.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/sprites/long_button.png" +dest_files=["res://.godot/imported/long_button.png-97ae4bec79a5441e5b3d9a75cbdf673f.ctex"] + +[params] + +compress/mode=0 +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=1 diff --git a/assets/sprites/observe.png b/assets/sprites/observe.png new file mode 100644 index 0000000..6651db6 Binary files /dev/null and b/assets/sprites/observe.png differ diff --git a/assets/sprites/observe.png.import b/assets/sprites/observe.png.import new file mode 100644 index 0000000..8a9a66f --- /dev/null +++ b/assets/sprites/observe.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://da13ksuf4vkqe" +path="res://.godot/imported/observe.png-5a0a3c79f51f4f13ffdfce42e4ad04da.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/sprites/observe.png" +dest_files=["res://.godot/imported/observe.png-5a0a3c79f51f4f13ffdfce42e4ad04da.ctex"] + +[params] + +compress/mode=0 +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=1 diff --git a/assets/sprites/player.png b/assets/sprites/player.png new file mode 100644 index 0000000..5ee8241 Binary files /dev/null and b/assets/sprites/player.png differ diff --git a/assets/sprites/player.png.import b/assets/sprites/player.png.import new file mode 100644 index 0000000..bbee368 --- /dev/null +++ b/assets/sprites/player.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b6iac21s36dku" +path="res://.godot/imported/player.png-e1eaffe0873063c60a0d0b322e4d87d9.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/sprites/player.png" +dest_files=["res://.godot/imported/player.png-e1eaffe0873063c60a0d0b322e4d87d9.ctex"] + +[params] + +compress/mode=0 +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=1 diff --git a/assets/sprites/player_badge.png b/assets/sprites/player_badge.png new file mode 100644 index 0000000..553448b Binary files /dev/null and b/assets/sprites/player_badge.png differ diff --git a/assets/sprites/player_badge.png.import b/assets/sprites/player_badge.png.import new file mode 100644 index 0000000..e572619 --- /dev/null +++ b/assets/sprites/player_badge.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dta0orurmv5qj" +path="res://.godot/imported/player_badge.png-63850d039b551977db5c0c02f6402465.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/sprites/player_badge.png" +dest_files=["res://.godot/imported/player_badge.png-63850d039b551977db5c0c02f6402465.ctex"] + +[params] + +compress/mode=0 +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=1 diff --git a/export_presets.cfg b/export_presets.cfg index de8873c..3bc06c3 100644 --- a/export_presets.cfg +++ b/export_presets.cfg @@ -25,13 +25,13 @@ binary_format/architecture="universal" custom_template/debug="" custom_template/release="" debug/export_console_wrapper=0 -application/icon="uid://ckmfi0cjgxgyk" +application/icon="uid://dd7lvnidxr5ss" application/icon_interpolation=4 application/bundle_identifier="com.abunchofknowitalls.connect4" application/signature="" application/app_category="Games" -application/short_version="0.1.1" -application/version="0.1.1" +application/short_version="" +application/version="" application/copyright="RPI Minds & Machines" application/copyright_localized={} application/min_macos_version_x86_64="10.12" @@ -261,13 +261,13 @@ dotnet/embed_build_outputs=false name="Windows (x86_64)" platform="Windows Desktop" runnable=true -advanced_options=false +advanced_options=true dedicated_server=false custom_features="" export_filter="all_resources" include_filter="" exclude_filter="" -export_path="../../Downloads/connect4-moderator-observer (win-x86_64) (0.1.0).exe" +export_path="../../Downloads/connect4-moderator-observer (win-x86_64).exe" patches=PackedStringArray() encryption_include_filters="" encryption_exclude_filters="" @@ -293,7 +293,7 @@ codesign/digest_algorithm=1 codesign/description="" codesign/custom_options=PackedStringArray() application/modify_resources=true -application/icon="" +application/icon="uid://dd7lvnidxr5ss" application/console_wrapper_icon="" application/icon_interpolation=4 application/file_version="" @@ -301,7 +301,7 @@ application/product_version="" application/company_name="" application/product_name="" application/file_description="" -application/copyright="" +application/copyright="RPI Minds & Machines" application/trademarks="" application/export_angle=0 application/export_d3d12=0 @@ -325,20 +325,20 @@ Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorActi Remove-Item -Recurse -Force '{temp_dir}'" dotnet/include_scripts_content=false dotnet/include_debug_symbols=false -dotnet/embed_build_outputs=false +dotnet/embed_build_outputs=true [preset.2] name="Windows (arm64)" platform="Windows Desktop" runnable=false -advanced_options=false +advanced_options=true dedicated_server=false custom_features="" export_filter="all_resources" include_filter="" exclude_filter="" -export_path="../../Downloads/connect4-moderator-observer (win-arm64) (0.1.0).exe" +export_path="../../Downloads/connect4-moderator-observer (win-arm64).exe" patches=PackedStringArray() encryption_include_filters="" encryption_exclude_filters="" @@ -364,7 +364,7 @@ codesign/digest_algorithm=1 codesign/description="" codesign/custom_options=PackedStringArray() application/modify_resources=true -application/icon="" +application/icon="uid://dd7lvnidxr5ss" application/console_wrapper_icon="" application/icon_interpolation=4 application/file_version="" @@ -396,20 +396,20 @@ Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorActi Remove-Item -Recurse -Force '{temp_dir}'" dotnet/include_scripts_content=false dotnet/include_debug_symbols=false -dotnet/embed_build_outputs=false +dotnet/embed_build_outputs=true [preset.3] name="Linux (x86_64)" platform="Linux" runnable=true -advanced_options=false +advanced_options=true dedicated_server=false custom_features="" export_filter="all_resources" include_filter="" exclude_filter="" -export_path="../../Downloads/connect4-moderator-observer (linux-x86_64) (0.1.0)" +export_path="../../Downloads/connect4-moderator-observer (linux-x86_64).out" patches=PackedStringArray() encryption_include_filters="" encryption_exclude_filters="" @@ -426,7 +426,7 @@ debug/export_console_wrapper=0 binary_format/embed_pck=true texture_format/s3tc_bptc=true texture_format/etc2_astc=false -shader_baker/enabled=true +shader_baker/enabled=false binary_format/architecture="x86_64" ssh_remote_deploy/enabled=false ssh_remote_deploy/host="user@host_ip" @@ -442,20 +442,20 @@ kill $(pgrep -x -f \"{temp_dir}/{exe_name} {cmd_args}\") rm -rf \"{temp_dir}\"" dotnet/include_scripts_content=false dotnet/include_debug_symbols=false -dotnet/embed_build_outputs=false +dotnet/embed_build_outputs=true [preset.4] name="Linux (arm64)" platform="Linux" runnable=false -advanced_options=false +advanced_options=true dedicated_server=false custom_features="" export_filter="all_resources" include_filter="" exclude_filter="" -export_path="../../Downloads/connect4-moderator-observer (linux-arm64) (0.1.0)" +export_path="../../Downloads/connect4-moderator-observer (linux-arm64).out" patches=PackedStringArray() encryption_include_filters="" encryption_exclude_filters="" @@ -472,7 +472,7 @@ debug/export_console_wrapper=0 binary_format/embed_pck=true texture_format/s3tc_bptc=true texture_format/etc2_astc=false -shader_baker/enabled=true +shader_baker/enabled=false binary_format/architecture="arm64" ssh_remote_deploy/enabled=false ssh_remote_deploy/host="user@host_ip" @@ -488,4 +488,4 @@ kill $(pgrep -x -f \"{temp_dir}/{exe_name} {cmd_args}\") rm -rf \"{temp_dir}\"" dotnet/include_scripts_content=false dotnet/include_debug_symbols=false -dotnet/embed_build_outputs=false +dotnet/embed_build_outputs=true diff --git a/icon.png b/icon.png new file mode 100644 index 0000000..0e95626 Binary files /dev/null and b/icon.png differ diff --git a/icon.svg.import b/icon.png.import similarity index 69% rename from icon.svg.import rename to icon.png.import index cc975d6..f783bbe 100644 --- a/icon.svg.import +++ b/icon.png.import @@ -2,16 +2,16 @@ importer="texture" type="CompressedTexture2D" -uid="uid://ebf78p6bpq5m" -path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex" +uid="uid://dd7lvnidxr5ss" +path="res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://icon.svg" -dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"] +source_file="res://icon.png" +dest_files=["res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.ctex"] [params] @@ -38,6 +38,3 @@ process/hdr_as_srgb=false process/hdr_clamp_exposure=false process/size_limit=0 detect_3d/compress_to=1 -svg/scale=1.0 -editor/scale_with_editor_scale=false -editor/convert_colors_with_editor_theme=false diff --git a/icon.svg b/icon.svg deleted file mode 100644 index c6bbb7d..0000000 --- a/icon.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/project.godot b/project.godot index fe1b39a..c518cd0 100644 --- a/project.godot +++ b/project.godot @@ -10,15 +10,24 @@ config_version=5 [application] -config/name="connect4-moderator-observer" +config/name="Connect4 Moderator - Observer" +config/version="0.1.2" run/main_scene="uid://dcx5nvs0pa7me" config/features=PackedStringArray("4.5", "C#", "Forward Plus") -config/icon="uid://ckmfi0cjgxgyk" +boot_splash/image="uid://dd7lvnidxr5ss" +config/icon="uid://dd7lvnidxr5ss" [autoload] Connection="*res://scripts/Connection.cs" +[display] + +window/size/viewport_width=1280 +window/size/viewport_height=720 +window/stretch/mode="canvas_items" +window/stretch/aspect="expand" + [dotnet] project/assembly_name="connect4-moderator-observer" @@ -28,3 +37,5 @@ project/assembly_name="connect4-moderator-observer" textures/canvas_textures/default_texture_filter=0 textures/vram_compression/import_s3tc_bptc=true textures/vram_compression/import_etc2_astc=true +anti_aliasing/quality/msaa_2d=2 +anti_aliasing/quality/msaa_3d=2 diff --git a/scenes/board_screen.tscn b/scenes/board_screen.tscn index 9aca32c..533765b 100644 --- a/scenes/board_screen.tscn +++ b/scenes/board_screen.tscn @@ -1,13 +1,13 @@ [gd_scene load_steps=14 format=3 uid="uid://m542qwlp7hl7"] [ext_resource type="Script" uid="uid://dg5jt0o0r0v3r" path="res://scripts/BoardScreen.cs" id="1_b3w8x"] -[ext_resource type="PackedScene" uid="uid://rl33x81cxlh0" path="res://scenes/bracket_view.tscn" id="2_u1oi2"] [ext_resource type="Texture2D" uid="uid://dlx02qat7j6lf" path="res://assets/sprites/AssetTileset.png" id="3_1tlhv"] [ext_resource type="FontFile" uid="uid://c3jmev24lo6ci" path="res://assets/fonts/PixelOperator8.ttf" id="3_rjcmr"] [ext_resource type="Texture2D" uid="uid://ckmfi0cjgxgyk" path="res://assets/sprites/RedChip.png" id="4_1hrcj"] [ext_resource type="Texture2D" uid="uid://qy30emdgrk7o" path="res://assets/sprites/YellowChip.png" id="5_i2o8i"] [ext_resource type="Texture2D" uid="uid://8un28mol7qow" path="res://assets/sprites/BoardTileMap.png" id="6_i2o8i"] [ext_resource type="PackedScene" uid="uid://pdean68jjg80" path="res://scenes/button_small.tscn" id="7_glh1q"] +[ext_resource type="Script" uid="uid://b3q4gq63qmx23" path="res://scripts/BackButton.cs" id="8_u1oi2"] [sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_b3w8x"] @@ -31,10 +31,8 @@ sources/0 = SubResource("TileSetAtlasSource_i2o8i") atlas = ExtResource("3_1tlhv") region = Rect2(112, 32, 16, 16) -[node name="BoardScreen" type="Node2D" node_paths=PackedStringArray("BackButton")] +[node name="BoardScreen" type="Node2D"] script = ExtResource("1_b3w8x") -BracketScene = ExtResource("2_u1oi2") -BackButton = NodePath("BracketButton") [node name="Floor Collider" type="StaticBody2D" parent="."] position = Vector2(0, 200) @@ -77,6 +75,7 @@ position = Vector2(274, 0) shape = SubResource("SegmentShape2D_i2o8i") [node name="Player1Card" type="Node2D" parent="."] +position = Vector2(0, 8) [node name="Left" type="Sprite2D" parent="Player1Card"] position = Vector2(-556, -300) @@ -123,6 +122,7 @@ theme_override_font_sizes/font_size = 8 text = "NOT READY" [node name="Player2Card" type="Node2D" parent="."] +position = Vector2(989, -64) [node name="Left" type="Sprite2D" parent="Player2Card"] position = Vector2(-556, -228) @@ -181,6 +181,7 @@ offset_left = -566.0 offset_top = 281.0 offset_right = -550.0 offset_bottom = 297.0 +script = ExtResource("8_u1oi2") [node name="Sprite2D" type="Sprite2D" parent="BracketButton"] position = Vector2(8, 8) diff --git a/scenes/bracket_view.tscn b/scenes/bracket_view.tscn index cee29af..e86172e 100644 --- a/scenes/bracket_view.tscn +++ b/scenes/bracket_view.tscn @@ -1,8 +1,8 @@ [gd_scene load_steps=5 format=3 uid="uid://rl33x81cxlh0"] [ext_resource type="Script" uid="uid://dm25u0a2lqk2x" path="res://scripts/BracketScene.cs" id="1_dvj3m"] -[ext_resource type="Texture2D" uid="uid://ckmfi0cjgxgyk" path="res://assets/sprites/RedChip.png" id="2_7c11m"] -[ext_resource type="PackedScene" uid="uid://b4tujjdhmk4h" path="res://scenes/red_chip.tscn" id="3_1511b"] +[ext_resource type="Texture2D" uid="uid://dd7lvnidxr5ss" path="res://icon.png" id="2_mbqc8"] +[ext_resource type="Texture2D" uid="uid://stk7umv2ppss" path="res://assets/sprites/cancel.png" id="3_as653"] [ext_resource type="Script" uid="uid://1y72woiynf31" path="res://scripts/AdminControls.cs" id="4_mbqc8"] [node name="BracketView" type="Control" node_paths=PackedStringArray("Players", "Matches")] @@ -15,8 +15,8 @@ grow_vertical = 2 script = ExtResource("1_dvj3m") Players = NodePath("HBoxContainer/PlayerList") Matches = NodePath("HBoxContainer/MatchList") -JoinButton = ExtResource("2_7c11m") -BoardScene = ExtResource("3_1511b") +WatchButton = ExtResource("2_mbqc8") +TerminateKickButton = ExtResource("3_as653") [node name="ColorRect" type="ColorRect" parent="."] custom_minimum_size = Vector2(0, 36) @@ -26,7 +26,7 @@ anchor_right = 1.0 grow_horizontal = 2 color = Color(0.13319641, 0.13319641, 0.13319638, 1) -[node name="AdminControls" type="HBoxContainer" parent="ColorRect" node_paths=PackedStringArray("BecomeAdmin", "StartTournament")] +[node name="AdminControls" type="HBoxContainer" parent="ColorRect" node_paths=PackedStringArray("BecomeAdmin", "StartTournament", "Label", "Timeout")] custom_minimum_size = Vector2(0, 36) layout_mode = 1 anchors_preset = 10 @@ -36,6 +36,8 @@ grow_horizontal = 2 script = ExtResource("4_mbqc8") BecomeAdmin = NodePath("BecomeAdmin") StartTournament = NodePath("StartTournament") +Label = NodePath("Label") +Timeout = NodePath("HSlider") [node name="BecomeAdmin" type="Button" parent="ColorRect/AdminControls"] layout_mode = 2 @@ -45,6 +47,21 @@ text = "Become Admin" layout_mode = 2 text = "Start Tournament" +[node name="Label" type="Label" parent="ColorRect/AdminControls"] +layout_mode = 2 +text = "Wait To Move: 5.0s " + +[node name="HSlider" type="HSlider" parent="ColorRect/AdminControls"] +custom_minimum_size = Vector2(256, 0) +layout_mode = 2 +size_flags_vertical = 1 +min_value = 0.1 +max_value = 5.0 +step = 0.2 +value = 5.0 +tick_count = 25 +ticks_on_borders = true + [node name="HBoxContainer" type="HBoxContainer" parent="."] layout_mode = 1 anchors_preset = -1 diff --git a/scripts/AdminControls.cs b/scripts/AdminControls.cs index 6091613..7fbd74f 100644 --- a/scripts/AdminControls.cs +++ b/scripts/AdminControls.cs @@ -6,6 +6,8 @@ public partial class AdminControls : HBoxContainer { [Export] public Button BecomeAdmin; [Export] public Button StartTournament; + [Export] public Label Label; + [Export] public Slider Timeout; public override void _Ready() { @@ -17,6 +19,31 @@ public partial class AdminControls : HBoxContainer { StartTournament.Hide(); } + + if (!Connection.Instance.IsAdmin) + { + Label.Hide(); + Timeout.Hide(); + } + + Timeout.Value = Connection.Instance.CurrentWaitTimeout; + var time = Connection.Instance.CurrentWaitTimeout.ToString(); + if (time.Length > 3) + { + time = time.Substring(0, 3); + } + + Label.Text = "Wait To Move: " + time + "s "; + Timeout.ValueChanged += value => + { + Connection.Instance.SetTournamentWait((float)value); + var time = Connection.Instance.CurrentWaitTimeout.ToString(); + if (time.Length > 3) + { + time = time.Substring(0, 3); + } + Label.Text = "Wait To Move: " + time + "s "; + }; BecomeAdmin.Pressed += ShowAuthPopup; } @@ -119,5 +146,7 @@ public partial class AdminControls : HBoxContainer { StartTournament.Show(); } + Label.Show(); + Timeout.Show(); } } diff --git a/scripts/BackButton.cs b/scripts/BackButton.cs new file mode 100644 index 0000000..9b2a958 --- /dev/null +++ b/scripts/BackButton.cs @@ -0,0 +1,18 @@ +using Godot; +using System; + +public partial class BackButton : TextureButton +{ + private const string BRACKET_SCENE_PATH = "res://scenes/bracket_view.tscn"; + + public override void _Pressed() + { + TransitionToBracket(); + base._Pressed(); + } + + private void TransitionToBracket() + { + GetTree().ChangeSceneToFile(BRACKET_SCENE_PATH); + } +} diff --git a/scripts/BackButton.cs.uid b/scripts/BackButton.cs.uid new file mode 100644 index 0000000..a94e54d --- /dev/null +++ b/scripts/BackButton.cs.uid @@ -0,0 +1 @@ +uid://b3q4gq63qmx23 diff --git a/scripts/BoardScreen.cs b/scripts/BoardScreen.cs index 3291316..1120877 100644 --- a/scripts/BoardScreen.cs +++ b/scripts/BoardScreen.cs @@ -4,8 +4,6 @@ using System.Collections.Generic; public partial class BoardScreen : Node2D { - [Export] public BaseButton BackButton; - private const string RED_CHIP_PATH = "res://scenes/red_chip.tscn"; private const string YELLOW_CHIP_PATH = "res://scenes/yellow_chip.tscn"; private const string BRACKET_SCENE_PATH = "res://scenes/bracket_view.tscn"; @@ -15,6 +13,9 @@ public partial class BoardScreen : Node2D { private const int CHIP_X_OFF = -(CHIP_SIZE + CHIP_PADDING) * 7 / 2 + (CHIP_SIZE + CHIP_PADDING) / 2; private const int Y_OFF = 300; private const int CARD_CENTER_X_DEFAULT = -536; + private const double MOVE_TIMEOUT_BEFORE_PLACE = 1.0f; + + private double currentTimeout = 0.0f; private PackedScene redChip; private PackedScene ylwChip; @@ -23,6 +24,8 @@ public partial class BoardScreen : Node2D { private Node2D player2Card; private MatchData matchData; + private List<(string, int)> moves; + private RigidBody2D[,] chips = new RigidBody2D[6, 7]; // 6 rows 7 cols | 0, 0 is top left // Called when the node enters the scene tree for the first time. @@ -40,19 +43,35 @@ public partial class BoardScreen : Node2D { matchData = Connection.Instance.CurrentObservingMatch; player1Card.GetNode