Author Topic: Split servers by region  (Read 736 times)

tadashu

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Split servers by region
« on: May 05, 2017, 11:25:43 AM »
hello everyone.

i'm trying build a game that the players host they own games.

Currently, i am using
  1. TNLobbyClient.knownServers.list
to get all registred hosts and
  1. TNServerInstance.Start(4039, 4040, "server.dat", TNServerInstance.Type.Udp, Tools.ResolveEndPoint("my adrress", 5129));
to register a new server.

My question is: Can i split this server list in regions?
Like: USA | EU | South America

devomage

  • Sr. Member
  • ****
  • Thank You
  • -Given: 7
  • -Receive: 67
  • Posts: 250
    • View Profile
Re: Split servers by region
« Reply #1 on: May 05, 2017, 06:02:05 PM »
You could use the 'name' field as a delimiter string.  For example, name = 'USA, Red Server'.  Or, name = 'EU, Blue Server'.

tadashu

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: Split servers by region
« Reply #2 on: May 06, 2017, 10:47:09 AM »
I thought about it, but I figured it would be another way already embedded in TNET.
Such as the Channels.

cmifwdll

  • Global Moderator
  • Sr. Member
  • *****
  • Thank You
  • -Given: 0
  • -Receive: 149
  • Posts: 285
  • TNet Alchemist
    • View Profile
Re: Split servers by region
« Reply #3 on: May 06, 2017, 06:27:22 PM »
Channel communication still routes through the server, so if the server is EU then all channels on that server are EU.

I'd say devomage's approach is the best way.