Godot Version
4.6.2
Question
I’ve been doing some tests for my game, Monkanics, as the multiplayer hasn’t been working.
So, I broke it down to the bare minimum and I found the root of the problem: Packets sent get blocked in transit and don’t reach the other client’s machine.
My current test setup uses PacketPeerUDP to send a singular string ("Message Sent") that prints in the client’s debug menu after they connect to my IP and port.
At least, that’s how it should work in theory, but clearly it doesn’t.
The relevant code is the following (Minus my IP and port):
var Demetrius_Server_IP : String
var Demetrius_Port : int
var Server_Packet_Peer : PacketPeerUDP
var Client_Packet_Peer : PacketPeerUDP
func _ready() -> void:
set_process(false)
if OS.has_feature("dedicated_server"):
Server_Packet_Peer = PacketPeerUDP.new()
if not OS.has_feature("dedicated_server"):
Client_Packet_Peer = PacketPeerUDP.new()
Client_Packet_Peer.bind(Demetrius_Port)
set_process(true)
func _process(delta: float) -> void:
if OS.has_feature("dedicated_server"):
send_packet()
if not OS.has_feature("dedicated_server"):
receive_packet()
func send_packet() -> void:
if OS.has_feature("dedicated_server"):
Server_Packet_Peer.set_dest_address(Demetrius_Server_IP, Demetrius_Port)
Server_Packet_Peer.put_packet("Message Sent".to_utf8_buffer())
func receive_packet() -> void:
if not OS.has_feature("dedicated_server"):
if Client_Packet_Peer.get_available_packet_count() > 0:
var array_bytes := Client_Packet_Peer.get_packet()
var packet_string := array_bytes.get_string_from_ascii()
print("Received message: ", packet_string)
This is the simplest setup I could make in Godot, so I know the issue is due to my lack of understanding. Most likely a fundamental networking concept.
From my testing with others on the Monkanics discord, I know the problem ISN’T the following:
- The
dedicated_serverfeature tag is applied properly on each export and in the code. - The server is successfully created and it sends packets.
- The port is in the acceptable range of between 1024–49151.
- The IP I used is my real public IPv4 and it doesn’t change.
I can also provide a project file if needed.
Any theories and help would be appreciated.

