4 Commits

33 changed files with 995 additions and 95 deletions

View File

@@ -23,7 +23,7 @@ compress/rdo_quality_loss=0.0
compress/hdr_compression=1 compress/hdr_compression=1
compress/normal_map=0 compress/normal_map=0
compress/channel_pack=0 compress/channel_pack=0
mipmaps/generate=false mipmaps/generate=true
mipmaps/limit=-1 mipmaps/limit=-1
roughness/mode=0 roughness/mode=0
roughness/src_normal="" roughness/src_normal=""

View File

@@ -23,7 +23,7 @@ compress/rdo_quality_loss=0.0
compress/hdr_compression=1 compress/hdr_compression=1
compress/normal_map=0 compress/normal_map=0
compress/channel_pack=0 compress/channel_pack=0
mipmaps/generate=false mipmaps/generate=true
mipmaps/limit=-1 mipmaps/limit=-1
roughness/mode=0 roughness/mode=0
roughness/src_normal="" roughness/src_normal=""

View File

@@ -23,7 +23,7 @@ compress/rdo_quality_loss=0.0
compress/hdr_compression=1 compress/hdr_compression=1
compress/normal_map=0 compress/normal_map=0
compress/channel_pack=0 compress/channel_pack=0
mipmaps/generate=false mipmaps/generate=true
mipmaps/limit=-1 mipmaps/limit=-1
roughness/mode=0 roughness/mode=0
roughness/src_normal="" roughness/src_normal=""

View File

@@ -23,7 +23,7 @@ compress/rdo_quality_loss=0.0
compress/hdr_compression=1 compress/hdr_compression=1
compress/normal_map=0 compress/normal_map=0
compress/channel_pack=0 compress/channel_pack=0
mipmaps/generate=false mipmaps/generate=true
mipmaps/limit=-1 mipmaps/limit=-1
roughness/mode=0 roughness/mode=0
roughness/src_normal="" roughness/src_normal=""

BIN
assets/sprites/back.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 B

View File

@@ -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

BIN
assets/sprites/bracket.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

View File

@@ -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

BIN
assets/sprites/button.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 B

View File

@@ -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

BIN
assets/sprites/cancel.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 B

View File

@@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 B

View File

@@ -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

BIN
assets/sprites/observe.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 261 B

View File

@@ -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

BIN
assets/sprites/player.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 B

View File

@@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 B

View File

@@ -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

491
export_presets.cfg Normal file
View File

@@ -0,0 +1,491 @@
[preset.0]
name="macOS"
platform="macOS"
runnable=true
advanced_options=false
dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path="../../Downloads/connect4-moderator-observer.dmg"
patches=PackedStringArray()
encryption_include_filters=""
encryption_exclude_filters=""
seed=0
encrypt_pck=false
encrypt_directory=false
script_export_mode=2
[preset.0.options]
export/distribution_type=1
binary_format/architecture="universal"
custom_template/debug=""
custom_template/release=""
debug/export_console_wrapper=0
application/icon="uid://dd7lvnidxr5ss"
application/icon_interpolation=4
application/bundle_identifier="com.abunchofknowitalls.connect4"
application/signature=""
application/app_category="Games"
application/short_version=""
application/version=""
application/copyright="RPI Minds & Machines"
application/copyright_localized={}
application/min_macos_version_x86_64="10.12"
application/min_macos_version_arm64="11.00"
application/export_angle=0
display/high_res=true
shader_baker/enabled=true
application/additional_plist_content=""
xcode/platform_build="14C18"
xcode/sdk_version="13.1"
xcode/sdk_build="22C55"
xcode/sdk_name="macosx13.1"
xcode/xcode_version="1420"
xcode/xcode_build="14C18"
codesign/codesign=3
codesign/installer_identity=""
codesign/apple_team_id="8S7C654DQ4"
codesign/identity="Developer ID Application: Joshua Higgins (8S7C654DQ4)"
codesign/entitlements/custom_file=""
codesign/entitlements/allow_jit_code_execution=false
codesign/entitlements/allow_unsigned_executable_memory=false
codesign/entitlements/allow_dyld_environment_variables=false
codesign/entitlements/disable_library_validation=true
codesign/entitlements/audio_input=false
codesign/entitlements/camera=false
codesign/entitlements/location=false
codesign/entitlements/address_book=false
codesign/entitlements/calendars=false
codesign/entitlements/photos_library=false
codesign/entitlements/apple_events=false
codesign/entitlements/debugging=false
codesign/entitlements/app_sandbox/enabled=false
codesign/entitlements/app_sandbox/network_server=false
codesign/entitlements/app_sandbox/network_client=false
codesign/entitlements/app_sandbox/device_usb=false
codesign/entitlements/app_sandbox/device_bluetooth=false
codesign/entitlements/app_sandbox/files_downloads=0
codesign/entitlements/app_sandbox/files_pictures=0
codesign/entitlements/app_sandbox/files_music=0
codesign/entitlements/app_sandbox/files_movies=0
codesign/entitlements/app_sandbox/files_user_selected=0
codesign/entitlements/app_sandbox/helper_executables=[]
codesign/entitlements/additional=""
codesign/custom_options=PackedStringArray()
notarization/notarization=2
privacy/microphone_usage_description=""
privacy/microphone_usage_description_localized={}
privacy/camera_usage_description=""
privacy/camera_usage_description_localized={}
privacy/location_usage_description=""
privacy/location_usage_description_localized={}
privacy/address_book_usage_description=""
privacy/address_book_usage_description_localized={}
privacy/calendar_usage_description=""
privacy/calendar_usage_description_localized={}
privacy/photos_library_usage_description=""
privacy/photos_library_usage_description_localized={}
privacy/desktop_folder_usage_description=""
privacy/desktop_folder_usage_description_localized={}
privacy/documents_folder_usage_description=""
privacy/documents_folder_usage_description_localized={}
privacy/downloads_folder_usage_description=""
privacy/downloads_folder_usage_description_localized={}
privacy/network_volumes_usage_description=""
privacy/network_volumes_usage_description_localized={}
privacy/removable_volumes_usage_description=""
privacy/removable_volumes_usage_description_localized={}
privacy/tracking_enabled=false
privacy/tracking_domains=PackedStringArray()
privacy/collected_data/name/collected=false
privacy/collected_data/name/linked_to_user=false
privacy/collected_data/name/used_for_tracking=false
privacy/collected_data/name/collection_purposes=0
privacy/collected_data/email_address/collected=false
privacy/collected_data/email_address/linked_to_user=false
privacy/collected_data/email_address/used_for_tracking=false
privacy/collected_data/email_address/collection_purposes=0
privacy/collected_data/phone_number/collected=false
privacy/collected_data/phone_number/linked_to_user=false
privacy/collected_data/phone_number/used_for_tracking=false
privacy/collected_data/phone_number/collection_purposes=0
privacy/collected_data/physical_address/collected=false
privacy/collected_data/physical_address/linked_to_user=false
privacy/collected_data/physical_address/used_for_tracking=false
privacy/collected_data/physical_address/collection_purposes=0
privacy/collected_data/other_contact_info/collected=false
privacy/collected_data/other_contact_info/linked_to_user=false
privacy/collected_data/other_contact_info/used_for_tracking=false
privacy/collected_data/other_contact_info/collection_purposes=0
privacy/collected_data/health/collected=false
privacy/collected_data/health/linked_to_user=false
privacy/collected_data/health/used_for_tracking=false
privacy/collected_data/health/collection_purposes=0
privacy/collected_data/fitness/collected=false
privacy/collected_data/fitness/linked_to_user=false
privacy/collected_data/fitness/used_for_tracking=false
privacy/collected_data/fitness/collection_purposes=0
privacy/collected_data/payment_info/collected=false
privacy/collected_data/payment_info/linked_to_user=false
privacy/collected_data/payment_info/used_for_tracking=false
privacy/collected_data/payment_info/collection_purposes=0
privacy/collected_data/credit_info/collected=false
privacy/collected_data/credit_info/linked_to_user=false
privacy/collected_data/credit_info/used_for_tracking=false
privacy/collected_data/credit_info/collection_purposes=0
privacy/collected_data/other_financial_info/collected=false
privacy/collected_data/other_financial_info/linked_to_user=false
privacy/collected_data/other_financial_info/used_for_tracking=false
privacy/collected_data/other_financial_info/collection_purposes=0
privacy/collected_data/precise_location/collected=false
privacy/collected_data/precise_location/linked_to_user=false
privacy/collected_data/precise_location/used_for_tracking=false
privacy/collected_data/precise_location/collection_purposes=0
privacy/collected_data/coarse_location/collected=false
privacy/collected_data/coarse_location/linked_to_user=false
privacy/collected_data/coarse_location/used_for_tracking=false
privacy/collected_data/coarse_location/collection_purposes=0
privacy/collected_data/sensitive_info/collected=false
privacy/collected_data/sensitive_info/linked_to_user=false
privacy/collected_data/sensitive_info/used_for_tracking=false
privacy/collected_data/sensitive_info/collection_purposes=0
privacy/collected_data/contacts/collected=false
privacy/collected_data/contacts/linked_to_user=false
privacy/collected_data/contacts/used_for_tracking=false
privacy/collected_data/contacts/collection_purposes=0
privacy/collected_data/emails_or_text_messages/collected=false
privacy/collected_data/emails_or_text_messages/linked_to_user=false
privacy/collected_data/emails_or_text_messages/used_for_tracking=false
privacy/collected_data/emails_or_text_messages/collection_purposes=0
privacy/collected_data/photos_or_videos/collected=false
privacy/collected_data/photos_or_videos/linked_to_user=false
privacy/collected_data/photos_or_videos/used_for_tracking=false
privacy/collected_data/photos_or_videos/collection_purposes=0
privacy/collected_data/audio_data/collected=false
privacy/collected_data/audio_data/linked_to_user=false
privacy/collected_data/audio_data/used_for_tracking=false
privacy/collected_data/audio_data/collection_purposes=0
privacy/collected_data/gameplay_content/collected=false
privacy/collected_data/gameplay_content/linked_to_user=false
privacy/collected_data/gameplay_content/used_for_tracking=false
privacy/collected_data/gameplay_content/collection_purposes=0
privacy/collected_data/customer_support/collected=false
privacy/collected_data/customer_support/linked_to_user=false
privacy/collected_data/customer_support/used_for_tracking=false
privacy/collected_data/customer_support/collection_purposes=0
privacy/collected_data/other_user_content/collected=false
privacy/collected_data/other_user_content/linked_to_user=false
privacy/collected_data/other_user_content/used_for_tracking=false
privacy/collected_data/other_user_content/collection_purposes=0
privacy/collected_data/browsing_history/collected=false
privacy/collected_data/browsing_history/linked_to_user=false
privacy/collected_data/browsing_history/used_for_tracking=false
privacy/collected_data/browsing_history/collection_purposes=0
privacy/collected_data/search_hhistory/collected=false
privacy/collected_data/search_hhistory/linked_to_user=false
privacy/collected_data/search_hhistory/used_for_tracking=false
privacy/collected_data/search_hhistory/collection_purposes=0
privacy/collected_data/user_id/collected=false
privacy/collected_data/user_id/linked_to_user=false
privacy/collected_data/user_id/used_for_tracking=false
privacy/collected_data/user_id/collection_purposes=0
privacy/collected_data/device_id/collected=false
privacy/collected_data/device_id/linked_to_user=false
privacy/collected_data/device_id/used_for_tracking=false
privacy/collected_data/device_id/collection_purposes=0
privacy/collected_data/purchase_history/collected=false
privacy/collected_data/purchase_history/linked_to_user=false
privacy/collected_data/purchase_history/used_for_tracking=false
privacy/collected_data/purchase_history/collection_purposes=0
privacy/collected_data/product_interaction/collected=false
privacy/collected_data/product_interaction/linked_to_user=false
privacy/collected_data/product_interaction/used_for_tracking=false
privacy/collected_data/product_interaction/collection_purposes=0
privacy/collected_data/advertising_data/collected=false
privacy/collected_data/advertising_data/linked_to_user=false
privacy/collected_data/advertising_data/used_for_tracking=false
privacy/collected_data/advertising_data/collection_purposes=0
privacy/collected_data/other_usage_data/collected=false
privacy/collected_data/other_usage_data/linked_to_user=false
privacy/collected_data/other_usage_data/used_for_tracking=false
privacy/collected_data/other_usage_data/collection_purposes=0
privacy/collected_data/crash_data/collected=false
privacy/collected_data/crash_data/linked_to_user=false
privacy/collected_data/crash_data/used_for_tracking=false
privacy/collected_data/crash_data/collection_purposes=0
privacy/collected_data/performance_data/collected=false
privacy/collected_data/performance_data/linked_to_user=false
privacy/collected_data/performance_data/used_for_tracking=false
privacy/collected_data/performance_data/collection_purposes=0
privacy/collected_data/other_diagnostic_data/collected=false
privacy/collected_data/other_diagnostic_data/linked_to_user=false
privacy/collected_data/other_diagnostic_data/used_for_tracking=false
privacy/collected_data/other_diagnostic_data/collection_purposes=0
privacy/collected_data/environment_scanning/collected=false
privacy/collected_data/environment_scanning/linked_to_user=false
privacy/collected_data/environment_scanning/used_for_tracking=false
privacy/collected_data/environment_scanning/collection_purposes=0
privacy/collected_data/hands/collected=false
privacy/collected_data/hands/linked_to_user=false
privacy/collected_data/hands/used_for_tracking=false
privacy/collected_data/hands/collection_purposes=0
privacy/collected_data/head/collected=false
privacy/collected_data/head/linked_to_user=false
privacy/collected_data/head/used_for_tracking=false
privacy/collected_data/head/collection_purposes=0
privacy/collected_data/other_data_types/collected=false
privacy/collected_data/other_data_types/linked_to_user=false
privacy/collected_data/other_data_types/used_for_tracking=false
privacy/collected_data/other_data_types/collection_purposes=0
ssh_remote_deploy/enabled=false
ssh_remote_deploy/host="user@host_ip"
ssh_remote_deploy/port="22"
ssh_remote_deploy/extra_args_ssh=""
ssh_remote_deploy/extra_args_scp=""
ssh_remote_deploy/run_script="#!/usr/bin/env bash
unzip -o -q \"{temp_dir}/{archive_name}\" -d \"{temp_dir}\"
open \"{temp_dir}/{exe_name}.app\" --args {cmd_args}"
ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash
kill $(pgrep -x -f \"{temp_dir}/{exe_name}.app/Contents/MacOS/{exe_name} {cmd_args}\")
rm -rf \"{temp_dir}\""
dotnet/include_scripts_content=false
dotnet/include_debug_symbols=false
dotnet/embed_build_outputs=false
[preset.1]
name="Windows (x86_64)"
platform="Windows Desktop"
runnable=true
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).exe"
patches=PackedStringArray()
encryption_include_filters=""
encryption_exclude_filters=""
seed=0
encrypt_pck=false
encrypt_directory=false
script_export_mode=2
[preset.1.options]
custom_template/debug=""
custom_template/release=""
debug/export_console_wrapper=0
binary_format/embed_pck=true
texture_format/s3tc_bptc=true
texture_format/etc2_astc=false
shader_baker/enabled=true
binary_format/architecture="x86_64"
codesign/enable=false
codesign/timestamp=true
codesign/timestamp_server_url=""
codesign/digest_algorithm=1
codesign/description=""
codesign/custom_options=PackedStringArray()
application/modify_resources=true
application/icon="uid://dd7lvnidxr5ss"
application/console_wrapper_icon=""
application/icon_interpolation=4
application/file_version=""
application/product_version=""
application/company_name=""
application/product_name=""
application/file_description=""
application/copyright="RPI Minds & Machines"
application/trademarks=""
application/export_angle=0
application/export_d3d12=0
application/d3d12_agility_sdk_multiarch=true
ssh_remote_deploy/enabled=false
ssh_remote_deploy/host="user@host_ip"
ssh_remote_deploy/port="22"
ssh_remote_deploy/extra_args_ssh=""
ssh_remote_deploy/extra_args_scp=""
ssh_remote_deploy/run_script="Expand-Archive -LiteralPath '{temp_dir}\\{archive_name}' -DestinationPath '{temp_dir}'
$action = New-ScheduledTaskAction -Execute '{temp_dir}\\{exe_name}' -Argument '{cmd_args}'
$trigger = New-ScheduledTaskTrigger -Once -At 00:00
$settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries
$task = New-ScheduledTask -Action $action -Trigger $trigger -Settings $settings
Register-ScheduledTask godot_remote_debug -InputObject $task -Force:$true
Start-ScheduledTask -TaskName godot_remote_debug
while (Get-ScheduledTask -TaskName godot_remote_debug | ? State -eq running) { Start-Sleep -Milliseconds 100 }
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue"
ssh_remote_deploy/cleanup_script="Stop-ScheduledTask -TaskName godot_remote_debug -ErrorAction:SilentlyContinue
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue
Remove-Item -Recurse -Force '{temp_dir}'"
dotnet/include_scripts_content=false
dotnet/include_debug_symbols=false
dotnet/embed_build_outputs=true
[preset.2]
name="Windows (arm64)"
platform="Windows Desktop"
runnable=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).exe"
patches=PackedStringArray()
encryption_include_filters=""
encryption_exclude_filters=""
seed=0
encrypt_pck=false
encrypt_directory=false
script_export_mode=2
[preset.2.options]
custom_template/debug=""
custom_template/release=""
debug/export_console_wrapper=0
binary_format/embed_pck=true
texture_format/s3tc_bptc=true
texture_format/etc2_astc=false
shader_baker/enabled=false
binary_format/architecture="arm64"
codesign/enable=false
codesign/timestamp=true
codesign/timestamp_server_url=""
codesign/digest_algorithm=1
codesign/description=""
codesign/custom_options=PackedStringArray()
application/modify_resources=true
application/icon="uid://dd7lvnidxr5ss"
application/console_wrapper_icon=""
application/icon_interpolation=4
application/file_version=""
application/product_version=""
application/company_name=""
application/product_name=""
application/file_description=""
application/copyright=""
application/trademarks=""
application/export_angle=0
application/export_d3d12=0
application/d3d12_agility_sdk_multiarch=true
ssh_remote_deploy/enabled=false
ssh_remote_deploy/host="user@host_ip"
ssh_remote_deploy/port="22"
ssh_remote_deploy/extra_args_ssh=""
ssh_remote_deploy/extra_args_scp=""
ssh_remote_deploy/run_script="Expand-Archive -LiteralPath '{temp_dir}\\{archive_name}' -DestinationPath '{temp_dir}'
$action = New-ScheduledTaskAction -Execute '{temp_dir}\\{exe_name}' -Argument '{cmd_args}'
$trigger = New-ScheduledTaskTrigger -Once -At 00:00
$settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries
$task = New-ScheduledTask -Action $action -Trigger $trigger -Settings $settings
Register-ScheduledTask godot_remote_debug -InputObject $task -Force:$true
Start-ScheduledTask -TaskName godot_remote_debug
while (Get-ScheduledTask -TaskName godot_remote_debug | ? State -eq running) { Start-Sleep -Milliseconds 100 }
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue"
ssh_remote_deploy/cleanup_script="Stop-ScheduledTask -TaskName godot_remote_debug -ErrorAction:SilentlyContinue
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue
Remove-Item -Recurse -Force '{temp_dir}'"
dotnet/include_scripts_content=false
dotnet/include_debug_symbols=false
dotnet/embed_build_outputs=true
[preset.3]
name="Linux (x86_64)"
platform="Linux"
runnable=true
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).out"
patches=PackedStringArray()
encryption_include_filters=""
encryption_exclude_filters=""
seed=0
encrypt_pck=false
encrypt_directory=false
script_export_mode=2
[preset.3.options]
custom_template/debug=""
custom_template/release=""
debug/export_console_wrapper=0
binary_format/embed_pck=true
texture_format/s3tc_bptc=true
texture_format/etc2_astc=false
shader_baker/enabled=false
binary_format/architecture="x86_64"
ssh_remote_deploy/enabled=false
ssh_remote_deploy/host="user@host_ip"
ssh_remote_deploy/port="22"
ssh_remote_deploy/extra_args_ssh=""
ssh_remote_deploy/extra_args_scp=""
ssh_remote_deploy/run_script="#!/usr/bin/env bash
export DISPLAY=:0
unzip -o -q \"{temp_dir}/{archive_name}\" -d \"{temp_dir}\"
\"{temp_dir}/{exe_name}\" {cmd_args}"
ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash
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=true
[preset.4]
name="Linux (arm64)"
platform="Linux"
runnable=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).out"
patches=PackedStringArray()
encryption_include_filters=""
encryption_exclude_filters=""
seed=0
encrypt_pck=false
encrypt_directory=false
script_export_mode=2
[preset.4.options]
custom_template/debug=""
custom_template/release=""
debug/export_console_wrapper=0
binary_format/embed_pck=true
texture_format/s3tc_bptc=true
texture_format/etc2_astc=false
shader_baker/enabled=false
binary_format/architecture="arm64"
ssh_remote_deploy/enabled=false
ssh_remote_deploy/host="user@host_ip"
ssh_remote_deploy/port="22"
ssh_remote_deploy/extra_args_ssh=""
ssh_remote_deploy/extra_args_scp=""
ssh_remote_deploy/run_script="#!/usr/bin/env bash
export DISPLAY=:0
unzip -o -q \"{temp_dir}/{archive_name}\" -d \"{temp_dir}\"
\"{temp_dir}/{exe_name}\" {cmd_args}"
ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash
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=true

BIN
icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

View File

@@ -2,16 +2,16 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://ebf78p6bpq5m" uid="uid://dd7lvnidxr5ss"
path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex" path="res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.ctex"
metadata={ metadata={
"vram_texture": false "vram_texture": false
} }
[deps] [deps]
source_file="res://icon.svg" source_file="res://icon.png"
dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"] dest_files=["res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.ctex"]
[params] [params]
@@ -38,6 +38,3 @@ process/hdr_as_srgb=false
process/hdr_clamp_exposure=false process/hdr_clamp_exposure=false
process/size_limit=0 process/size_limit=0
detect_3d/compress_to=1 detect_3d/compress_to=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128"><rect width="124" height="124" x="2" y="2" fill="#363d52" stroke="#212532" stroke-width="4" rx="14"/><g fill="#fff" transform="translate(12.322 12.322)scale(.101)"><path d="M105 673v33q407 354 814 0v-33z"/><path fill="#478cbf" d="m105 673 152 14q12 1 15 14l4 67 132 10 8-61q2-11 15-15h162q13 4 15 15l8 61 132-10 4-67q3-13 15-14l152-14V427q30-39 56-81-35-59-83-108-43 20-82 47-40-37-88-64 7-51 8-102-59-28-123-42-26 43-46 89-49-7-98 0-20-46-46-89-64 14-123 42 1 51 8 102-48 27-88 64-39-27-82-47-48 49-83 108 26 42 56 81zm0 33v39c0 276 813 276 814 0v-39l-134 12-5 69q-2 10-14 13l-162 11q-12 0-16-11l-10-65H446l-10 65q-4 11-16 11l-162-11q-12-3-14-13l-5-69z"/><path d="M483 600c0 34 58 34 58 0v-86c0-34-58-34-58 0z"/><circle cx="725" cy="526" r="90"/><circle cx="299" cy="526" r="90"/></g><g fill="#414042" transform="translate(12.322 12.322)scale(.101)"><circle cx="307" cy="532" r="60"/><circle cx="717" cy="532" r="60"/></g></svg>

Before

Width:  |  Height:  |  Size: 995 B

View File

@@ -10,15 +10,24 @@ config_version=5
[application] [application]
config/name="connect4-moderator-observer" config/name="Connect4 Moderator - Observer"
config/version="0.1.2"
run/main_scene="uid://dcx5nvs0pa7me" run/main_scene="uid://dcx5nvs0pa7me"
config/features=PackedStringArray("4.5", "C#", "Forward Plus") config/features=PackedStringArray("4.5", "C#", "Forward Plus")
config/icon="uid://ckmfi0cjgxgyk" boot_splash/image="uid://dd7lvnidxr5ss"
config/icon="uid://dd7lvnidxr5ss"
[autoload] [autoload]
Connection="*res://scripts/Connection.cs" 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] [dotnet]
project/assembly_name="connect4-moderator-observer" project/assembly_name="connect4-moderator-observer"
@@ -26,4 +35,7 @@ project/assembly_name="connect4-moderator-observer"
[rendering] [rendering]
textures/canvas_textures/default_texture_filter=0 textures/canvas_textures/default_texture_filter=0
renderer/rendering_method="gl_compatibility" 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

View File

@@ -1,13 +1,13 @@
[gd_scene load_steps=14 format=3 uid="uid://m542qwlp7hl7"] [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="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="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="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://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://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="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="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"] [sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_b3w8x"]
@@ -31,10 +31,8 @@ sources/0 = SubResource("TileSetAtlasSource_i2o8i")
atlas = ExtResource("3_1tlhv") atlas = ExtResource("3_1tlhv")
region = Rect2(112, 32, 16, 16) region = Rect2(112, 32, 16, 16)
[node name="BoardScreen" type="Node2D" node_paths=PackedStringArray("BackButton")] [node name="BoardScreen" type="Node2D"]
script = ExtResource("1_b3w8x") script = ExtResource("1_b3w8x")
BracketScene = ExtResource("2_u1oi2")
BackButton = NodePath("BracketButton")
[node name="Floor Collider" type="StaticBody2D" parent="."] [node name="Floor Collider" type="StaticBody2D" parent="."]
position = Vector2(0, 200) position = Vector2(0, 200)
@@ -77,6 +75,7 @@ position = Vector2(274, 0)
shape = SubResource("SegmentShape2D_i2o8i") shape = SubResource("SegmentShape2D_i2o8i")
[node name="Player1Card" type="Node2D" parent="."] [node name="Player1Card" type="Node2D" parent="."]
position = Vector2(0, 8)
[node name="Left" type="Sprite2D" parent="Player1Card"] [node name="Left" type="Sprite2D" parent="Player1Card"]
position = Vector2(-556, -300) position = Vector2(-556, -300)
@@ -123,6 +122,7 @@ theme_override_font_sizes/font_size = 8
text = "NOT READY" text = "NOT READY"
[node name="Player2Card" type="Node2D" parent="."] [node name="Player2Card" type="Node2D" parent="."]
position = Vector2(989, -64)
[node name="Left" type="Sprite2D" parent="Player2Card"] [node name="Left" type="Sprite2D" parent="Player2Card"]
position = Vector2(-556, -228) position = Vector2(-556, -228)
@@ -181,6 +181,7 @@ offset_left = -566.0
offset_top = 281.0 offset_top = 281.0
offset_right = -550.0 offset_right = -550.0
offset_bottom = 297.0 offset_bottom = 297.0
script = ExtResource("8_u1oi2")
[node name="Sprite2D" type="Sprite2D" parent="BracketButton"] [node name="Sprite2D" type="Sprite2D" parent="BracketButton"]
position = Vector2(8, 8) position = Vector2(8, 8)

View File

@@ -1,8 +1,8 @@
[gd_scene load_steps=5 format=3 uid="uid://rl33x81cxlh0"] [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="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="Texture2D" uid="uid://da13ksuf4vkqe" path="res://assets/sprites/observe.png" id="2_mbqc8"]
[ext_resource type="PackedScene" uid="uid://cr8fi0e4r88s8" path="res://scenes/game.tscn" id="3_1511b"] [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"] [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")] [node name="BracketView" type="Control" node_paths=PackedStringArray("Players", "Matches")]
@@ -15,8 +15,8 @@ grow_vertical = 2
script = ExtResource("1_dvj3m") script = ExtResource("1_dvj3m")
Players = NodePath("HBoxContainer/PlayerList") Players = NodePath("HBoxContainer/PlayerList")
Matches = NodePath("HBoxContainer/MatchList") Matches = NodePath("HBoxContainer/MatchList")
JoinButton = ExtResource("2_7c11m") WatchButton = ExtResource("2_mbqc8")
BoardScene = ExtResource("3_1511b") TerminateKickButton = ExtResource("3_as653")
[node name="ColorRect" type="ColorRect" parent="."] [node name="ColorRect" type="ColorRect" parent="."]
custom_minimum_size = Vector2(0, 36) custom_minimum_size = Vector2(0, 36)
@@ -26,7 +26,7 @@ anchor_right = 1.0
grow_horizontal = 2 grow_horizontal = 2
color = Color(0.13319641, 0.13319641, 0.13319638, 1) 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) custom_minimum_size = Vector2(0, 36)
layout_mode = 1 layout_mode = 1
anchors_preset = 10 anchors_preset = 10
@@ -36,6 +36,8 @@ grow_horizontal = 2
script = ExtResource("4_mbqc8") script = ExtResource("4_mbqc8")
BecomeAdmin = NodePath("BecomeAdmin") BecomeAdmin = NodePath("BecomeAdmin")
StartTournament = NodePath("StartTournament") StartTournament = NodePath("StartTournament")
Label = NodePath("Label")
Timeout = NodePath("HSlider")
[node name="BecomeAdmin" type="Button" parent="ColorRect/AdminControls"] [node name="BecomeAdmin" type="Button" parent="ColorRect/AdminControls"]
layout_mode = 2 layout_mode = 2
@@ -45,6 +47,21 @@ text = "Become Admin"
layout_mode = 2 layout_mode = 2
text = "Start Tournament" 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="."] [node name="HBoxContainer" type="HBoxContainer" parent="."]
layout_mode = 1 layout_mode = 1
anchors_preset = -1 anchors_preset = -1

View File

@@ -6,6 +6,8 @@ public partial class AdminControls : HBoxContainer
{ {
[Export] public Button BecomeAdmin; [Export] public Button BecomeAdmin;
[Export] public Button StartTournament; [Export] public Button StartTournament;
[Export] public Label Label;
[Export] public Slider Timeout;
public override void _Ready() public override void _Ready()
{ {
@@ -18,6 +20,31 @@ public partial class AdminControls : HBoxContainer
StartTournament.Hide(); 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; BecomeAdmin.Pressed += ShowAuthPopup;
} }
@@ -119,5 +146,7 @@ public partial class AdminControls : HBoxContainer
{ {
StartTournament.Show(); StartTournament.Show();
} }
Label.Show();
Timeout.Show();
} }
} }

18
scripts/BackButton.cs Normal file
View File

@@ -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);
}
}

View File

@@ -0,0 +1 @@
uid://b3q4gq63qmx23

View File

@@ -4,8 +4,6 @@ using System.Collections.Generic;
public partial class BoardScreen : Node2D { public partial class BoardScreen : Node2D {
[Export] public BaseButton BackButton;
private const string RED_CHIP_PATH = "res://scenes/red_chip.tscn"; 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 YELLOW_CHIP_PATH = "res://scenes/yellow_chip.tscn";
private const string BRACKET_SCENE_PATH = "res://scenes/bracket_view.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 CHIP_X_OFF = -(CHIP_SIZE + CHIP_PADDING) * 7 / 2 + (CHIP_SIZE + CHIP_PADDING) / 2;
private const int Y_OFF = 300; private const int Y_OFF = 300;
private const int CARD_CENTER_X_DEFAULT = -536; 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 redChip;
private PackedScene ylwChip; private PackedScene ylwChip;
@@ -23,6 +24,8 @@ public partial class BoardScreen : Node2D {
private Node2D player2Card; private Node2D player2Card;
private MatchData matchData; private MatchData matchData;
private List<(string, int)> moves;
private RigidBody2D[,] chips = new RigidBody2D[6, 7]; // 6 rows 7 cols | 0, 0 is top left 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. // Called when the node enters the scene tree for the first time.
@@ -41,18 +44,34 @@ public partial class BoardScreen : Node2D {
player1Card.GetNode<Label>("Name").Text = matchData.player1; player1Card.GetNode<Label>("Name").Text = matchData.player1;
player2Card.GetNode<Label>("Name").Text = matchData.player2; player2Card.GetNode<Label>("Name").Text = matchData.player2;
GetNode<TextureButton>("BracketButton").Pressed += TransitionToBracket;
Connection.Instance.OnObserveWin += ObserveWin; Connection.Instance.OnObserveWin += ObserveWin;
Connection.Instance.OnObserveDraw += ObserveDraw; Connection.Instance.OnObserveDraw += ObserveDraw;
Connection.Instance.OnObserveTerminated += ObserveTerminated; Connection.Instance.OnObserveTerminated += ObserveTerminated;
Connection.Instance.OnObserveMove += ObserveMove; Connection.Instance.OnObserveMove += ObserveMove;
Connection.Instance.OnTournamentEnd += ShowTournamentScoreboard; Connection.Instance.OnTournamentEnd += ShowTournamentScoreboard;
}
BackButton.Pressed += () => public override void _Process(double delta)
{ {
TransitionToBracket(); if (Connection.Instance.PreviousMoves.Count != 0 && currentTimeout <= 0.0f)
}; {
var move = Connection.Instance.PreviousMoves[0];
Connection.Instance.PreviousMoves.RemoveAt(0);
if (move.Item1 == matchData.player1)
{
spawnRed(move.Item2);
}
else
{
spawnYellow(move.Item2);
}
currentTimeout = MOVE_TIMEOUT_BEFORE_PLACE;
}
else if (currentTimeout >= 0.0f)
{
currentTimeout -= delta;
}
} }
public override void _ExitTree() public override void _ExitTree()
@@ -66,52 +85,41 @@ public partial class BoardScreen : Node2D {
private void ObserveMove(string username, int column) private void ObserveMove(string username, int column)
{ {
if (username == matchData.player1) Connection.Instance.PreviousMoves.Add((username, column));
{
spawnRed(column);
}
else
{
spawnYellow(column);
}
} }
private void ObserveWin(string winner) private void ObserveWin(string winner)
{ {
var popup = new Popup(); PopupMessage(winner + " wins!");
popup.AlwaysOnTop = true;
popup.PopupCentered();
popup.Size = new Vector2I(128, 128);
var text = new Label();
text.Text = winner + " wins!";
popup.AddChild(text);
GetTree().Root.AddChild(popup);
TransitionToBracket();
} }
private void ObserveDraw() private void ObserveDraw()
{ {
var popup = new Popup(); PopupMessage("Draw!");
popup.AlwaysOnTop = true;
popup.PopupCentered();
popup.Size = new Vector2I(128, 128);
var text = new Label();
text.Text = "Draw!";
popup.AddChild(text);
GetTree().Root.AddChild(popup);
TransitionToBracket();
} }
private void ObserveTerminated() private void ObserveTerminated()
{
PopupMessage("Match Terminated");
}
private void PopupMessage(string message)
{ {
var popup = new Popup(); var popup = new Popup();
popup.AlwaysOnTop = true; popup.AlwaysOnTop = true;
popup.PopupCentered(); popup.PopupCentered();
popup.Size = new Vector2I(128, 128); popup.Size = new Vector2I(200, 100);
var text = new Label(); var text = new Label();
text.Text = "Match Terminated"; text.Text = message;
popup.AddChild(text); popup.AddChild(text);
text.GrowHorizontal = Control.GrowDirection.Both;
text.GrowVertical = Control.GrowDirection.Both;
text.HorizontalAlignment = HorizontalAlignment.Center;
text.VerticalAlignment = VerticalAlignment.Center;
text.AnchorsPreset = (int) Control.LayoutPreset.FullRect;
popup.InitialPosition = Window.WindowInitialPosition.CenterMainWindowScreen;
GetTree().Root.AddChild(popup); GetTree().Root.AddChild(popup);
popup.Show();
TransitionToBracket(); TransitionToBracket();
} }
@@ -153,33 +161,6 @@ public partial class BoardScreen : Node2D {
GetTree().ChangeSceneToFile(BRACKET_SCENE_PATH); GetTree().ChangeSceneToFile(BRACKET_SCENE_PATH);
} }
// Called every frame. 'delta' is the elapsed time since the previous frame.
public override void _Process(double delta) {
/*
if(p1 != null) {
Label username = player1Card.GetNode<Label>("Name");
username.Text = p1.username;
if(p1.isReady) {
Label status = player1Card.GetNode<Label>("Status");
status.Text = "Ready!";
status.AddThemeColorOverride("font_color", Colors.LimeGreen);
}
}
if(p2 != null) {
Label username = player2Card.GetNode<Label>("Name");
username.Text = p2.username;
if(p2.isReady) {
Label status = player2Card.GetNode<Label>("Status");
status.Text = "Ready!";
status.AddThemeColorOverride("font_color", Colors.LimeGreen);
}
}
*/
}
/* /*
* Determines if the column can have a new chip placed * Determines if the column can have a new chip placed
* Will return -1 if invalid * Will return -1 if invalid

View File

@@ -6,7 +6,8 @@ public partial class BracketScene : Control
{ {
[Export] public Tree Players; [Export] public Tree Players;
[Export] public Tree Matches; [Export] public Tree Matches;
[Export] public Texture2D JoinButton; [Export] public Texture2D WatchButton;
[Export] public Texture2D TerminateKickButton;
private const string BOARD_SCENE_PATH = "res://scenes/game.tscn"; private const string BOARD_SCENE_PATH = "res://scenes/game.tscn";
private List<PlayerData> _playerList; private List<PlayerData> _playerList;
@@ -26,6 +27,7 @@ public partial class BracketScene : Control
Matches.SetColumnTitle(2, "Yellow"); Matches.SetColumnTitle(2, "Yellow");
Matches.HideRoot = true; Matches.HideRoot = true;
Matches.ButtonClicked += WatchGame; Matches.ButtonClicked += WatchGame;
Matches.ButtonClicked += TerminateGame;
Connection.Instance.OnUpdatedPlayers += UpdatePlayers; Connection.Instance.OnUpdatedPlayers += UpdatePlayers;
Connection.Instance.OnUpdatedMatches += UpdateMatches; Connection.Instance.OnUpdatedMatches += UpdateMatches;
@@ -52,7 +54,7 @@ public partial class BracketScene : Control
item.SetText(2, playerList[i].isPlaying ? "Yes" : "No"); item.SetText(2, playerList[i].isPlaying ? "Yes" : "No");
if (Connection.Instance.IsAdmin) if (Connection.Instance.IsAdmin)
{ {
item.AddButton(0, JoinButton, i, false, "Kick"); // TODO item.AddButton(0, TerminateKickButton, i, false, "Kick"); // TODO
} }
} }
} }
@@ -68,7 +70,11 @@ public partial class BracketScene : Control
item.SetText(0, matchList[i].matchId.ToString()); item.SetText(0, matchList[i].matchId.ToString());
item.SetText(1, matchList[i].player1); item.SetText(1, matchList[i].player1);
item.SetText(2, matchList[i].player2); item.SetText(2, matchList[i].player2);
item.AddButton(0, JoinButton, i, false, "Watch"); item.AddButton(0, WatchButton, item.GetButtonCount(0), false, "Watch");
if (Connection.Instance.IsAdmin)
{
item.AddButton(0, TerminateKickButton, item.GetButtonCount(0), false, "Terminate");
}
} }
} }
@@ -88,6 +94,14 @@ public partial class BracketScene : Control
} }
} }
private void TerminateGame(TreeItem item, long column, long id, long mouseButtonIndex)
{
if (mouseButtonIndex == 1 && column == 0 && id - 1 > 0 && _matchList[(int) id - 1] != null)
{
Connection.Instance.TerminateGame(_matchList[(int) id - 1].matchId);
}
}
private void TransitionToBoard() private void TransitionToBoard()
{ {
GetTree().ChangeSceneToFile(BOARD_SCENE_PATH); GetTree().ChangeSceneToFile(BOARD_SCENE_PATH);

View File

@@ -41,6 +41,8 @@ public partial class Connection : Node
public bool IsAdmin { get; private set; } public bool IsAdmin { get; private set; }
public bool IsPlayer { get; private set; } public bool IsPlayer { get; private set; }
public bool ActiveTournament { get; private set; } public bool ActiveTournament { get; private set; }
public List<(string, int)> PreviousMoves { get; private set; } = new List<(string, int)>();
public double CurrentWaitTimeout { get; private set; } = 5.0;
public MatchData CurrentObservingMatch { get; private set; } public MatchData CurrentObservingMatch { get; private set; }
@@ -218,15 +220,16 @@ public partial class Connection : Node
SendCommand("TOURNAMENT", "START"); SendCommand("TOURNAMENT", "START");
} }
public void TerminateGame() public void TerminateGame(int matchID)
{ {
if (!IsAdmin) return; if (!IsAdmin) return;
SendCommand("GAME", "TERMINATE"); SendCommand("GAME", "TERMINATE:" + matchID);
} }
public void SetTournamentWait(float waitTime) public void SetTournamentWait(float waitTime)
{ {
if (!IsAdmin) return; if (!IsAdmin) return;
CurrentWaitTimeout = waitTime;
SendCommand("TOURNAMENT", "WAIT:" + waitTime); SendCommand("TOURNAMENT", "WAIT:" + waitTime);
} }
@@ -305,6 +308,7 @@ public partial class Connection : Node
if (body == "AUTH:ACK") if (body == "AUTH:ACK")
{ {
IsAdmin = true; IsAdmin = true;
SetTournamentWait(5.0f);
OnBecomeAdmin?.Invoke(); OnBecomeAdmin?.Invoke();
} }
@@ -465,8 +469,24 @@ public partial class Connection : Node
OnUpdatedMatches?.Invoke(matches); OnUpdatedMatches?.Invoke(matches);
break; break;
case "WATCH": case "WATCH":
string[] game = segments[2].Split(","); CurrentObservingMatch = null;
CurrentObservingMatch = new MatchData(int.Parse(game[0]), game[1], game[2]); PreviousMoves.Clear();
string[] activeMatchData = segments[2].Split("|");
if (activeMatchData.IsEmpty())
{
string[] matchData = segments[2].Split(',');
CurrentObservingMatch = new MatchData(int.Parse(matchData[0]), matchData[1], matchData[2]);
}
else
{
string[] matchData = activeMatchData[0].Split(',');
CurrentObservingMatch = new MatchData(int.Parse(matchData[0]), matchData[1], matchData[2]);
for (int i = 1; i < activeMatchData.Length; i++)
{
string[] moveData = activeMatchData[i].Split(',');
PreviousMoves.Add((moveData[0], int.Parse(moveData[1])));
}
}
OnWatchGameAck?.Invoke(); OnWatchGameAck?.Invoke();
break; break;
default: default: