M
Matti Paalanen
Greetings!
I have question regarding udp-communications.
I've made a simple Gravity Force -style game with netgame option using
UDP but I'm having strange problems with connections. I first tested
the network-game by spawning two different instances of the game
program on my computer and then made the connection between them using
my local ip. Game worked fine.
But when I try to play the game with friends over internet, strange
problems evolve: When a friend of mine hosts the game and opens a
port, messages I send arrive safely without any problems, but none of
the messages he sends arrive to my end. The host checks the ip from
the first arriving packet and uses it in the communication.
(DatagramPacket in and in.getAddress()) The port all clients are using
as the receiving one is 44444 and this is hardcoded into server also.
Well, we tried different combinations with a few friends, and then
suddenly two of them were able to estabilish communication and were
able to play the game normally. Two other couldn't get any of the
messages to arrive.
I also made TCP version, and none of us had any problems with
connections, but the game was of course pretty laggy, so UDP is the
only reasonable choice.
Another weird thing (at least I think it's weird) is that I can ping
and traceroute the friends from whom i can't receive any packets, and
they can ping and traceroute me.
So what would be the best way to advance from here? My software
firewall never complains about any messages, so it's quite evident
that the messages stop at my friends host when going outwards, or at
my host before coming to my adsl-modem. I don't know much about
restrictions and port-politics, so should I change the port numbers or
what would be the reason for this kind of lack blocking? Is it common
that UDP traffic is completely cut off this way?
-Matti Paalanen
I have question regarding udp-communications.
I've made a simple Gravity Force -style game with netgame option using
UDP but I'm having strange problems with connections. I first tested
the network-game by spawning two different instances of the game
program on my computer and then made the connection between them using
my local ip. Game worked fine.
But when I try to play the game with friends over internet, strange
problems evolve: When a friend of mine hosts the game and opens a
port, messages I send arrive safely without any problems, but none of
the messages he sends arrive to my end. The host checks the ip from
the first arriving packet and uses it in the communication.
(DatagramPacket in and in.getAddress()) The port all clients are using
as the receiving one is 44444 and this is hardcoded into server also.
Well, we tried different combinations with a few friends, and then
suddenly two of them were able to estabilish communication and were
able to play the game normally. Two other couldn't get any of the
messages to arrive.
I also made TCP version, and none of us had any problems with
connections, but the game was of course pretty laggy, so UDP is the
only reasonable choice.
Another weird thing (at least I think it's weird) is that I can ping
and traceroute the friends from whom i can't receive any packets, and
they can ping and traceroute me.
So what would be the best way to advance from here? My software
firewall never complains about any messages, so it's quite evident
that the messages stop at my friends host when going outwards, or at
my host before coming to my adsl-modem. I don't know much about
restrictions and port-politics, so should I change the port numbers or
what would be the reason for this kind of lack blocking? Is it common
that UDP traffic is completely cut off this way?
-Matti Paalanen