diff --git a/icon.svg b/icon.svg
index c6bbb7d..8d0e468 100644
--- a/icon.svg
+++ b/icon.svg
@@ -1 +1,5 @@
-
+
+
\ No newline at end of file
diff --git a/server.gd b/lobby.gd
similarity index 100%
rename from server.gd
rename to lobby.gd
diff --git a/server.gd.uid b/lobby.gd.uid
similarity index 100%
rename from server.gd.uid
rename to lobby.gd.uid
diff --git a/server.tscn b/lobby.tscn
similarity index 68%
rename from server.tscn
rename to lobby.tscn
index 222bec1..ec16a04 100644
--- a/server.tscn
+++ b/lobby.tscn
@@ -1,12 +1,12 @@
[gd_scene load_steps=3 format=3 uid="uid://b0cqo3qo62y6n"]
-[ext_resource type="Script" uid="uid://chu1htrspx5su" path="res://server.gd" id="1_ob30c"]
-[ext_resource type="PackedScene" uid="uid://dy51wny4x53f4" path="res://scenes/data_bridge/bridge.tscn" id="2_h8t3n"]
+[ext_resource type="Script" uid="uid://chu1htrspx5su" path="res://lobby.gd" id="1_ob30c"]
+[ext_resource type="PackedScene" uid="uid://dy51wny4x53f4" path="res://scenes/data/data_bridge.tscn" id="2_h8t3n"]
-[node name="server" type="Node"]
+[node name="lobby" type="Node"]
editor_description = "Note: The root node needs to match game's client root node in order for proper sync talk."
script = ExtResource("1_ob30c")
-[node name="bridge" parent="." instance=ExtResource("2_h8t3n")]
+[node name="data_bridge" parent="." instance=ExtResource("2_h8t3n")]
[node name="scene" type="Node" parent="."]
diff --git a/project.godot b/project.godot
index 52cf63e..57c92a3 100644
--- a/project.godot
+++ b/project.godot
@@ -11,9 +11,14 @@ config_version=5
[application]
config/name="Lobby Server"
+config/description="A lobby server to handle starting up a game with given game arguments."
+config/version="0.1.0"
run/main_scene="uid://b0cqo3qo62y6n"
config/features=PackedStringArray("4.5", "GL Compatibility")
+boot_splash/bg_color=Color(0, 0, 0, 1)
+boot_splash/image="uid://3buyfmedy0qs"
config/icon="res://icon.svg"
+boot_splash/minimum_display_time=2500
[autoload]
diff --git a/scenes/data_bridge/bridge.tscn b/scenes/data/data_bridge.tscn
similarity index 67%
rename from scenes/data_bridge/bridge.tscn
rename to scenes/data/data_bridge.tscn
index e06f40d..8ef7c85 100644
--- a/scenes/data_bridge/bridge.tscn
+++ b/scenes/data/data_bridge.tscn
@@ -1,11 +1,11 @@
[gd_scene load_steps=5 format=3 uid="uid://dy51wny4x53f4"]
-[ext_resource type="Script" uid="uid://dbnl4tjahkoun" path="res://scenes/data_bridge/game_data.gd" id="1_l6w8l"]
-[ext_resource type="Script" uid="uid://65x4bq2wsh8k" path="res://scenes/data_bridge/game_state.gd" id="2_6ash1"]
-[ext_resource type="Script" uid="uid://dyq4p5e06ib14" path="res://scenes/data_bridge/lobby_data.gd" id="3_l6w8l"]
-[ext_resource type="Script" uid="uid://uyimqfjmuc34" path="res://scenes/data_bridge/multiplayer_data.gd" id="4_gcm58"]
+[ext_resource type="Script" uid="uid://dbnl4tjahkoun" path="res://scenes/data/game_data.gd" id="1_l6w8l"]
+[ext_resource type="Script" uid="uid://65x4bq2wsh8k" path="res://scenes/data/game_state.gd" id="2_6ash1"]
+[ext_resource type="Script" uid="uid://dyq4p5e06ib14" path="res://scenes/data/lobby_data.gd" id="3_l6w8l"]
+[ext_resource type="Script" uid="uid://uyimqfjmuc34" path="res://scenes/data/multiplayer_data.gd" id="4_gcm58"]
-[node name="bridge" type="Node"]
+[node name="data_bridge" type="Node"]
[node name="game_data" type="Node" parent="."]
script = ExtResource("1_l6w8l")
@@ -16,5 +16,5 @@ script = ExtResource("2_6ash1")
[node name="lobby_data" type="Node" parent="."]
script = ExtResource("3_l6w8l")
-[node name="multiplayer" type="Node" parent="."]
+[node name="multiplayer_data" type="Node" parent="."]
script = ExtResource("4_gcm58")
diff --git a/scenes/data_bridge/game_data.gd b/scenes/data/game_data.gd
similarity index 100%
rename from scenes/data_bridge/game_data.gd
rename to scenes/data/game_data.gd
diff --git a/scenes/data_bridge/game_data.gd.uid b/scenes/data/game_data.gd.uid
similarity index 100%
rename from scenes/data_bridge/game_data.gd.uid
rename to scenes/data/game_data.gd.uid
diff --git a/scenes/data_bridge/game_state.gd b/scenes/data/game_state.gd
similarity index 54%
rename from scenes/data_bridge/game_state.gd
rename to scenes/data/game_state.gd
index 1a16c31..0881a63 100644
--- a/scenes/data_bridge/game_state.gd
+++ b/scenes/data/game_state.gd
@@ -1,16 +1,17 @@
class_name GameState extends Node
+
+
func _init() -> void:
Globals.game_state = self
func set_game_scene(scene_str: String) -> void:
- # NOTE: 'node_pth_str' needs to match game node structure else server sync throws errors.
- var node_pth_str = "billiards/scene"
- var scene = load(scene_str).instantiate()
- var target = get_tree().root.get_node(node_pth_str)
- scene.name = "lobby_screen"
+ var scene = load(scene_str).instantiate()
+ var target = get_tree().root.find_child("scene", true, false)
+
+ scene.name = "lobby_screen"
clear_game_scene(target)
diff --git a/scenes/data_bridge/game_state.gd.uid b/scenes/data/game_state.gd.uid
similarity index 100%
rename from scenes/data_bridge/game_state.gd.uid
rename to scenes/data/game_state.gd.uid
diff --git a/scenes/data_bridge/lobby_data.gd b/scenes/data/lobby_data.gd
similarity index 98%
rename from scenes/data_bridge/lobby_data.gd
rename to scenes/data/lobby_data.gd
index d8f23c7..a881d12 100644
--- a/scenes/data_bridge/lobby_data.gd
+++ b/scenes/data/lobby_data.gd
@@ -1,10 +1,9 @@
class_name LobbyData extends Node
-var uuid = null
-var lobby_ui: Node = null
-
+var uuid = null
var IS_VALID_CHARS_REGEX: RegEx = RegEx.create_from_string("^[a-zA-Z0-9]+$")
+
const MATCH_TYPES: Array = ["8ball", "9ball", "snooker", "freeball"]
const CLIENT_DICT: Dictionary = {
"id": "",
diff --git a/scenes/data_bridge/lobby_data.gd.uid b/scenes/data/lobby_data.gd.uid
similarity index 100%
rename from scenes/data_bridge/lobby_data.gd.uid
rename to scenes/data/lobby_data.gd.uid
diff --git a/scenes/data_bridge/multiplayer_data.gd b/scenes/data/multiplayer_data.gd
similarity index 100%
rename from scenes/data_bridge/multiplayer_data.gd
rename to scenes/data/multiplayer_data.gd
diff --git a/scenes/data_bridge/multiplayer_data.gd.uid b/scenes/data/multiplayer_data.gd.uid
similarity index 100%
rename from scenes/data_bridge/multiplayer_data.gd.uid
rename to scenes/data/multiplayer_data.gd.uid
diff --git a/scenes/screens/lobby_screen/lobby.gd b/scenes/screens/lobby_screen/lobby.gd
index 670919f..3d10e66 100644
--- a/scenes/screens/lobby_screen/lobby.gd
+++ b/scenes/screens/lobby_screen/lobby.gd
@@ -1,11 +1,8 @@
class_name Lobby extends LobbyBase
-@onready var rpc_signals: Node = $rpc_signals
-
func _ready() -> void:
- Globals.lobby_data.lobby_ui = self
setup_signals()
func _exit_tree() -> void:
diff --git a/scenes/screens/lobby_screen/lobby.tscn b/scenes/screens/lobby_screen/lobby.tscn
index 535d647..1c728dc 100644
--- a/scenes/screens/lobby_screen/lobby.tscn
+++ b/scenes/screens/lobby_screen/lobby.tscn
@@ -1,34 +1,23 @@
-[gd_scene load_steps=5 format=3 uid="uid://dkes5cdu45q6e"]
+[gd_scene load_steps=4 format=3 uid="uid://dkes5cdu45q6e"]
[ext_resource type="Script" uid="uid://dk7afnf7ol7dy" path="res://scenes/screens/lobby_screen/lobby.gd" id="1_hhiik"]
-[ext_resource type="PackedScene" uid="uid://rb6av5eg4u0" path="res://scenes/ui_controls/lobby_screen/lobby_ui.tscn" id="2_lqt48"]
-[ext_resource type="Script" uid="uid://6sfwe1hwgf0g" path="res://scenes/screens/lobby_screen/lobby_rpc.gd" id="3_rurl6"]
+[ext_resource type="PackedScene" uid="uid://rb6av5eg4u0" path="res://scenes/ui_controls/lobby/ui.tscn" id="2_lqt48"]
[ext_resource type="Script" uid="uid://crbm3v4td6du6" path="res://scenes/screens/lobby_screen/lobby_server.gd" id="4_glu7g"]
-[node name="lobby_screen" type="Control"]
-layout_mode = 3
-anchors_preset = 15
-anchor_right = 1.0
-anchor_bottom = 1.0
-grow_horizontal = 2
-grow_vertical = 2
+[node name="lobby" type="Node"]
script = ExtResource("1_hhiik")
[node name="ui" parent="." instance=ExtResource("2_lqt48")]
-layout_mode = 1
theme_override_constants/margin_left = 10
theme_override_constants/margin_top = 10
theme_override_constants/margin_right = 10
theme_override_constants/margin_bottom = 10
-[node name="rpc_signals" type="Node" parent="."]
-script = ExtResource("3_rurl6")
-
[node name="server" type="Node" parent="."]
script = ExtResource("4_glu7g")
[connection signal="pressed" from="ui/body/left_body/server_host_hbox/host_start_bttn" to="." method="_on_host_start_bttn_pressed"]
[connection signal="pressed" from="ui/body/left_body/server_host_hbox/host_stop_bttn" to="." method="_on_host_stop_bttn_pressed"]
-[connection signal="button_up" from="ui/body/left_body/search_vbox/search_hbox/match_search_bttn" to="." method="_on_match_search_bttn_button_up"]
+[connection signal="pressed" from="ui/body/left_body/search_vbox/search_hbox/match_search_bttn" to="." method="_on_match_search_bttn_pressed"]
[editable path="ui"]
diff --git a/scenes/screens/lobby_screen/lobby_base.gd b/scenes/screens/lobby_screen/lobby_base.gd
index c59bd4e..5641b3c 100644
--- a/scenes/screens/lobby_screen/lobby_base.gd
+++ b/scenes/screens/lobby_screen/lobby_base.gd
@@ -1,4 +1,4 @@
-class_name LobbyBase extends Control
+class_name LobbyBase extends Node
const MATCH_ENTRY = preload("res://scenes/screens/lobby_screen/match_entry.tscn")
@@ -15,12 +15,6 @@ const MATCH_ENTRY = preload("res://scenes/screens/lobby_
@onready var server: Node = $server
-
-func _on_home_bttn_pressed() -> void:
- Globals.game_state.set_game_scene(
- "res://scenes/screens/start_screen/start.tscn"
- )
-
func _on_host_start_bttn_pressed() -> void:
server.start_server(host_address_input.text, int(host_port_range.value))
@@ -32,8 +26,5 @@ func _on_host_stop_bttn_pressed() -> void:
host_start_bttn.visible = true
host_stop_bttn.visible = false
-func _on_search_bttn_pressed() -> void:
- pass
-
-func _on_match_search_bttn_button_up() -> void:
+func _on_match_search_bttn_pressed() -> void:
pass
diff --git a/scenes/screens/lobby_screen/lobby_rpc.gd b/scenes/screens/lobby_screen/lobby_rpc.gd
deleted file mode 100644
index 61510e1..0000000
--- a/scenes/screens/lobby_screen/lobby_rpc.gd
+++ /dev/null
@@ -1 +0,0 @@
-extends Node
diff --git a/scenes/screens/lobby_screen/lobby_rpc.gd.uid b/scenes/screens/lobby_screen/lobby_rpc.gd.uid
deleted file mode 100644
index fa8f290..0000000
--- a/scenes/screens/lobby_screen/lobby_rpc.gd.uid
+++ /dev/null
@@ -1 +0,0 @@
-uid://6sfwe1hwgf0g
diff --git a/scenes/ui_controls/lobby_screen/lobby_ui.tscn b/scenes/ui_controls/lobby/ui.tscn
similarity index 100%
rename from scenes/ui_controls/lobby_screen/lobby_ui.tscn
rename to scenes/ui_controls/lobby/ui.tscn
diff --git a/splash.png b/splash.png
new file mode 100644
index 0000000..3091fd6
Binary files /dev/null and b/splash.png differ
diff --git a/splash.png.import b/splash.png.import
new file mode 100644
index 0000000..0acbc1e
--- /dev/null
+++ b/splash.png.import
@@ -0,0 +1,40 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://3buyfmedy0qs"
+path="res://.godot/imported/splash.png-929ed8a00b89ba36c51789452f874c77.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://splash.png"
+dest_files=["res://.godot/imported/splash.png-929ed8a00b89ba36c51789452f874c77.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=false
+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