Author Topic: Different Hosts Have Different Networking Issues  (Read 2324 times)

gg67

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 66
    • View Profile
Different Hosts Have Different Networking Issues
« on: May 18, 2014, 09:26:04 PM »
It's taken me forever to reproduce this bug, but often in my networked rooms, users will experience very unstable and unpredictable networking. Some days things work great, others, not so much. My application has always been hosted on a cloud server and that's worked out well. Today, I was able to do some more debugging and figured out it seems to be dependent on who is host (created the channel). When I hosted, everybody experienced terrible issues, when another player hosted, everything was fine.

I was under the impression that hosts didn't really have anything to do with the RFC calls going out, but obviously something is going on. I have the most recent TNet from the git repo.

Can anybody explain why this is going on?

Thanks!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Different Hosts Have Different Networking Issues
« Reply #1 on: May 19, 2014, 05:46:14 PM »
It depends on what your game is doing with RFCs. If your game sends out RFCs very frequently, like every frame, then you will quickly flood the network on devices with a high framerate. Have you tried simply logging the packets that you're sending out, to see when and how many get sent? That would be the easiest way to check.

gg67

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 66
    • View Profile
Re: Different Hosts Have Different Networking Issues
« Reply #2 on: May 22, 2014, 05:24:51 PM »
I'm sending udp packets 5 times a second per person for basic data such as positions, rotations, etc. I use uSpeak for udp voice chat, but my problem occurs even when voice isn't used. However different channel hosts result in different levels of networking issues (ranging from no issues to udp packets just not showing up).

How does how the host connection play into tnet? From my understanding, with the client authoritative approach, clients tell the server what they're doing and the server relays the message to the rest of the clients. The only job of the host is to bind persistent channel objects to and they are technically the "creator" of the channel, although hosts can be switched. Is this accurate?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Different Hosts Have Different Networking Issues
« Reply #3 on: May 23, 2014, 05:36:44 PM »
Host doesn't bind persistent objects. Host is just like any other player. You can use the host status on the client side to determine who should be doing certain logic such as running AI scripts, since only one player has the host status set.

gg67

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 66
    • View Profile
Re: Different Hosts Have Different Networking Issues
« Reply #4 on: May 25, 2014, 12:48:09 PM »
So the bug I'm seeing when different users create channels and other users have networking issues is a coincidence? There's no way the network routes would change depending on who creates the channel? Just want to confirm.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Different Hosts Have Different Networking Issues
« Reply #5 on: May 25, 2014, 08:24:47 PM »
Since the host is generally responsible for doing extra work, you may be sending UDP packets from the host to everyone else, and those are not reliable. I'm not sure what you're doing, so I can't say much.