Add direct-connect multiplayer foundation

This commit is contained in:
Alexander Sellite 2026-07-29 15:01:46 -04:00
parent 9e9850dd20
commit 24f8263175
36 changed files with 2633 additions and 45 deletions

View file

@ -0,0 +1,34 @@
class_name NetworkTransport
extends Node
signal transport_error(message: String)
var _peer: MultiplayerPeer
var _route_description: String = ""
func start_host(
_port: int,
_max_clients: int,
_bind_address: String = "*",
) -> Error:
return ERR_UNAVAILABLE
func connect_to_route(_route: ConnectionRoute) -> Error:
return ERR_UNAVAILABLE
func disconnect_transport() -> void:
if _peer != null:
_peer.close()
_peer = null
_route_description = ""
func get_multiplayer_peer() -> MultiplayerPeer:
return _peer
func get_route_description() -> String:
return _route_description