Compare commits
2 Commits
@@ -3,7 +3,6 @@
|
||||
name="macOS"
|
||||
platform="macOS"
|
||||
runnable=true
|
||||
advanced_options=true
|
||||
dedicated_server=false
|
||||
custom_features=""
|
||||
export_filter="all_resources"
|
||||
@@ -11,6 +10,11 @@ include_filter=""
|
||||
exclude_filter=""
|
||||
export_path="../../Downloads/connect4-moderator-observer.dmg"
|
||||
patches=PackedStringArray()
|
||||
patch_delta_encoding=false
|
||||
patch_delta_compression_level_zstd=19
|
||||
patch_delta_min_reduction=0.1
|
||||
patch_delta_include_filters="*"
|
||||
patch_delta_exclude_filters=""
|
||||
encryption_include_filters=""
|
||||
encryption_exclude_filters=""
|
||||
seed=0
|
||||
@@ -25,6 +29,7 @@ binary_format/architecture="universal"
|
||||
custom_template/debug=""
|
||||
custom_template/release=""
|
||||
debug/export_console_wrapper=0
|
||||
application/liquid_glass_icon="res://icon.icon"
|
||||
application/icon="uid://dd7lvnidxr5ss"
|
||||
application/icon_interpolation=0
|
||||
application/bundle_identifier="com.abunchofknowitalls.connect4"
|
||||
@@ -32,7 +37,7 @@ application/signature=""
|
||||
application/app_category="Games"
|
||||
application/short_version=""
|
||||
application/version=""
|
||||
application/copyright="RPI Minds and Machines"
|
||||
application/copyright="RPI Minds & Machines"
|
||||
application/copyright_localized={}
|
||||
application/min_macos_version_x86_64="10.12"
|
||||
application/min_macos_version_arm64="11.00"
|
||||
@@ -185,10 +190,10 @@ 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/search_history/collected=false
|
||||
privacy/collected_data/search_history/linked_to_user=false
|
||||
privacy/collected_data/search_history/used_for_tracking=false
|
||||
privacy/collected_data/search_history/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
|
||||
@@ -255,13 +260,16 @@ rm -rf \"{temp_dir}\""
|
||||
dotnet/include_scripts_content=false
|
||||
dotnet/include_debug_symbols=false
|
||||
dotnet/embed_build_outputs=false
|
||||
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
|
||||
|
||||
[preset.1]
|
||||
|
||||
name="Windows (x86_64)"
|
||||
platform="Windows Desktop"
|
||||
runnable=true
|
||||
advanced_options=true
|
||||
dedicated_server=false
|
||||
custom_features=""
|
||||
export_filter="all_resources"
|
||||
@@ -269,6 +277,11 @@ include_filter=""
|
||||
exclude_filter=""
|
||||
export_path="../../Downloads/connect4-moderator-observer (win-x86_64).exe"
|
||||
patches=PackedStringArray()
|
||||
patch_delta_encoding=false
|
||||
patch_delta_compression_level_zstd=19
|
||||
patch_delta_min_reduction=0.1
|
||||
patch_delta_include_filters="*"
|
||||
patch_delta_exclude_filters=""
|
||||
encryption_include_filters=""
|
||||
encryption_exclude_filters=""
|
||||
seed=0
|
||||
@@ -332,7 +345,6 @@ dotnet/embed_build_outputs=true
|
||||
name="Windows (arm64)"
|
||||
platform="Windows Desktop"
|
||||
runnable=false
|
||||
advanced_options=true
|
||||
dedicated_server=false
|
||||
custom_features=""
|
||||
export_filter="all_resources"
|
||||
@@ -340,6 +352,11 @@ include_filter=""
|
||||
exclude_filter=""
|
||||
export_path="../../Downloads/connect4-moderator-observer (win-arm64).exe"
|
||||
patches=PackedStringArray()
|
||||
patch_delta_encoding=false
|
||||
patch_delta_compression_level_zstd=19
|
||||
patch_delta_min_reduction=0.1
|
||||
patch_delta_include_filters="*"
|
||||
patch_delta_exclude_filters=""
|
||||
encryption_include_filters=""
|
||||
encryption_exclude_filters=""
|
||||
seed=0
|
||||
@@ -403,7 +420,6 @@ dotnet/embed_build_outputs=true
|
||||
name="Linux (x86_64)"
|
||||
platform="Linux"
|
||||
runnable=true
|
||||
advanced_options=true
|
||||
dedicated_server=false
|
||||
custom_features=""
|
||||
export_filter="all_resources"
|
||||
@@ -411,6 +427,11 @@ include_filter=""
|
||||
exclude_filter=""
|
||||
export_path="../../Downloads/connect4-moderator-observer (linux-x86_64).out"
|
||||
patches=PackedStringArray()
|
||||
patch_delta_encoding=false
|
||||
patch_delta_compression_level_zstd=19
|
||||
patch_delta_min_reduction=0.1
|
||||
patch_delta_include_filters="*"
|
||||
patch_delta_exclude_filters=""
|
||||
encryption_include_filters=""
|
||||
encryption_exclude_filters=""
|
||||
seed=0
|
||||
@@ -449,7 +470,6 @@ dotnet/embed_build_outputs=true
|
||||
name="Linux (arm64)"
|
||||
platform="Linux"
|
||||
runnable=false
|
||||
advanced_options=true
|
||||
dedicated_server=false
|
||||
custom_features=""
|
||||
export_filter="all_resources"
|
||||
@@ -457,6 +477,11 @@ include_filter=""
|
||||
exclude_filter=""
|
||||
export_path="../../Downloads/connect4-moderator-observer (linux-arm64).out"
|
||||
patches=PackedStringArray()
|
||||
patch_delta_encoding=false
|
||||
patch_delta_compression_level_zstd=19
|
||||
patch_delta_min_reduction=0.1
|
||||
patch_delta_include_filters="*"
|
||||
patch_delta_exclude_filters=""
|
||||
encryption_include_filters=""
|
||||
encryption_exclude_filters=""
|
||||
seed=0
|
||||
|
||||
@@ -8,12 +8,16 @@
|
||||
|
||||
config_version=5
|
||||
|
||||
[animation]
|
||||
|
||||
compatibility/default_parent_skeleton_in_mesh_instance_3d=true
|
||||
|
||||
[application]
|
||||
|
||||
config/name="Connect4 Observer"
|
||||
config/version="0.2.0"
|
||||
config/version="1.0.1"
|
||||
run/main_scene="uid://dcx5nvs0pa7me"
|
||||
config/features=PackedStringArray("4.5", "C#", "Forward Plus")
|
||||
config/features=PackedStringArray("4.6", "C#", "Forward Plus")
|
||||
boot_splash/image="uid://dd7lvnidxr5ss"
|
||||
config/icon="uid://dd7lvnidxr5ss"
|
||||
|
||||
|
||||
@@ -20,10 +20,10 @@ metadata/_snap_enabled = true
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -659.0
|
||||
offset_top = -558.0
|
||||
offset_right = 619.0
|
||||
offset_bottom = 466.0
|
||||
offset_left = -658.0
|
||||
offset_top = -547.0
|
||||
offset_right = 668.0
|
||||
offset_bottom = 657.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
texture = SubResource("GradientTexture2D_yqjtg")
|
||||
|
||||
@@ -58,6 +58,7 @@ public partial class Connection : Node
|
||||
private bool _connected = false;
|
||||
private List<(string, int)> _lastScoreboard = [];
|
||||
private bool _shouldShowTournamentResults = false;
|
||||
private float _refreshGamePlayerListTimer = 5.0f;
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
@@ -83,11 +84,6 @@ public partial class Connection : Node
|
||||
}
|
||||
}
|
||||
|
||||
public override void _ExitTree()
|
||||
{
|
||||
StopGameListRefreshLoop();
|
||||
}
|
||||
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
_webSocket.Poll();
|
||||
@@ -100,7 +96,18 @@ public partial class Connection : Node
|
||||
_connected = true;
|
||||
LastError = "";
|
||||
OnWsConnectionSuccess?.Invoke();
|
||||
StartGameListRefreshLoop();
|
||||
UpdateGameList();
|
||||
UpdatePlayerList();
|
||||
_refreshGamePlayerListTimer = 5.0f;
|
||||
} else if (_refreshGamePlayerListTimer <= 0.0f)
|
||||
{
|
||||
UpdateGameList();
|
||||
UpdatePlayerList();
|
||||
_refreshGamePlayerListTimer = 5.0f;
|
||||
}
|
||||
else
|
||||
{
|
||||
_refreshGamePlayerListTimer -= (float) delta;
|
||||
}
|
||||
|
||||
while (_webSocket.GetAvailablePacketCount() > 0)
|
||||
@@ -144,7 +151,7 @@ public partial class Connection : Node
|
||||
CurrentWaitTimeout = 5.0;
|
||||
ActiveTournament = false;
|
||||
DemoMode = false;
|
||||
StopGameListRefreshLoop();
|
||||
_refreshGamePlayerListTimer = 5.0f;
|
||||
var code = _webSocket.GetCloseCode();
|
||||
var reason = _webSocket.GetCloseReason();
|
||||
LastError = "Unexpected Disconnect. Reason: " + reason + ", Code: " + code;
|
||||
@@ -190,45 +197,6 @@ public partial class Connection : Node
|
||||
SendCommand("GAME", "LIST");
|
||||
}
|
||||
|
||||
private void StartGameListRefreshLoop()
|
||||
{
|
||||
if (_gameListThreadRunning)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_gameListThreadRunning = true;
|
||||
_gameListThread = new Thread(() =>
|
||||
{
|
||||
while (_gameListThreadRunning)
|
||||
{
|
||||
if (IsSocketOpen)
|
||||
{
|
||||
UpdateGameList();
|
||||
UpdatePlayerList();
|
||||
}
|
||||
|
||||
Thread.Sleep(TimeSpan.FromSeconds(5));
|
||||
}
|
||||
})
|
||||
{
|
||||
IsBackground = true
|
||||
};
|
||||
_gameListThread.Start();
|
||||
}
|
||||
|
||||
private void StopGameListRefreshLoop()
|
||||
{
|
||||
if (!_gameListThreadRunning)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_gameListThreadRunning = false;
|
||||
_gameListThread?.Join();
|
||||
_gameListThread = null;
|
||||
}
|
||||
|
||||
public void UpdatePlayerList()
|
||||
{
|
||||
SendCommand("PLAYER", "LIST");
|
||||
@@ -433,8 +401,8 @@ public partial class Connection : Node
|
||||
}
|
||||
case "START":
|
||||
{
|
||||
OnStartTournamentAck?.Invoke();
|
||||
ActiveTournament = true;
|
||||
OnStartTournamentAck?.Invoke();
|
||||
break;
|
||||
}
|
||||
case "CANCEL":
|
||||
|
||||
Reference in New Issue
Block a user