Author Topic: Can't connect troubleshooting advice  (Read 7054 times)

rxmarcus

  • Jr. Member
  • **
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 62
    • View Profile
Re: Can't connect troubleshooting advice
« Reply #15 on: July 25, 2017, 11:36:36 PM »
Ok that makes sense.

So with having 1 "dedicated" server, that has multiple channels for allowing multiple "matches".... I am pretty limited in the details that I can share with a user right?

Is there any way to tell the player how many players are connected to my dedicated server or how many channels (matches) there are or anything like that? Or only server name?


cmifwdll

  • Global Moderator
  • Sr. Member
  • *****
  • Thank You
  • -Given: 0
  • -Receive: 149
  • Posts: 285
  • TNet Alchemist
    • View Profile
Re: Can't connect troubleshooting advice
« Reply #16 on: July 25, 2017, 11:46:26 PM »
Not at all. Use TNManager.GetChannelList(...) to get a list of every channel on a server.
For each channel, this gives you: ID, current number of players, max number of players, whether the channel requires a password, if the channel is persistent, the name of the scene the channel is currently set to, and the entire DataNode (anything you set via SetChannelData).

rxmarcus

  • Jr. Member
  • **
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 62
    • View Profile
Re: Can't connect troubleshooting advice
« Reply #17 on: July 26, 2017, 09:54:35 PM »
Perfect, that is a great help.

So, right now I have my user connect to my "region" server that I'm hosting on digital ocean right when the game starts up.
This way I can call TNManager.GetchannelList() to display all of the open "matches" on the server.

BUT, if I want a player to then start his own private server, I need to call TNManager.Disconnect() to disconnect from my region server and then run TNServerInstance.Start() ?

That's what I'm attempting at the moment and am still working through some issues, but is there a better way to handle the situation?

cmifwdll

  • Global Moderator
  • Sr. Member
  • *****
  • Thank You
  • -Given: 0
  • -Receive: 149
  • Posts: 285
  • TNet Alchemist
    • View Profile
Re: Can't connect troubleshooting advice
« Reply #18 on: July 26, 2017, 10:23:58 PM »
You'll be facing the same issues, though....? The whole point of having a dedicated publicly-accessible server is to eliminate player-to-player connections. Players aren't usually on publicly-accessible networks, hence your connectivity issues.

rxmarcus

  • Jr. Member
  • **
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 62
    • View Profile
Re: Can't connect troubleshooting advice
« Reply #19 on: July 26, 2017, 10:38:35 PM »
yea, I was hoping to still allow players to host their own games if they wanted to with their buddies for example, rather than joining the quick play "region" server

cmifwdll

  • Global Moderator
  • Sr. Member
  • *****
  • Thank You
  • -Given: 0
  • -Receive: 149
  • Posts: 285
  • TNet Alchemist
    • View Profile
Re: Can't connect troubleshooting advice
« Reply #20 on: July 26, 2017, 10:45:16 PM »
Oh, then yeah you'd do exactly that. You can specify a lobby server to register with in the TNServerInstance.Start(...) call, too, if you want it to be visible to other clients in a server browser or something. Or (and), like ArenMook said, you can use Steam's Join Game functionality.

rxmarcus

  • Jr. Member
  • **
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 62
    • View Profile
Re: Can't connect troubleshooting advice
« Reply #21 on: July 26, 2017, 11:07:36 PM »
Sorry, one more question. So with using a Server hosted somewhere like Digital Ocean, really that adds a decent amount of latency as now all game packets are routed through it rather than directly from player to player correct?

cmifwdll

  • Global Moderator
  • Sr. Member
  • *****
  • Thank You
  • -Given: 0
  • -Receive: 149
  • Posts: 285
  • TNet Alchemist
    • View Profile
Re: Can't connect troubleshooting advice
« Reply #22 on: July 26, 2017, 11:58:07 PM »
No, all packets are routed through the game server regardless. In most (all?) cases, having a dedicated server will reduce latency as they're hosted in datacenters. If the server is hosted in LA and a user is in Egypt then of course they'll have poor latency, but it'd be even worse with player-run servers as you're adding another hop (at minimum). Digital Ocean has datacenters worldwide, though, so you could just set up a server in each major region if it's a huge problem for your game. There are analytics libraries you can add to your game that'd help you map out where your playerbase is clustered, so you can get a better idea of which regions to invest in.