refactor: improve multiplayer connection lifecycle

* Move client/server connection handling into game-specific networking classes
* Add multiplayer data reset for disconnected clients
* Clean up invalid MessageBus listeners after disconnects
* Persist lobby host address and port in game data
* Standardize the default server port to 8080
* Increase server address input length to support valid addresses
* Remove obsolete connection and match initialization logic from base networking
This commit is contained in:
2026-08-10 00:40:45 -05:00
parent 93a2be399c
commit 26dcfe0d1b
8 changed files with 59 additions and 32 deletions

View File

@@ -8,6 +8,7 @@ func start_client(address: String = "127.0.0.1", port: int = 8080) -> void:
if peer: return
push_warning("Client Starting... Address: ", address, " Port: ", port)
# TODO: Add throbber or other indication of connection attempt.
peer = ENetMultiplayerPeer.new()
peer.create_client(address, port)