3 Replies - 2201 Views - Last Post: 23 June 2012 - 10:52 AM

#1 Lioran  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 14-June 12

UDP connection problem

Posted 22 June 2012 - 12:29 PM

Hello, I making a small MMO engine and I made it run TCP in parallel with UDP (only the client send UDP to server never the other way around)
the UDP works fine for some people but some will just send a couple of packet right of the bath and then... nothing.
the packet will just stop coming and every now and then will pop back and stop and get worse and worse and after couple of seconds... nothing at all.
Like I said this doesn't happen with everyone.
We came to the conclusion that the problem wasn't on the game engine.
Does anyone know what could cause something like that?

Is This A Good Question/Topic? 0
  • +

Replies To: UDP connection problem

#2 GunnerInc  Icon User is offline

  • "Hurry up and wait"
  • member icon




Reputation: 858
  • View blog
  • Posts: 2,287
  • Joined: 28-March 11

Re: UDP connection problem

Posted 22 June 2012 - 03:11 PM

UDP is the crappiest type of connection. There is no guarantee the packets will even get to their destination. If you send the letter A in one packet and the letter B in another, the letter B might get their before the A. You would have to add some kind of checksum or error checking for your UDP packets.

Do a search for something like "Difference between TCP and UDP", you will find pages and pages describing pros and cons to both, how they work and what issues each have.
Was This Post Helpful? 0
  • +
  • -

#3 Lioran  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 14-June 12

Re: UDP connection problem

Posted 23 June 2012 - 12:01 AM

this isn't a problem of packet getting there before other packet, this is a problem of packet being sent and then just stopping for no reason.Literaly no packet make it after couple of seconds. I'm aware of the pros and cons. All that's being sent here in UDP is the position which is being sent constantly so it doesn't matter if a few packet get lost or get there before the previous one. But it does matter if the packet doesn't get sent at all.
I mean it gives a nice speed boost for latency but. There is 1 other thing that is being sent through UDP and that'S jumping but since jumping is important it is sent at the same time in TCP so if the udp one doesnt make it at least the tcp one will for fail safe. I might just make UDP sending optionnal.
Was This Post Helpful? 0
  • +
  • -

#4 Lioran  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 14-June 12

Re: UDP connection problem

Posted 23 June 2012 - 10:52 AM

NVM we found the problem.
It was my friend's router with some option called "Block IP Flood Detection"
kinda weird that a router would prevent a flood from its own network but ok.
I guess hackers can attack from everywhere... even from your computer.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1