refactor: simplify lobby server architecture and update app metadata

* remove legacy data bridge, RPC, and server bootstrap files
* simplify lobby scene and node hierarchy
* rename lobby UI scene path and update signal handlers
* replace the application icon and configure the boot splash
* add project description and version metadata
This commit is contained in:
2026-08-12 16:38:38 -05:00
parent 2ac444162f
commit 3fcabe1a53
22 changed files with 74 additions and 50 deletions

View File

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

View File

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

View File

@@ -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": "",

View File

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

View File

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

View File

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

View File

@@ -1 +0,0 @@
extends Node

View File

@@ -1 +0,0 @@
uid://6sfwe1hwgf0g